[Lazarus] PascalScript on Win x64
Joost van der Sluis
joost at cnoc.nl
Sat Sep 8 21:39:59 CEST 2012
On Thu, 2012-09-06 at 09:47 +0200, Sven Barth wrote:
> Am 06.09.2012 04:40, schrieb Paul Ishenin:
> > 04.09.12, 22:10, Sven Barth пишет:
> >
> >>>> RTTI may (you need to establish if this applies to *all* cases) tell
> >>>> you
> >>>> that "procedure Foo(a: integer)" takes 1 int param.
> >>>> But it will not tell you, if this needs to be on the stack, or in a
> >>>> register (or which register).
> >>>>
> >>>
> >>> Sorry, not correct. It does: in calling convention.
> >>>
> >>> The point I meant to made is: you still need to get the value into that
> >>> register, or set up the stack. That can only be done in asm
> >>
> >> Yes, it can only be done in ASM, but the Invoke function is part of the
> >> RTL and thus would by definition be available for all platforms
> >> supported by FPC (even if not every platform would be available at once).
> >
> > Maybe at the first step to move the code for invokation of FPC methods
> > from PascalScript code into a LCL unit (if license allows) - so later it
> > will be simple moved to FPC RTL?
>
> If the license allows it this might be an interesting idea. The most
> important thing that is missing is the TValue type and also I don't know
> how the Invoke code knows if the pointer passed in is a global one, a
> method, a class method or a static method...
Please take a look at the
http://svn.freepascal.org/svn/fpc/branches/joost/classattributes branch.
It contains an initial implementation of the TValue type. I still have
to add some testcases and tidy thins up and then this can be merged to
trunk.
Adding invocation to fpc's RTTI isn't that hard, only quite some work to
implement on all platforms.
Joost.
More information about the Lazarus
mailing list