[Vm-dev] Re: [Pharo-project] quick methods and the method call stack

Eliot Miranda eliot.miranda at gmail.com
Thu Mar 15 18:11:51 UTC 2012


On Wed, Mar 14, 2012 at 11:19 AM, Alexandre Bergel
<alexandre.bergel at me.com>wrote:

> Hi!
>
> 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.


>
> Cheers,
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
>


-- 
best,
Eliot
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20120315/08a89737/attachment.htm


More information about the Vm-dev mailing list