[fpc-devel] [patch] fixes check for unused threadvars
sergei_gorelkin at mail.ru
Thu Apr 23 01:49:31 CEST 2009
Sergei Gorelkin wrote:
> Attached is a one-line fix that makes programs a couple of bytes smaller
> by preventing creation of empty threadvar tables when threadvars are not
> actually used.
> The condition "Assigned(TAsmList.First)" always evaluates to True
> because the list contains at least one marker item.
Whoops, not that easy. It appears that
does not create new section in current_asmdata.asmlists[al_const] and
depends on the state in which that asmlist was left by the previously
executed code. Hence, compiling a unit that does not have threadvars but
has resourcestrings ends up in an IE.
Attached a corrected patch. The section prefix 'RESSTRTABLE' is my wild
guess, so it may need to be changed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 1453 bytes
Desc: not available
More information about the fpc-devel