Closed
Bug 492996
Opened 16 years ago
Closed 7 years ago
JSParseTrees should be trees
Categories
(Core :: JavaScript Engine, defect, P3)
Core
JavaScript Engine
Tracking
()
RESOLVED
WONTFIX
mozilla1.9.2a1
People
(Reporter: jorendorff, Assigned: jorendorff)
Details
+++ This bug was initially created as a clone of Bug #492714 +++
Walking a parse tree should not visit any node more than once. Currently the syntax
var {x} = obj;
creates a parse node like,
let (x = NameDef('x')) Binary(':', x, x)
Using CloneParseTree I could easily change this to
let (x = NameDef('x'))
Binary(':', x, NameUse(x))
but this isn't clearly better, as now the definition node x has a spurious use.
I think I'll look up what we do for the rhs of `obj.x` and try doing the same here.
Comment 1•16 years ago
|
||
Srsly, what was I thinking? Hack hack hack.
/be
Assignee: general → brendan
Status: NEW → ASSIGNED
Flags: wanted1.9.2?
Keywords: assertion,
regression,
testcase
Priority: -- → P3
Target Milestone: --- → mozilla1.9.2a1
Comment 2•16 years ago
|
||
Oops, didn't mean to steal this if you wanted it, Jason. Please do assign to yourself if that's what you meant at the end of comment 0.
/be
| Assignee | ||
Updated•16 years ago
|
Assignee: brendan → jorendorff
Comment 3•16 years ago
|
||
Bug 496134 comment 26 points to infelicitous PN_NAME arity for destructuring shorthands, e.g. var {x} = {x:42}; where PN_NULLARY would be used for the full var {x:x} = {x:42}. Not sure why this was done. Seems worth minimizing if we can.
/be
| Assignee | ||
Updated•7 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in
before you can comment on or make changes to this bug.
Description
•