Closed Bug 1171177 Opened 9 years ago Closed 9 years ago

Try to remove VAROBJFIX and making arbitrary things qualified varobjs

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla41
Tracking Status
firefox41 --- fixed

People

(Reporter: shu, Assigned: shu)

Details

Attachments

(2 files, 2 obsolete files)

See if we still need VAROBJFIX and marking arbitrary scope chains as qualified varobjs in js::Execute.
Attached patch Remove VAROBJFIX. (obsolete) — Splinter Review
Attachment #8620745 - Flags: review?(luke)
Waiting on try here: https://treeherder.mozilla.org/#/jobs?repo=try&revision=b07d0f1606e4 It's possible that XBL field scripts and subscript loader are still relying on their scopes being varobjs, in which case we still can't remove the QUALIFIED_VAROBJ shape flag. It would be very unfortunate if they do.
Well then, that certainly failed spectacularly.
Attachment #8620745 - Flags: review?(luke)
Attachment #8620746 - Flags: review?(luke)
The subscript loader requires its scopes to be varobjs or chrome code breaks, basically. Going to try to make non-syntactic DynamicWithObjects varobjs and see what else breaks.
Attachment #8620745 - Attachment is obsolete: true
Attachment #8621403 - Flags: review?(luke)
Attachment #8620746 - Attachment is obsolete: true
Attachment #8621404 - Flags: review?(luke)
Comment on attachment 8621403 [details] [diff] [review] Remove VAROBJFIX. Review of attachment 8621403 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/jsapi.cpp @@ +3296,5 @@ > return false; > + > + // The XPConnect subscript loader, which may pass in its own dynamic > + // scopes to load scripts in, expects the dynamic scope chain to be a > + // qualified varobj. There is only sadness. Instead of referring to "qualified varobj", how about explaining the expected behavior (w/o any reference to "qualified", since I didn't even know that's what "var a;" was).
Attachment #8621403 - Flags: review?(luke) → review+
Comment on attachment 8621404 [details] [diff] [review] Remove UNQUALIFIED_VAROBJ Shape flags in favor of Class-checking. Review of attachment 8621404 [details] [diff] [review]: ----------------------------------------------------------------- Great! ::: js/src/jsobj.h @@ +219,5 @@ > + // A "qualified" varobj is the object on which "qualified" variable > + // declarations (i.e., those defined with "var") are kept. > + // > + // Conceptually, when a var binding is defined, it is defined on the > + // lowest qualified varobj on the scope chain. This is subject to How about "innermost" instead of "lowest"? @@ +221,5 @@ > + // > + // Conceptually, when a var binding is defined, it is defined on the > + // lowest qualified varobj on the scope chain. This is subject to > + // optimization. Unaliased locals inside functions, for instance, live > + // entirely on the frame. How about explaining a bit more including: - every function scope (CallObject) is a qualified var obj and there can be no more-inner qualified varobj, so all references to local bindings can be statically bound to the function scope. - global scopes are qualified var objs and it is possible to statically know (for a given script) that there are no more-inner qualified varobjs so free variable references can be statically bound to the global.
Attachment #8621404 - Flags: review?(luke) → review+
sorry had to back this out since something in this push caused https://treeherder.mozilla.org/logviewer.html#?job_id=10818914&repo=mozilla-inbound to fail permanently
Thanks for backout, will investigate.
Flags: needinfo?(shu)
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
Assignee: nobody → shu
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 9 years ago9 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: