[fpc-devel] Passing parameters through the stack to interfaces
jonas.maebe at elis.ugent.be
Thu Aug 5 16:01:04 CEST 2010
On 05 Aug 2010, at 15:18, Joost van der Sluis wrote:
> 1: replace the 'call' in the wrapper with a 'jmp'. I've tried this and
> it works, but when the function returns, the 'self'-class-pointer is
> converted to the interface-pointer. But I don't see why this is done
> the first place?!?
It's described in the comments:
(1): The code is the following
set self parameter to correct value
set self parameter to interface value
This is different to case (0) because in theory, the caller
could reuse the data pushed on the stack so we've to return
it unmodified because self is const.
However, at least nowadays self is a value parameter rather than a
const parameter, so it shouldn't matter anymore.
More information about the fpc-devel