Closed
Bug 1525331
Opened 5 years ago
Closed 5 years ago
ParseNode::pn_type should be const
Categories
(Core :: JavaScript Engine, enhancement)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla67
Tracking | Status | |
---|---|---|
firefox67 | --- | fixed |
People
(Reporter: khyperia, Assigned: khyperia)
Details
Attachments
(2 files)
We shouldn't be doing in-place mutations of parsenodes. It's spooky and bad and prevents a lot of improvements to code.
Next steps after making pn_type
const is to remove the ParseNode
union and rather store fields on the ParseNode
classes themselves. We then would be able to have variable-sized allocations, which will likely at least offset any losses introduced in this patch due to allocating more in the constant folder.
Assignee | ||
Comment 1•5 years ago
|
||
Assignee | ||
Comment 2•5 years ago
|
||
Assignee | ||
Comment 3•5 years ago
|
||
Tacked on the Next steps
described in the first comment, just to keep things rolling. Feel free to review only the first patch and I can pull the second patch into its own bug.
Pushed by ahauck@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/aba804ffb8e8 Make ParseNode::pn_type const. r=jorendorff https://hg.mozilla.org/integration/autoland/rev/a226aae4349f Move fields from union to individual subclasses. r=jorendorff
Comment 5•5 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/aba804ffb8e8
https://hg.mozilla.org/mozilla-central/rev/a226aae4349f
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox67:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
You need to log in
before you can comment on or make changes to this bug.
Description
•