On Thu, Jan 30, 2003 at 10:07:26AM +0100, Leopold Toetsch wrote: > code_start = interpreter->code->base.data; // new syntax > while (offs) > offs = interp->func_table[*(code_start+offs)](offs, ..)
It's unclear to me whether you are saying the opcode functions would still be passed the PC or offs(et) ? If you pass the offset, the opcode functions will have to re-calculate the PC in order to access opcode arguments. > Changing the addressing scheme to opcode offsets relative to code > start would simplify all kinds of (non local) control flow changes. As > real world programs mostly consists of such subroutine calls, these > would be simplified a lot (and would then not need leaving the runloop > - probably ;-) How would non local control flow be simplified ? You would still have to leave the runloop because the bytecode base has changed and code_start would no longer be correct. -- Jason