Take a look at interpret_functions.h. This contains the implementation of all Pike opcodes. When you are compiling a Pike --without-machinecode, the OPCODE* macros will transform this into a giant switch statement that executes the different bytecodes. When compiling --with-machinecode, it instead becomes one function per opcode, so that the machinecode generator can insert call instructions to them. Also, the actual implementation of the opcodes change a bit, the DO_JUMP_TO etc macros expand to radically different things depending on whether you are using machinecode or not. So for all practical purposes the interpretter _is_ completely replaced in the current Pike implementation.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-05-17 16:34: Subject: Re: byte-code
On Sat, May 17, 2003 at 04:05:05PM +0200, Marcus Comstedt (ACROSS) (Hail Ilpalazzo!) @ Pike (-) developers forum wrote:
Then you understood wrong. The machine code generator _replaces_ the byte code interpreter.
But not completely - only some (very few for now) parts. So basically it should mean that pure byte-code should be interpreted correctly even when machine-dependent Pike was built. Or I am wrong again?
Regards, /Al
/ Brevbäraren