Closed Bug 532847 Opened 15 years ago Closed 15 years ago

Can't assert that sprop has a shortid in callProp/setCallProp until we know the prop is special

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: bzbarsky)

References

Details

(Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Attached patch Fix (deleted) — Splinter Review
In particular, have to assert after we might have bailed out on the "can't trace" bits for sprop having the wrong getter/setter.
Attachment #416036 - Flags: review?(brendan)
Comment on attachment 416036 [details] [diff] [review] Fix >- JS_ASSERT(sprop->flags & SPROP_HAS_SHORTID); >- int32 offset = sprop->shortid; >+ int32 offset = uint16(sprop->shortid); I still think we should call this variable "slot", but agree it must be int32. Maybe "dslot_index" would be even better? r=me otherwise, thanks for fixing all this! /be
Attachment #416036 - Flags: review?(brendan) → review+
Comment on attachment 416036 [details] [diff] [review] Fix >@@ -8068,16 +8070,19 @@ TraceRecorder::callProp(JSObject* obj, J > } else if (sprop->getter == js_GetCallVar || > sprop->getter == js_GetCallVarChecked) { > JS_ASSERT(offset < VarClosureTraits::slot_count(obj)); > offset += VarClosureTraits::slot_offset(obj); > } else { > RETURN_STOP("dynamic property of Call object"); > } > >+ // Now assert that our use of sprop->shortid was in fact kosher. >+ JS_ASSERT(sprop->flags & SPROP_HAS_SHORTID); >+ > LIns* base = lir->insLoad(LIR_ldp, obj_ins, offsetof(JSObject, dslots)); > LIns* val_ins = lir->insLoad(LIR_ldp, base, offset * sizeof(jsval)); > ins = unbox_jsval(obj->dslots[offset], val_ins, snapshot(BRANCH_EXIT)); > } > else { Uber-pre-existing-nit: cuddle } with else. /be
Whiteboard: fixed-in-tracemonkey
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: