mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Avoid tracing the nil return case of tonumber().
This commit is contained in:
parent
d87cb5b526
commit
6e6034e809
@ -1237,8 +1237,12 @@ static void LJ_FASTCALL recff_tonumber(jit_State *J, RecordFFData *rd)
|
|||||||
if (!tref_isk(base) || IR(tref_ref(base))->i != 10)
|
if (!tref_isk(base) || IR(tref_ref(base))->i != 10)
|
||||||
recff_nyiu(J);
|
recff_nyiu(J);
|
||||||
}
|
}
|
||||||
if (tref_isstr(tr))
|
if (tref_isstr(tr)) {
|
||||||
|
TValue tmp;
|
||||||
|
if (!lj_str_tonum(strV(&rd->argv[0]), &tmp))
|
||||||
|
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);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
tr = TREF_NIL;
|
tr = TREF_NIL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user