Various clean-ups for js/src/frontend
Categories
(Core :: JavaScript Engine, task, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox106 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
References
(Blocks 1 open bug)
Details
Attachments
(24 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Remove unused functions, update some code to C++17, etc.
Assignee | ||
Comment 1•9 months ago
|
||
Assignee | ||
Comment 2•9 months ago
|
||
This allows to call dump()
from contexts where we don't have a parser anymore,
for example from BytecodeEmitter.
Depends on D156432
Assignee | ||
Comment 3•9 months ago
|
||
This avoids some ParseNodeKind::ParamsBody
checks and allows more changes
for the next parts.
Depends on D156434
Assignee | ||
Comment 4•9 months ago
|
||
And update some code which assumed the previous implementation details around
the function body are still present:
ReflectParse:
- Remove duplicate parameter from
functionArgs()
in preparation for the
next part. - Directly access the function body as
LexicalScopeNode
. - Moved
functionArgs()
before theswitch
statement, because it's always
called with the same parameters.
FunctionFormalParametersList()
:
- Moved into AsmJS because it's only used there. Also simplified it slightly.
Depends on D156435
Assignee | ||
Comment 5•9 months ago
|
||
Add a helper to access the function body node.
Depends on D156436
Assignee | ||
Comment 6•9 months ago
|
||
Add a helper to access the function parameters.
Depends on D156437
Assignee | ||
Comment 7•9 months ago
|
||
This is a bit nicer than manually traversing through pn_next
.
Depends on D156438
Assignee | ||
Comment 8•9 months ago
|
||
More changes similar to the last part.
Depends on D156439
Assignee | ||
Comment 9•9 months ago
|
||
Depends on D156440
Assignee | ||
Comment 10•9 months ago
|
||
Drive-by change:
- Remove unnecessary
EMIT_LINENOTE
default parameters.
Depends on D156441
Assignee | ||
Comment 11•9 months ago
|
||
These methods aren't used anymore.
Depends on D156442
Assignee | ||
Comment 12•9 months ago
|
||
Depends on D156443
Assignee | ||
Comment 13•9 months ago
|
||
This gives a bit more type safety at compile-time and lets us remove some
helper functions in the next parts.
Depends on D156444
Assignee | ||
Comment 14•9 months ago
|
||
This function isn't used anymore after the last part except for a single
assertion.
Depends on D156445
Assignee | ||
Comment 15•9 months ago
|
||
Remove the direct access to the BytecodeEmitter::parser
in preparation for
the next parts.
Depends on D156446
Assignee | ||
Comment 16•9 months ago
|
||
Change BCEParserHandle
with ErrorReporter
member, because we only need
the ErrorReporter
methods.
Drive-by change:
- Simplify a constructor to only pass the relevant arguments.
Depends on D156447
Assignee | ||
Comment 17•9 months ago
|
||
We don't need this abstraction anymore.
Depends on D156448
Assignee | ||
Comment 18•9 months ago
|
||
Make all ErrorReporter
methods const
in preparation for the next part.
Depends on D156449
Assignee | ||
Comment 19•9 months ago
|
||
Using a reference avoids some extra setup code.
Depends on D156450
Assignee | ||
Comment 20•9 months ago
|
||
Depends on D156451
Assignee | ||
Comment 21•9 months ago
|
||
Using lambda functions allows to remove extra code.
Depends on D156452
Assignee | ||
Comment 22•9 months ago
|
||
InitExpr
can't occur in this context.
Depends on D156453
Assignee | ||
Comment 23•9 months ago
|
||
It's confusing to create an AssignmentNode
which doesn't pass the
is<AssignmentNode>()
test.
Depends on D156454
Assignee | ||
Comment 24•9 months ago
|
||
Drive-by change:
- Remove unused
prependAndUpdatePos
method
Depends on D156455
Comment 25•9 months ago
|
||
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/f58446bee033 Part 1: Add two missing cases for script flags dump. r=arai https://hg.mozilla.org/integration/autoland/rev/98295959abc4 Part 2: Change ParseNode::dump() to accept ParserAtomsTable instead of ParserBase. r=arai https://hg.mozilla.org/integration/autoland/rev/f9222fee2d8d Part 3: Add a separate ParseNode type for ParamsBody. r=arai https://hg.mozilla.org/integration/autoland/rev/7bdd388b64d0 Part 4: Correct descriptions of Function and ParamsBody nodes. r=arai https://hg.mozilla.org/integration/autoland/rev/12c3dbf79386 Part 5: Add ParamsBodyNode::body(). r=arai https://hg.mozilla.org/integration/autoland/rev/26765b9912eb Part 6: Add ParamsBodyNode::parameters(). r=arai https://hg.mozilla.org/integration/autoland/rev/929247c8da95 Part 7: Use range-based for-loops for array byte code emission. r=arai https://hg.mozilla.org/integration/autoland/rev/253d94a7d37d Part 8: Use range-based for-loops for remaining cases. r=arai https://hg.mozilla.org/integration/autoland/rev/8034afec3002 Part 9: Remove duplicate updateSourceCoordNotes call. r=arai https://hg.mozilla.org/integration/autoland/rev/aeae85054fcb Part 10: Make emitArray() less branchy for Spread expressions. r=arai https://hg.mozilla.org/integration/autoland/rev/cd0461cc27db Part 11: Remove unused ErrorReporter methods. r=arai https://hg.mozilla.org/integration/autoland/rev/5801438ffb41 Part 12: Remove unused BCEParserHandle methods. r=arai https://hg.mozilla.org/integration/autoland/rev/a34ac5290669 Part 13: Add a separate ParseNode type for declaration lists. r=arai https://hg.mozilla.org/integration/autoland/rev/0ce5e30616aa Part 14: Remove BCEParserHandle::astGenerator(). r=arai https://hg.mozilla.org/integration/autoland/rev/dc214bb8e2bb Part 15: Add BytecodeEmitter::errorReporter(). r=arai https://hg.mozilla.org/integration/autoland/rev/796769160dc7 Part 16: Remove BytecodeEmitter::parser member. r=arai https://hg.mozilla.org/integration/autoland/rev/1f7c7051aec9 Part 17: Remove BCEParserHandle. r=arai https://hg.mozilla.org/integration/autoland/rev/3b19b19ff38b Part 18: Make ErrorReporter methods const. r=arai https://hg.mozilla.org/integration/autoland/rev/7588e7120056 Part 19: Change BytecodeEmitter::errorReporter to a const reference. r=arai https://hg.mozilla.org/integration/autoland/rev/bae5f4d0fd93 Part 20: Remove unused EitherParser methods. r=arai https://hg.mozilla.org/integration/autoland/rev/676813f8d98a Part 21: Simplify matchers in EitherParser. r=arai https://hg.mozilla.org/integration/autoland/rev/0f54fd157566 Part 22: Remove some bogus checks for InitExpr. r=arai https://hg.mozilla.org/integration/autoland/rev/49007d72a1f7 Part 23: Don't use AssignmentNode for InitExpr. r=arai https://hg.mozilla.org/integration/autoland/rev/2de02f478dc9 Part 24: Inline ListNode::makeEmpty(). r=arai
Updated•9 months ago
|
Updated•9 months ago
|
Comment 26•9 months ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/f58446bee033
https://hg.mozilla.org/mozilla-central/rev/98295959abc4
https://hg.mozilla.org/mozilla-central/rev/f9222fee2d8d
https://hg.mozilla.org/mozilla-central/rev/7bdd388b64d0
https://hg.mozilla.org/mozilla-central/rev/12c3dbf79386
https://hg.mozilla.org/mozilla-central/rev/26765b9912eb
https://hg.mozilla.org/mozilla-central/rev/929247c8da95
https://hg.mozilla.org/mozilla-central/rev/253d94a7d37d
https://hg.mozilla.org/mozilla-central/rev/8034afec3002
https://hg.mozilla.org/mozilla-central/rev/aeae85054fcb
https://hg.mozilla.org/mozilla-central/rev/cd0461cc27db
https://hg.mozilla.org/mozilla-central/rev/5801438ffb41
https://hg.mozilla.org/mozilla-central/rev/a34ac5290669
https://hg.mozilla.org/mozilla-central/rev/0ce5e30616aa
https://hg.mozilla.org/mozilla-central/rev/dc214bb8e2bb
https://hg.mozilla.org/mozilla-central/rev/796769160dc7
https://hg.mozilla.org/mozilla-central/rev/1f7c7051aec9
https://hg.mozilla.org/mozilla-central/rev/3b19b19ff38b
https://hg.mozilla.org/mozilla-central/rev/7588e7120056
https://hg.mozilla.org/mozilla-central/rev/bae5f4d0fd93
https://hg.mozilla.org/mozilla-central/rev/676813f8d98a
https://hg.mozilla.org/mozilla-central/rev/0f54fd157566
https://hg.mozilla.org/mozilla-central/rev/49007d72a1f7
https://hg.mozilla.org/mozilla-central/rev/2de02f478dc9
Description
•