summaryrefslogtreecommitdiff
path: root/src/lj_record.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_record.c')
-rw-r--r--src/lj_record.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lj_record.c b/src/lj_record.c
index bbabd3ce..bafb6ff7 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1608,10 +1608,13 @@ static TRef rec_cat(jit_State *J, BCReg baseslot, BCReg topslot)
1608 lua_assert(baseslot < topslot); 1608 lua_assert(baseslot < topslot);
1609 if (tref_isnumber_str(tr) && tref_isnumber_str(*(top-1))) { 1609 if (tref_isnumber_str(tr) && tref_isnumber_str(*(top-1))) {
1610 TRef hdr, *trp, *xbase, *base = &J->base[baseslot]; 1610 TRef hdr, *trp, *xbase, *base = &J->base[baseslot];
1611 /* First convert number consts to string consts to simplify FOLD rules. */ 1611 /* First convert numbers to strings. */
1612 for (trp = top; trp >= base && tref_isnumber_str(*trp); trp--) 1612 for (trp = top; trp >= base; trp--) {
1613 if (tref_isk(*trp) && tref_isnumber(*trp)) 1613 if (tref_isnumber(*trp))
1614 *trp = emitir(IRT(IR_TOSTR, IRT_STR), *trp, 0); 1614 *trp = emitir(IRT(IR_TOSTR, IRT_STR), *trp, 0);
1615 else if (!tref_isstr(*trp))
1616 break;
1617 }
1615 xbase = ++trp; 1618 xbase = ++trp;
1616 tr = hdr = emitir(IRT(IR_BUFHDR, IRT_P32), 1619 tr = hdr = emitir(IRT(IR_BUFHDR, IRT_P32),
1617 lj_ir_kptr(J, &J2G(J)->tmpbuf), IRBUFHDR_RESET); 1620 lj_ir_kptr(J, &J2G(J)->tmpbuf), IRBUFHDR_RESET);