Jonas Maebe wrote: [...]
Well, basically I agree with all your points ;) That's why I said the optimization is almost useless for real world programs. Nevertheless it helps for the benchmarks and gcc does it to. I'll try to find out the influence on the compiler/rtl, there are some examples where it applies (from ftl\inc\objpas.inc): class function TObject.getinterfaceentry(const iid : tguid) : pinterfaceentry; var i: integer; intftable: pinterfacetable; Res: pinterfaceentry; begin getinterfaceentry:=nil; intftable:=pinterfacetable((pointer(Self)+vmtIntfTable)^); if assigned(intftable) then begin i:=intftable^.EntryCount; Res:[EMAIL PROTECTED]; while (i>0) and not (assigned(Res^.iid) and IsGUIDEqual(Res^.iid^,iid)) do begin inc(Res); dec(i); end; if (i>0) then getinterfaceentry:=Res; end; if (getinterfaceentry=nil)and not(classparent=nil) then getinterfaceentry:=classparent.getinterfaceentry(iid) end; _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel