Specialize bytecode for pairs()/next() iterator. Speedup: 3.5x.
Parser predict pairs/next and emits specialized bytecode. Bytecode is descpecialized at runtime if the prediction was wrong. Store slot index in hidden control var to avoid key lookups.
This commit is contained in:
@@ -2450,6 +2450,14 @@ static void build_ins(BuildCtx *ctx, BCOp op, int defop)
|
||||
| ins_call
|
||||
break;
|
||||
|
||||
case BC_ITERN:
|
||||
| NYI
|
||||
break;
|
||||
|
||||
case BC_ISNEXT:
|
||||
| NYI
|
||||
break;
|
||||
|
||||
case BC_VARG:
|
||||
| // RA = base*8, RB = (nresults+1)*8, RC = numparams*8
|
||||
| lwz TMP0, FRAME_PC(BASE)
|
||||
|
||||
Reference in New Issue
Block a user