[Vm-dev] Weird problem when adding a method to StackInterpreter
Mariano Martinez Peck
marianopeck at gmail.com
Thu Dec 22 09:12:36 UTC 2011
>
>>
>> Moreover, when I ADD those lines, apart from the make error, when
>> translating from SLANG to C, if I open a Transcript I see these
>> "suspicious" lines:
>>
>> Removed findNewMethodInClass: because it refers to the local variable
>> localSP of interpret.
>> But it is either used outside of interpret or exported!!
>> Removed lookupInMethodCacheSel:class: because it refers to the local
>> variable localSP of interpret.
>> But it is either used outside of interpret or exported!!
>>
>> BUT, none of those methods access localSP.
>>
>> Any idea of what can be wrong?
>>
>
> For some reason lookupInMethodCacheSel:class: is not being inlined.
> Since it uses localSP via internalStackValue: it must be always inlined
> into the body of interpret. What I don't know is why adding a send of
> traceObjectusage: after internalStackValue: causes inlining to fail.
>
Hi Eliot. I did some more tests and it even fails WITHOUT using
#traceObjectUsage: . Just adding the line "rcvr := self
internalStackValue: argumentCount." at the beginning of
#lookupInMethodCacheSel:class: will cause the problem. So, the following
even fails:
lookupInMethodCacheSel: selector class: class
"This method....."
| hash probe rcvr |
<inline: true>
<asmLabel: false>
rcvr := self internalStackValue: argumentCount.
hash := selector bitXor: class. "shift drops two low-order zeros from
addresses"
......
Weird ehh, because you use #internalStackValue: along StackInterpreter in
a lot of other places and you don't have problems there.
> You're going to have to delve into the inliner in Slang. This is, um,
> not fun. I liken it to getting hit on the head with a stick by your guru,
> except that no enlightenment results. Good luck.
>
>
:( thanks.
>
>> Thanks in advance,
>>
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.com
>>
>>
>>
>
>
> --
> best,
> Eliot
>
>
>
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/vm-dev/attachments/20111222/0dc0e28d/attachment-0001.htm
More information about the Vm-dev
mailing list