Closed
Bug 899296
Opened 11 years ago
Closed 11 years ago
Frontend: Parser no longer desugars foo["ab"] to foo.ab
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
Tracking | Status | |
---|---|---|
firefox24 | --- | unaffected |
firefox25 | + | fixed |
firefox26 | --- | fixed |
People
(Reporter: efaust, Assigned: jorendorff)
References
Details
(Keywords: regression)
Attachments
(2 files)
69 bytes,
text/plain
|
Details | |
809 bytes,
patch
|
jorendorff
:
review+
akeybl
:
approval-mozilla-beta+
|
Details | Diff | Splinter Review |
Test case above yields 00000: this 00001: string "ab" 00006: getelem 00007: pop 00008: this 00009: string "a" 00014: string "b" 00019: add 00020: getelem 00021: pop 00022: stop on inbound tip.
Comment 1•11 years ago
|
||
Seems to be OK on Aurora 24, so nightly-only regression so far.
tracking-firefox25:
--- → ?
Keywords: regression
Comment 2•11 years ago
|
||
Bisect says: The first bad revision is: changeset: 137884:32c80f595de5 user: Jason Orendorff <jorendorff@mozilla.com> date: Wed Jul 10 08:14:02 2013 -0500 summary: Bug 844805, part 3 - Remove a call to FoldConstants from Parser::memberExpr. r=Waldo.
Blocks: 844805
Comment 3•11 years ago
|
||
Note that that's the regressing changeset for both the "ab" and "a" + "b" versions of the test...
Comment 4•11 years ago
|
||
This is interesting. Consider this testcase: var x = 'obj["a" + "b"]; obj["cd"];'; var f = new Function(x); dis(f); this outputs: main: 00000: getgname "obj" 00005: getprop "ab" 00010: pop 00011: getgname "obj" 00016: getprop "cd" 00021: pop 00022: stop but an actual function expression being parsed normally ends up with getelem calls!
Comment 5•11 years ago
|
||
The PNK_ELEM case in Fold() that bug 844805 added is not reached at all for the normal function case, as far as I can tell. If I turn off lazy parsing, then I get the bytecode I expect getting emitted. I don't see frontend::CompileLazyFunction doing any FoldConstants. Should it be?
Comment 6•11 years ago
|
||
Attachment #782913 -
Flags: feedback?(jorendorff)
Comment 7•11 years ago
|
||
Er, I suppose with null() instead of NULL.
Assignee | ||
Comment 8•11 years ago
|
||
The first bad revision is: changeset: 137884:32c80f595de5 user: Jason Orendorff <jorendorff@mozilla.com> date: Wed Jul 10 08:14:02 2013 -0500 summary: Bug 844805, part 3 - Remove a call to FoldConstants from Parser::memberExpr. r=Waldo. Darn it.
Assignee | ||
Updated•11 years ago
|
Assignee: general → jorendorff
Assignee | ||
Comment 9•11 years ago
|
||
Comment on attachment 782913 [details] [diff] [review] Is this at all a sane thing to do? Review of attachment 782913 [details] [diff] [review]: ----------------------------------------------------------------- Clearing feedback flag. This is the right idea, but the actual FoldConstants call should go in BytecodeCompiler.cpp, in the interest of consistency. These three entry points to the compiler should each contain one FoldConstants call: - frontend::CompileScript - frontend::CompileLazyFunction - frontend::CompileFunctionBody ...and ideally, nothing else should, parsing and constant folding being two separate passes. Though we're stuck with one or two calls from the parser for the time being. I need to look at it some more.
Attachment #782913 -
Flags: feedback?(jorendorff)
Comment 10•11 years ago
|
||
For what it's worth, I tried putting the FoldConstants in CompileLazyFunction initially. It crashes with a null-deref because the ParseContext that the parser used in standaloneLazyFunction() has gone out of scope so parser.context is null. I agree that it would be nice to not have that dependency.
Comment 11•11 years ago
|
||
Tracking as a regression in 25.
Assignee | ||
Comment 12•11 years ago
|
||
Comment on attachment 782913 [details] [diff] [review] Is this at all a sane thing to do? Review of attachment 782913 [details] [diff] [review]: ----------------------------------------------------------------- Try Servering this patch.
Attachment #782913 -
Flags: review+
Assignee | ||
Comment 13•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/4473d84c6ab6
Comment 14•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/4473d84c6ab6
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
Assignee | ||
Comment 15•11 years ago
|
||
Comment on attachment 782913 [details] [diff] [review] Is this at all a sane thing to do? [Approval Request Comment] Bug caused by (feature/regressing bug #): bug 844805 User impact if declined: JavaScript performance regression going from FF24 to FF25. Testing completed (on m-c, etc.): Landed in m-c 4 days ago. Risk to taking this patch (and alternatives if risky): Low. String or IDL/UUID changes made by this patch: None.
Attachment #782913 -
Flags: approval-mozilla-beta?
Updated•11 years ago
|
Attachment #782913 -
Flags: approval-mozilla-beta? → approval-mozilla-beta+
Comment 16•11 years ago
|
||
https://hg.mozilla.org/releases/mozilla-beta/rev/2def7ab553b5
status-firefox26:
--- → fixed
Assignee | ||
Comment 17•11 years ago
|
||
I'm still getting daily tracking emails about this, but I thought it was done. Please let me know what remains here, or clear the bit.
You need to log in
before you can comment on or make changes to this bug.
Description
•