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)
Tracking
()
RESOLVED
FIXED
People
(Reporter: bzbarsky, Assigned: bzbarsky)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file)
(deleted),
patch
|
brendan
:
review+
|
Details | Diff | 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 1•15 years ago
|
||
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 2•15 years ago
|
||
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
Assignee | ||
Comment 3•15 years ago
|
||
Pushed http://hg.mozilla.org/tracemonkey/rev/cb28c344ec56 with the nits fixed
Whiteboard: fixed-in-tracemonkey
Comment 5•15 years ago
|
||
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.
Description
•