Closed
Bug 627859
Opened 14 years ago
Closed 13 years ago
Use the standard placeholder-making function when re-scoping variable references in generator 'yield' expressions
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla8
People
(Reporter: jimb, Assigned: jimb)
References
Details
(Whiteboard: fixed-in-tracemonkey)
Attachments
(1 file, 1 obsolete file)
CompExprTransplanter::transplant does a bunch of bespoke pointer-fiddling
to take the free variable references in the 'yield' expression and re-scope
them within the comprehension tail clauses.
Bug 576847 corrected the way this code incorrectly constructed placeholders for function references, but it would also work to simply use the same placeholder construction function everybody else does.
Assignee | ||
Comment 1•14 years ago
|
||
CompExprTransplanter::transplant did a bunch of bespoke pointer-fiddling to
take the free variable references in the 'yield' expression and re-scope
them within the comprehension tail clauses. That code incorrectly
constructed placeholders for function references; this was fixed in bug 576847.
However, it would also work to simply use the same placeholder construction
function everybody else does. This patch makes it so.
Assignee: general → jimb
Assignee | ||
Comment 2•14 years ago
|
||
Refreshed and re-tested for current TM.
Attachment #505940 -
Attachment is obsolete: true
Attachment #519746 -
Flags: review?(brendan)
Comment 3•13 years ago
|
||
Comment on attachment 519746 [details] [diff] [review]
Use the standard placeholder-making function when re-scoping variable references in generator 'yield' expressions.
Sorry, thought I r+'ed this already a while ago.
/be
Attachment #519746 -
Flags: review?(brendan) → review+
Assignee | ||
Comment 4•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/756abc094eb1
Adapted to latest sources.
Also, the original patch failed to correctly flatten the nested 'if's, and would move placeholders from outside the comprehension into the comprehension's lexdeps table. Added a test to catch this case, and fixed the problem.
Whiteboard: fixed-in-tracemonkey
Comment 5•13 years ago
|
||
cdleary-bot mozilla-central merge info:
http://hg.mozilla.org/mozilla-central/rev/756abc094eb1
Updated•13 years ago
|
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
You need to log in
before you can comment on or make changes to this bug.
Description
•