Closed
Bug 922028
Opened 11 years ago
Closed 11 years ago
Only intern iterator result object shapes in compileAndGo mode
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla27
People
(Reporter: wingo, Assigned: wingo)
References
Details
Attachments
(1 file)
4.79 KB,
patch
|
jorendorff
:
review+
|
Details | Diff | Splinter Review |
Language constructs that return { value, done } iterator result should only pre-intern a shape when compileAndGo mode is on. Background: I was fixing up the addon sdk for new-style for-of iteration, and in doing so added a star generator to one of their files. It failed to XDR; see bug 907077 comment 49. When encoding the script, an assertion failed: that the script's object vector only holds functions or static block objects. Some GDB showed that the object that it failed on was an interned object literal shape. A long debugging session later, and it turned out that the bytecode was at fault (!).
Assignee | ||
Updated•11 years ago
|
Summary: Fix compilation of ES6 iterators in non-compileAndGo mode → Only intern iterator result object shapes in compileAndGo mode
Assignee | ||
Comment 1•11 years ago
|
||
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → wingo
Assignee | ||
Updated•11 years ago
|
Attachment #811955 -
Flags: review?(jorendorff)
Comment 2•11 years ago
|
||
Comment on attachment 811955 [details] [diff] [review] Only intern iterator result object shapes in compileAndGo mode Review of attachment 811955 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/frontend/BytecodeEmitter.cpp @@ +1849,5 @@ > > static bool > EmitPrepareIteratorResult(ExclusiveContext *cx, BytecodeEmitter *bce) > { > + if (bce->script->compileAndGo) { Note: We are trying to get rid of the compileAndGo flag, adding more differences is probably not the good way to fix that.
Assignee | ||
Comment 3•11 years ago
|
||
(In reply to Nicolas B. Pierron [:nbp] from comment #2) > Comment on attachment 811955 [details] [diff] [review] > Only intern iterator result object shapes in compileAndGo mode > > Review of attachment 811955 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/src/frontend/BytecodeEmitter.cpp > @@ +1849,5 @@ > > > > static bool > > EmitPrepareIteratorResult(ExclusiveContext *cx, BytecodeEmitter *bce) > > { > > + if (bce->script->compileAndGo) { > > Note: We are trying to get rid of the compileAndGo flag, adding more > differences is probably not the good way to fix that. I'm sympathetic, but the behavior difference is rooted in XDRScript. Without this change, XDRScript will core when serializing star generators. this change brings the iterator result creation code in line with other object literal creation code.
Comment 4•11 years ago
|
||
Right. nbp, the code Andy is adding only *looks* like a special case. It is actually simply the implication of an existing difference between CNG and other code, and I'm sure removing it will be straightforward once the existing difference is fixed.
Comment 5•11 years ago
|
||
Comment on attachment 811955 [details] [diff] [review] Only intern iterator result object shapes in compileAndGo mode Review of attachment 811955 [details] [diff] [review]: ----------------------------------------------------------------- Looks good. Thanks.
Attachment #811955 -
Flags: review?(jorendorff) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 6•11 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/6682ed134766
Keywords: checkin-needed
Comment 7•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/6682ed134766
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla27
You need to log in
before you can comment on or make changes to this bug.
Description
•