[Lazarus] PascalScript on Win x64

Sven Barth pascaldragon at googlemail.com
Tue Sep 4 15:02:37 CEST 2012

Am 04.09.2012 14:42, schrieb Martin:
> On 04/09/2012 13:24, Alexander Hofmann wrote:
>> Hi there.
>> This is a cross-post (cross-mail ?) to
>> http://www.lazarus.freepascal.org/index.php/topic,17978.0.html as I
>> got the hint there that it might be better to ask on the list instead
>> of in the forum, at least concerning the calling conventions - but
>> I'll ask the whole lot, anyway; I hope that's ok.
> As Vincent pointed out. FPC mailinglist.
>> Interestingly, when I start debugging
>> <SomeClass>.Create(aOwner:TComponent)-Type of Constructors, there is
>> some difference in the Register values, depending on whether the
>> Constructor was called from "pure" FPC-Code or the Script (at least so
>> it seems):
>> o Called from FPC: rcx: 0 (nil), rdx: Class Reference, r8: Value of aOwner
>> o Called from Script: rcx: Class Reference, rdx: 1 (!?), r8: Value of
>> aOwner (at least so it seems)
>> Is there any difference in the calling convention on x64-Systems
>> between Delphi and Lazarus? I could only find the "standard"
>> information on Windows x64 calling conventions, without special care
>> of constructors, if there is any...
> You will be able to get an answer about the calling convention fpc uses
> (They should be standard)
> But you can then check yourself in x64.inc what PascalScript does.

This seems to be the main disadvantage of PascalScript: it needs 
platform specific assembler code...

Perhaps the situation can be improved once Rtti.Invoke ( 
http://docwiki.embarcadero.com/Libraries/de/System.Rtti.Invoke ) is 


More information about the Lazarus mailing list