Hello,
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.
Regards,
Sergei
Index: pmodules.pas
===================================================================
--- pmodules.pas (revision 13019)
+++ pmodules.pas (working copy)
@@ -219,7 +219,7 @@
if assigned(current_module.globalsymtable) then
current_module.globalsymtable.SymList.ForEachCall(@AddToThreadvarList,ltvTable);
current_module.localsymtable.SymList.ForEachCall(@AddToThreadvarList,ltvTable);
- if ltvTable.first<>nil then
+ if not ltvTable.empty then
begin
s:=make_mangledname('THREADVARLIST',current_module.localsymtable,'');
{ end of the list marker }
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel