Leopold Toetsch wrote: > 2. Proposal for _keyed opcodes > ------------------------------ > > The thread with subject "pdd06_pasm, pdd08_keys: _keyed ops" clearly > showes the shortcomings of the current _keyed opcodes and the > implementation of these.[1] > The 3 operand keyed add @a[$i] = @b[3] + %h{"k"}: > > add_p_ki_p_kic_p_kc Attached is a proof of concept of my proposal. A 6 operand 3 keyed op get's rewritten like so: /* OP _p_k _p_k_p_k => * set py, p_k * set pz, p_k * new px, .PerlUndef * OP px, py, pz * set _p_k_px */ - It uses only set_ ops - only imcc, but with pasm syntax in example With an approach like this, we could cut down the VTABLE to roughly 1/3 of it's current size. The _keyed entrys would only consist of the set_.._keyed{,_int} variants plus exists_keyed and defined_keyed. And, we would never have the opcode explosion to 64 times of current size. Attached is - patch to imcc.y - 3key.imc (example) - a.pasm (output for above) $ parrot a.pbc 300 leoThread Previous | Thread Next