[squeak-dev] Re: Avoiding compiler inlining
Klaus D. Witzel
klaus.witzel at cobss.com
Mon Jan 19 00:04:53 UTC 2009
On Sun, 18 Jan 2009 17:57:53 +0100, Randal L. Schwartz wrote:
>>>>>> "Igor" == Igor Stasenko writes:
> Igor> thisContext pc: (thisContext method initialPc).
> All we have to do now is inline *this*.
:) but is is "inlined" in the inlined version of #whileTrue: :)
Switching to bytecodes in the code pane shows it (the unconditional jump):
13 <70> self
14 <C9> send: value
15 <9C> jumpFalse: 21
16 <10> pushTemp: 0
17 <C9> send: value
18 <87> pop
19 <A3 F8> jumpTo: 13
21 <73> pushConstant: nil
22 <7C> returnTop
When compiling all methods in the .image with <nomacros> pragma (my own
compiler ENH for controlling what is inlined), the ENH makes sure the
existing code of #whileTrue: & friends is compiled with inlining, so that
the method performs as if in tail recursive fashion.
This seems to be one of the fix points of the language (another one is
expression [thisContext] relative to inlining).
"If at first, the idea is not absurd, then there is no hope for it".
More information about the Squeak-dev