Merge branch 'master' into v2.1

This commit is contained in:
Mike Pall 2023-06-02 11:42:24 +02:00
commit 8e53ccc686
2 changed files with 4 additions and 3 deletions

View File

@ -378,7 +378,8 @@ void emit_lib(BuildCtx *ctx)
char *p; char *p;
/* Simplistic pre-processor. Only handles top-level #if/#endif. */ /* Simplistic pre-processor. Only handles top-level #if/#endif. */
if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') { if (buf[0] == '#' && buf[1] == 'i' && buf[2] == 'f') {
int ok = 1, len = strlen(buf); int ok = 1;
size_t len = strlen(buf);
if (buf[len-1] == '\n') { if (buf[len-1] == '\n') {
buf[len-1] = 0; buf[len-1] = 0;
if (buf[len-2] == '\r') { if (buf[len-2] == '\r') {

View File

@ -229,8 +229,8 @@ static TRef fwd_ahload(jit_State *J, IRRef xref)
if (key->o == IR_KSLOT) key = IR(key->op1); if (key->o == IR_KSLOT) key = IR(key->op1);
lj_ir_kvalue(J->L, &keyv, key); lj_ir_kvalue(J->L, &keyv, key);
tv = lj_tab_get(J->L, ir_ktab(IR(ir->op1)), &keyv); tv = lj_tab_get(J->L, ir_ktab(IR(ir->op1)), &keyv);
lj_assertJ(itype2irt(tv) == irt_type(fins->t), if (itype2irt(tv) != irt_type(fins->t))
"mismatched type in constant table"); return 0; /* Type instability in loop-carried dependency. */
if (irt_isnum(fins->t)) if (irt_isnum(fins->t))
return lj_ir_knum_u64(J, tv->u64); return lj_ir_knum_u64(J, tv->u64);
else if (LJ_DUALNUM && irt_isint(fins->t)) else if (LJ_DUALNUM && irt_isint(fins->t))