diff options
author | Mike Pall <mike> | 2023-09-21 02:23:25 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2023-09-21 02:23:25 +0200 |
commit | 4b605a7da85f4c82d40f54635d1880e1d858c785 (patch) | |
tree | 582a0cf3506df08766990a56757be1fb28733fe3 /src/lj_record.c | |
parent | e897c5743f97a6b05c59852709092e7da4119914 (diff) | |
parent | b138ccfa918518a152bc830fef3d53cd0a922e36 (diff) | |
download | luajit-4b605a7da85f4c82d40f54635d1880e1d858c785.tar.gz luajit-4b605a7da85f4c82d40f54635d1880e1d858c785.tar.bz2 luajit-4b605a7da85f4c82d40f54635d1880e1d858c785.zip |
Merge branch 'master' into v2.1
Diffstat (limited to 'src/lj_record.c')
-rw-r--r-- | src/lj_record.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lj_record.c b/src/lj_record.c index 134fad83..7a970628 100644 --- a/src/lj_record.c +++ b/src/lj_record.c | |||
@@ -1991,8 +1991,11 @@ static void rec_varg(jit_State *J, BCReg dst, ptrdiff_t nresults) | |||
1991 | TRef tr = TREF_NIL; | 1991 | TRef tr = TREF_NIL; |
1992 | ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]); | 1992 | ptrdiff_t idx = lj_ffrecord_select_mode(J, tridx, &J->L->base[dst-1]); |
1993 | if (idx < 0) goto nyivarg; | 1993 | if (idx < 0) goto nyivarg; |
1994 | if (idx != 0 && !tref_isinteger(tridx)) | 1994 | if (idx != 0 && !tref_isinteger(tridx)) { |
1995 | if (tref_isstr(tridx)) | ||
1996 | tridx = emitir(IRTG(IR_STRTO, IRT_NUM), tridx, 0); | ||
1995 | tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX); | 1997 | tridx = emitir(IRTGI(IR_CONV), tridx, IRCONV_INT_NUM|IRCONV_INDEX); |
1998 | } | ||
1996 | if (idx != 0 && tref_isk(tridx)) { | 1999 | if (idx != 0 && tref_isk(tridx)) { |
1997 | emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT), | 2000 | emitir(IRTGI(idx <= nvararg ? IR_GE : IR_LT), |
1998 | fr, lj_ir_kint(J, frofs+8*(int32_t)idx)); | 2001 | fr, lj_ir_kint(J, frofs+8*(int32_t)idx)); |