mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
FFI: Catch various NYI cases while recording.
This commit is contained in:
parent
a70fb9416a
commit
d176433e32
@ -273,13 +273,14 @@ static TRef crec_tv_ct(jit_State *J, CType *s, CTypeID sid, TRef sp)
|
|||||||
goto err_nyi; /* NYI: specialize to the result. */
|
goto err_nyi; /* NYI: specialize to the result. */
|
||||||
if (t == IRT_CDATA)
|
if (t == IRT_CDATA)
|
||||||
goto err_nyi; /* NYI: copyval of >64 bit integers. */
|
goto err_nyi; /* NYI: copyval of >64 bit integers. */
|
||||||
if ((sinfo & CTF_BOOL) || t == IRT_CDATA)
|
if (t >= IRT_U32)
|
||||||
if (t == IRT_U32) lj_trace_err(J, LJ_TRERR_NYICONV);
|
goto err_nyi; /* NYI: on-trace handling of U32/I64/U64. */
|
||||||
return emitir(IRT(IR_XLOAD, t), sp, 0);
|
return emitir(IRT(IR_XLOAD, t), sp, 0);
|
||||||
} else if (ctype_isptr(sinfo)) {
|
} else if (ctype_isptr(sinfo)) {
|
||||||
IRType t = (LJ_64 && s->size == 8) ? IRT_P64 : IRT_P32;
|
IRType t = (LJ_64 && s->size == 8) ? IRT_P64 : IRT_P32;
|
||||||
sp = emitir(IRT(IR_XLOAD, t), sp, 0);
|
sp = emitir(IRT(IR_XLOAD, t), sp, 0);
|
||||||
} else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) {
|
} else if (ctype_isrefarray(sinfo) || ctype_isstruct(sinfo)) {
|
||||||
|
cts->L = J->L;
|
||||||
sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */
|
sid = lj_ctype_intern(cts, CTINFO_REF(sid), CTSIZE_PTR); /* Create ref. */
|
||||||
} else if (ctype_iscomplex(sinfo)) {
|
} else if (ctype_iscomplex(sinfo)) {
|
||||||
IRType t = s->size == 2*sizeof(double) ? IRT_NUM : IRT_CDATA;
|
IRType t = s->size == 2*sizeof(double) ? IRT_NUM : IRT_CDATA;
|
||||||
|
@ -266,6 +266,10 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd)
|
|||||||
recff_nyiu(J); /* Would need an inverted STRTO for this case. */
|
recff_nyiu(J); /* Would need an inverted STRTO for this case. */
|
||||||
tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0);
|
tr = emitir(IRTG(IR_STRTO, IRT_NUM), tr, 0);
|
||||||
}
|
}
|
||||||
|
#if LJ_HASFFI
|
||||||
|
} else if (tref_iscdata(tr)) {
|
||||||
|
recff_nyiu(J);
|
||||||
|
#endif
|
||||||
} else {
|
} else {
|
||||||
tr = TREF_NIL;
|
tr = TREF_NIL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user