mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-08 07:34:07 +00:00
Merge branch 'master' into v2.1
This commit is contained in:
commit
347b49ec7d
@ -64,7 +64,7 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca)
|
|||||||
TValue *o2 = i == 0 ? o+1 : o-1;
|
TValue *o2 = i == 0 ? o+1 : o-1;
|
||||||
CType *ct = ctype_raw(cts, cdataV(o2)->ctypeid);
|
CType *ct = ctype_raw(cts, cdataV(o2)->ctypeid);
|
||||||
ca->ct[i] = NULL;
|
ca->ct[i] = NULL;
|
||||||
ca->p[i] = NULL;
|
ca->p[i] = (uint8_t *)strVdata(o);
|
||||||
ok = 0;
|
ok = 0;
|
||||||
if (ctype_isenum(ct->info)) {
|
if (ctype_isenum(ct->info)) {
|
||||||
CTSize ofs;
|
CTSize ofs;
|
||||||
@ -75,7 +75,7 @@ static int carith_checkarg(lua_State *L, CTState *cts, CDArith *ca)
|
|||||||
ok = 1;
|
ok = 1;
|
||||||
} else {
|
} else {
|
||||||
ca->ct[1-i] = ct; /* Use enum to improve error message. */
|
ca->ct[1-i] = ct; /* Use enum to improve error message. */
|
||||||
ca->p[1-i] = (void *)(intptr_t)1; /* To make it unequal. */
|
ca->p[1-i] = NULL;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1453,7 +1453,9 @@ void LJ_FASTCALL recff_cdata_arith(jit_State *J, RecordFFData *rd)
|
|||||||
ct = ctype_child(cts, cct);
|
ct = ctype_child(cts, cct);
|
||||||
tr = lj_ir_kint(J, (int32_t)ofs);
|
tr = lj_ir_kint(J, (int32_t)ofs);
|
||||||
} /* else: interpreter will throw. */
|
} /* else: interpreter will throw. */
|
||||||
} /* else: interpreter will throw. */
|
} else {
|
||||||
|
tr = emitir(IRT(IR_ADD, IRT_PTR), tr, lj_ir_kintp(J, sizeof(GCstr)));
|
||||||
|
}
|
||||||
} else if (!tref_isnum(tr)) {
|
} else if (!tref_isnum(tr)) {
|
||||||
tr = 0;
|
tr = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user