Tom Hughes wrote: > In message <[EMAIL PROTECTED]> > Leopold Toetsch <[EMAIL PROTECTED]> wrote:
>> while (pc) { >> argp1 = ...pmc_reg.registers[cur_opcode[1]]; >> if (*pc & KEY1_MASK) { >> key1 = ...pmc_reg.registers[cur_opcode[2]]; /* for p_k */ >> argp1 = get_keyed_entry(argp1, key1, flags); >> } >> ... >> PC = (INTERP->op_func_table)[*PC & KEY_MASK]( ... ); >> PC += n_keys; /* account for additonal keys in bytecode */ >> } >> >> which would call add_p_p_p(argp1, argp2, argp3). >> >>"argp" points either directly to the PMC register, or for keys, into >>the bucket, where the PMC is stored in the aggregate. Of course, argp >>shouldn't move due to GC while processing one op. >> > > This may be all fine and dandy for the prederef case but it's going to > force the opcode functions to do a lot more work working out where to > get the key from in all the other cases. No, this would be the run loop for _all_ cores. So _all_ keyed access is taken out of the vtable function and done in the run loop. > It also prevents you using the optimised _int vtable methods for keyed > access using integer keys... I don't see that. Were we now have op_keyed and op_keyed_int, we could still use this optimization by calling op_p and op_i. > Tom leo