Status

()

enhancement
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: jorendorff, Assigned: khyperia)

Tracking

unspecified
mozilla66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox66 fixed)

Details

Attachments

(2 attachments)

Reporter

Description

6 months ago
Split off from bug 1512428 comment 2:

- Rename all ParseNodeKinds that are expressions
  to have names that end with Expr, and all statements to end in Stmt.
  (For now, make an exception for Function and Class, which can occur as either
  declarations or expressions.) Also Star -> MulExpr.

- In a separate changeset, change FOR_EACH_PARSE_NODE_KIND to use a class name
  (like TernaryNode) instead of an arity enum (like PN_TERNARY) as the second argument.
  Each class will have to have something like `static constexpr TernaryNode::arity()`,
  not a big deal. Then move `ParseNodeVisitor::visit_PN_TERNARY_children(ParseNode*& pn)`
  to `TernaryNode::visitChildren<V>(V&)`, and likewise for the other visit_*_children
  methods. This should make some of the `unsafe{Kid,Left,Right,Kid2,Kid3,Blah}Reference()`
  methods unnecessary.
Assignee

Updated

6 months ago
Assignee: nobody → khyperia
Status: NEW → ASSIGNED

Comment 3

6 months ago
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e69ec9477ef8
Rename ParseNodeKinds to end with Stmt or Expr. r=jorendorff
https://hg.mozilla.org/integration/autoland/rev/bab13130b3f0
Change FOR_EACH_PARSE_NODE_KIND to use type instead of arity. r=jorendorff

Comment 4

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e69ec9477ef8
https://hg.mozilla.org/mozilla-central/rev/bab13130b3f0
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
Assignee

Comment 6

6 months ago
Quick note: The issue was in the base bug this patch is based off of ( https://bugzilla.mozilla.org/show_bug.cgi?id=1512428 ) so I'm going to land these again with the fix for the base bug. (The try run I mention in the other thread's comments includes these patches).
Flags: needinfo?(khyperia)
Depends on: 1515086

Comment 7

6 months ago
Pushed by ahauck@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6356c45cfbb7
Rename ParseNodeKinds to end with Stmt or Expr. r=jorendorff
https://hg.mozilla.org/integration/autoland/rev/598f93e37949
Change FOR_EACH_PARSE_NODE_KIND to use type instead of arity. r=jorendorff

Comment 8

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6356c45cfbb7
https://hg.mozilla.org/mozilla-central/rev/598f93e37949
Status: REOPENED → RESOLVED
Closed: 6 months ago6 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in before you can comment on or make changes to this bug.