[Pharo-project] quick methods and the method call stack
eliot.miranda at gmail.com
Thu Mar 15 14:11:51 EDT 2012
On Wed, Mar 14, 2012 at 11:19 AM, Alexandre Bergel
<alexandre.bergel at me.com>wrote:
> Can someone confirm or infirm the following: A quick method (ie. the
> compiled methods answer true to the message isQuick) is executed without
> creating a stack frame. Is that true?
Yes, at least in the interpreter. In Cog, if jitted, such methods run in a
leaf frame (only the return address is pushed), and additional tests in the
JIT allow many other methods to run with only a leaf frame. See
needsFrameNever: and needsFrameIfInBlock: and senders in the Cog VM source.
If all the bytecodes in a method are marked with needsFrameNever: or
needsFrameIfInBlock: then the method can be (and is) compiled frameless.
if all the bytecodes in a block are marked with needsFrameNever: then the
block can be (and is) compiled frameless.
> Alexandre Bergel http://www.bergel.eu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-dev