aboutsummaryrefslogtreecommitdiff
path: root/src/lj_ffrecord.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lj_ffrecord.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lj_ffrecord.c b/src/lj_ffrecord.c
index 42049511..2557cadf 100644
--- a/src/lj_ffrecord.c
+++ b/src/lj_ffrecord.c
@@ -281,7 +281,7 @@ static void LJ_FASTCALL recff_rawlen(jit_State *J, RecordFFData *rd)
281 if (tref_isstr(tr)) 281 if (tref_isstr(tr))
282 J->base[0] = emitir(IRTI(IR_FLOAD), tr, IRFL_STR_LEN); 282 J->base[0] = emitir(IRTI(IR_FLOAD), tr, IRFL_STR_LEN);
283 else if (tref_istab(tr)) 283 else if (tref_istab(tr))
284 J->base[0] = lj_ir_call(J, IRCALL_lj_tab_len, tr); 284 J->base[0] = emitir(IRTI(IR_ALEN), tr, TREF_NIL);
285 /* else: Interpreter will throw. */ 285 /* else: Interpreter will throw. */
286 UNUSED(rd); 286 UNUSED(rd);
287} 287}
@@ -1026,7 +1026,7 @@ static void LJ_FASTCALL recff_table_insert(jit_State *J, RecordFFData *rd)
1026 rd->nres = 0; 1026 rd->nres = 0;
1027 if (tref_istab(ix.tab) && ix.val) { 1027 if (tref_istab(ix.tab) && ix.val) {
1028 if (!J->base[2]) { /* Simple push: t[#t+1] = v */ 1028 if (!J->base[2]) { /* Simple push: t[#t+1] = v */
1029 TRef trlen = lj_ir_call(J, IRCALL_lj_tab_len, ix.tab); 1029 TRef trlen = emitir(IRTI(IR_ALEN), ix.tab, TREF_NIL);
1030 GCtab *t = tabV(&rd->argv[0]); 1030 GCtab *t = tabV(&rd->argv[0]);
1031 ix.key = emitir(IRTI(IR_ADD), trlen, lj_ir_kint(J, 1)); 1031 ix.key = emitir(IRTI(IR_ADD), trlen, lj_ir_kint(J, 1));
1032 settabV(J->L, &ix.tabv, t); 1032 settabV(J->L, &ix.tabv, t);
@@ -1050,7 +1050,7 @@ static void LJ_FASTCALL recff_table_concat(jit_State *J, RecordFFData *rd)
1050 lj_opt_narrow_toint(J, J->base[2]) : lj_ir_kint(J, 1); 1050 lj_opt_narrow_toint(J, J->base[2]) : lj_ir_kint(J, 1);
1051 TRef tre = (J->base[1] && J->base[2] && !tref_isnil(J->base[3])) ? 1051 TRef tre = (J->base[1] && J->base[2] && !tref_isnil(J->base[3])) ?
1052 lj_opt_narrow_toint(J, J->base[3]) : 1052 lj_opt_narrow_toint(J, J->base[3]) :
1053 lj_ir_call(J, IRCALL_lj_tab_len, tab); 1053 emitir(IRTI(IR_ALEN), tab, TREF_NIL);
1054 TRef hdr = recff_bufhdr(J); 1054 TRef hdr = recff_bufhdr(J);
1055 TRef tr = lj_ir_call(J, IRCALL_lj_buf_puttab, hdr, tab, sep, tri, tre); 1055 TRef tr = lj_ir_call(J, IRCALL_lj_buf_puttab, hdr, tab, sep, tri, tre);
1056 emitir(IRTG(IR_NE, IRT_PTR), tr, lj_ir_kptr(J, NULL)); 1056 emitir(IRTG(IR_NE, IRT_PTR), tr, lj_ir_kptr(J, NULL));