mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Allow hole-filling JSOP_SETELEM to remain on trace.
This commit is contained in:
parent
04ae2a44d4
commit
1c4f82c592
@ -1226,11 +1226,12 @@ bool TraceRecorder::JSOP_SETELEM()
|
||||
/* get us the address of the array slot */
|
||||
LIns* addr = lir->ins2(LIR_add, dslots_ins,
|
||||
lir->ins2i(LIR_lsh, idx_ins, sizeof(jsval) == 4 ? 2 : 3));
|
||||
/* if the current value is a hole, abort */
|
||||
if (obj->dslots[idx] == JSVAL_HOLE)
|
||||
return false;
|
||||
LIns* oldval = lir->insLoad(LIR_ld, addr, 0);
|
||||
guard(false, lir->ins2(LIR_eq, oldval, lir->insImmPtr((void*)JSVAL_HOLE)));
|
||||
LIns* isHole = lir->ins2(LIR_eq, oldval, lir->insImmPtr((void*)JSVAL_HOLE));
|
||||
LIns* count = lir->insLoadi(obj_ins,
|
||||
offsetof(JSObject, fslots[JSSLOT_ARRAY_COUNT]));
|
||||
lir->insStorei(lir->ins2(LIR_add, count, isHole), obj_ins,
|
||||
offsetof(JSObject, fslots[JSSLOT_ARRAY_COUNT]));
|
||||
/* ok, box the value we are storing, store it and we are done */
|
||||
LIns* v_ins = get(&v);
|
||||
if (isInt(v))
|
||||
|
Loading…
Reference in New Issue
Block a user