[Vm-dev] how to map bytecodes to methods?
eliot.miranda at gmail.com
Tue Oct 5 17:53:41 UTC 2010
On Tue, Oct 5, 2010 at 10:44 AM, Mariano Martinez Peck <
marianopeck at gmail.com> wrote:
> Hi. I am new with all these stuff. My problem is how to map bytecodes
> numbers to methods.
> For example, if in a method I send #class and see the bytecodes I can see
> it has a "C7", which in decimal is 199.
> If I see Interpreter class >> initializeBytecodeTable then in 199 I see
> #bytecodePrimClass which is correct.
> Now....I want to go in the OTHER direction. For example, I have changed
> something in #bytecodePrimValueWithArg and I would like to know WHICH
> method from the image side, generates that bytecode.
See VariableNode class>>initialize:
StdSelectors := Dictionary new: 64.
mapping: ((1 to: Smalltalk specialSelectorSize) collect:
[:i | Smalltalk specialSelectorAt: i])
to: (SendPlus to: SendPlus + 31).
> Ok, sometimes it is intuitive, but sometimes more or less...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Vm-dev