Record vararg expressions with varargs defined off-trace.

Add SLOAD variant to access the frame type/size.
This commit is contained in:
Mike Pall
2010-09-13 01:17:38 +02:00
parent e32f7d96c1
commit 847b9cf253
5 changed files with 102 additions and 48 deletions

View File

@@ -1318,8 +1318,13 @@ LJFOLDX(lj_opt_fwd_fload)
LJFOLD(SLOAD any any)
LJFOLDF(fwd_sload)
{
lua_assert(J->slot[fins->op1] != 0);
return J->slot[fins->op1];
if ((fins->op2 & IRSLOAD_FRAME)) {
TRef tr = lj_opt_cse(J);
return tref_ref(tr) < J->chain[IR_RETF] ? EMITFOLD : tr;
} else {
lua_assert(J->slot[fins->op1] != 0);
return J->slot[fins->op1];
}
}
LJFOLD(XLOAD KPTR any)