Hi,
switch-like jump table. Top of stack is a variable reference. Below that is ahash table mapping compared values to instructions offsets.
The hash table values aren't offsets, they're pc values.
So it's not:
pc = pc + ht.lookup(TOS);
It's:
This is seen in bytecode.c:
op_branch:
op -= pc - bytestr_data;
op_relative_branch:
pc += op;
NEXT;
Inlining the computation we get pc = pc + op - pc - byte_strdata == op - byte_strdata.
Hi,
The hash table values aren't offsets, they're pc values.
So it's not:
It's:
This is seen in
bytecode.c:Inlining the computation we get
pc = pc + op - pc - byte_strdata == op - byte_strdata.