aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_record.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index dfcc3f65..a49f942a 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1570,8 +1570,11 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults)
1570 TRef tr = TREF_NIL; 1570 TRef tr = TREF_NIL;
1571 ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]); 1571 ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]);
1572 if (idx < 0) goto nyivarg; 1572 if (idx < 0) goto nyivarg;
1573 if (idx != 0 && !tref_isinteger(tridx)) 1573 if (idx != 0 && !tref_isinteger(tridx)) {
1574 if (tref_isstr(tridx))
1575 tridx = emitir(IRTG(IR_STRTO, IRT_NUM), tridx, 0);
1574 tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX); 1576 tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX);
1577 }
1575 if (idx != 0 && tref_isk(tridx)) { 1578 if (idx != 0 && tref_isk(tridx)) {
1576 emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT), 1579 emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT),
1577 fr, lj_ir_kint(J, frofs+8*(int32_t)idx)); 1580 fr, lj_ir_kint(J, frofs+8*(int32_t)idx));