[Vm-dev] dispatchOn:in: and inlining bytecode routines
andre.wendt at hpi.uni-potsdam.de
Sun Apr 13 16:35:30 UTC 2008
Mathieu Suen wrote:
> Can you show use the smalltalk code?
> I think is because your aren't using the internalPush..
self inline: true. "already toggled this, but didn't help"
PushConstantBytecodeTable := Array new: 8.
self table: PushConstantBytecodeTable from:
for the bytecode table that I want to dispatch on. It is called in
Interpreter>>#initialize. Then I use
self dispatchOn: (byte1 >> 4) in: PushConstantBytecodeTable.
in a bytecode routine. I don't understand how that relates to
> On Apr 12, 2008, at 12:40 PM, André Wendt wrote:
>> as far as I can see, there's nothing special about BytecodeTable in the
>> Interpreter that instructs VMMaker to generate a switch statement that
>> case 112:
>> /* pushReceiverBytecode */
>> /* begin fetchNextBytecode */
>> currentBytecode = byteAtPointer(++localIP);
>> /* begin internalPush: */
>> longAtPointerput(localSP += BytesPerWord, foo->receiver);
>> However, when I want to dispatch on a code in a subset of bytecodes
>> using my own table (for integrating multiple bytecodes into one), I get
>> case 0:
>> instead of an inlined pushReceiverBytecode routine. Needless to say my
>> code doesn't compile because of the pushReceiverBytecode() call.
>> Why does pushReceiverBytecode get inlined when used with BytecodeTable,
>> but not in my own?
More information about the Vm-dev