Open Bug 1490535 Opened 7 years ago Updated 1 year ago

Add variants of FoldConstants for ParseNode subclasses

Categories

(Core :: JavaScript Engine, enhancement, P3)

enhancement

Tracking

()

People

(Reporter: arai, Unassigned)

References

(Blocks 1 open bug)

Details

In bug 1479659, I'm going to use subclasses in the caller of FoldConstants. given that FoldConstants needs double pointer, we cannot directly pass the subclasses. Also, we already know the possible ParseNodeKind which is the subgroup, we should add variants of FoldConstants which receives subclasses's double pointer. we should add extra assertion to verify each ParseNodeKind matches the ParseNode subclasses, maybe by merging the ParseNodeKind comments and the FOR_EACH_PARSE_NODE_KIND macro.
Severity: normal → S3

Does this still make sense?

Blocks: sm-frontend
Severity: S3 → N/A
Flags: needinfo?(arai.unmht)

Yes, it would be nice to integrate the ParseNode subclasses into FoldConstants and NodeVisitor etc, to avoid misuse and make it easier to reason about.
But not high priority.

Flags: needinfo?(arai.unmht)
You need to log in before you can comment on or make changes to this bug.