[fpc-devel] win64 calling convention

Michael Schnell mschnell at lumino.de
Fri Nov 30 09:15:04 CET 2012


On 11/29/2012 05:21 PM, Martin wrote:
> Just to confirm my observations. (again trying to get pascal script to 
> work)
>
>
> if "const" is NOT used, then TPoint is put into a register
> if "const" is used, then TPoint is in mem, and the register is a 
> reference.
>
> Is that right?  (I know the doc says, no assumption, and can be ref or 
> value)
It does make sense.

"Not const" forces copying the data during the function all, "const" 
uses the (supposedly) more efficient call by reference, while the 
compiler prevents modifying the data.

(Beware that with objects the object reference is the "variable", and 
not the object instance.)

-Michael



More information about the fpc-devel mailing list