[fpc-devel] creating call nodes for managed operators
genericptr at gmail.com
Sat Jul 22 15:47:04 CEST 2023
Nice work, I have no answer for you though. :)
What is the performance improvement here and why was it done the old way?
Another question I had about them is why they can't be inlined. Does anyone have the answer for that? Not being able to be inlined is the biggest performance problem I suspect, followed by the copy operator which gets called redundantly on assignment to temporary memory.
> On Jul 22, 2023, at 7:07 AM, Benito van der Zander via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
> i made a patch for faster management operators: https://gitlab.com/benibela/fpc-source/-/commit/1aa0866112c97dd0c7ed7f3a4b1c7ab6420cb942
> And it has been working fine on fixes3_2, but when I tried to apply it on main, I get an error message:
> views.inc(4318,17) Error: Wrong number of parameters specified for call to "$copy"
> video.inc(180,35) Error: Found declaration: operator copy(constref TEnhancedVideoCell;var TEnhancedVideoCell); Static;
> I have been creating two paranodes for the call like that:
> if is_rtti_managed_type(left.resultdef) and is_record(left.resultdef)
> and (mop_copy in trecordsymtable(left.resultdef.getsymtable(gs_record)).managementoperators) then
> hsym := tprocsym(left.resultdef.getsymtable(gs_record).Find('copy'));
> hp := ccallparanode.create(left, ccallparanode.create(right, nil));
> result := ccallnode.create(hp,hsym,hsym.owner,nil,,nil);
> should it be done differently?
> Viele Grüße,
> fpc-devel maillist - fpc-devel at lists.freepascal.org
More information about the fpc-devel