show bytecodes?

Klaus D. Witzel klaus.witzel at cobss.com
Sat Oct 13 22:02:19 UTC 2007


On Sat, 13 Oct 2007 23:02:48 +0200, Robert Withers wrote:

> Ok, this gets me into the CompiledMethod, with which I have very little  
> experience.  I did find that the 'source' toggle button in a browser has  
> a bytecodes option.  It didn't help me much, seeing the bytecodes.  I am  
> trying to find a way to invoke a bytecode primitive from the image.  So,  
> for instance, given 2 SmallIntegers in hand, I want to run  
> bytecodePrimAdd without running #+.

Since #+ belong to the special selectors, the VM will indeed first try  
bytecodePrimAdd. See "special selectors" in Object>>#whatIsAPrimitive and  
Object>>#howToModifyPrimitives, watch for "no lookup".

/Klaus

> Is there a way to do this?  I am digging through  
> #lookupInMethodCacheSel:class: at the moment to see how primitive  
> dispatch works.
>
> On Oct 13, 2007, at 1:40 PM, Lukas Renggli wrote:
>
>>> The 'show bytescodes' option on the method text pane menu doesn't
>>> work.  How ca I look at the bytecodes of a method?
>>
>> Inspect the expression:
>>
>>      ClassName >> #methodName
>>
>> Cheers,
>> Lukas
>>
>> --Lukas Renggli
>> http://www.lukas-renggli.ch
>>
>
>
>





More information about the Squeak-dev mailing list