[Vm-dev] dispatchOn:in: and inlining bytecode routines

André Wendt andre.wendt at hpi.uni-potsdam.de
Sat Apr 12 10:40:07 UTC 2008


Hi,

as far as I can see, there's nothing special about BytecodeTable in the
Interpreter that instructs VMMaker to generate a switch statement that
includes:

case 112:
    /* pushReceiverBytecode */
    {
        /* begin fetchNextBytecode */
        currentBytecode = byteAtPointer(++localIP);
        /* begin internalPush: */
        longAtPointerput(localSP += BytesPerWord, foo->receiver);
    }
    break;

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:
    pushReceiverBytecode();
    break;

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?

Thanks,
André


More information about the Vm-dev mailing list