Adriaan van Os wrote:
Jonas Maebe wrote:
d) trampolines for interface methods

Ehw, trampolines. They requires executable stacks.

No, they don't.

Is there a
possibility to pass activation frames instead or apply lambda/lifting ?

Trampolines for interface methods are generated at compile time are are of the form:

self:=self-offset(objectself,intfvmt);
branch(interfacemethod); // can either be a direct or indirect branch

This cannot be expressed in LLVM IR. The above can in principle be replaced by a tail call that passes on all arguments (although LLVM won't generate an actual tail call, because it only supports tail calls for functions using the C fastcall calling convention) because FPC does not support C-style varargs functions (in which case "calling through passing the caller arguments" again could not be expressed), but since inline assembly needs to be supported anyway, it's probably easier to just generate assembler for them and call that.


Jonas
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to