[fpc-devel] creating call nodes for managed operators
Benito van der Zander
benito at benibela.de
Sat Jul 22 15:07:48 CEST 2023
Hallo,
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
begin
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,
Benito
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20230722/46db2917/attachment.htm>
More information about the fpc-devel
mailing list