Closed
Bug 1595699
Opened 5 years ago
Closed 5 years ago
Bytecode emitter cleanup after bug 1595476
Categories
(Core :: JavaScript Engine, task, P2)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
People
(Reporter: jandem, Unassigned)
References
Details
After bug 1595476 lands we can simplify the frontend a bit:
- We can remove some of the source notes used by IonControlFlow that we no longer need.
- We can simplify how
continue
s are handled. Bug 1595476 changes the bytecode for them in while/for-in/for-of loops to be more similar to other loops, but we can avoid the new JSOP_JUMPTARGET if there are no continues and clean up continue-handling a bit more.
Comment 1•5 years ago
|
||
Some things I'm interested in exploring here:
- Wrap uses of
IonBuilder::current
with helpful functions that are more descriptive. The notion of current==nullptr meaning deadcode isn't well explained to new readers. - I find some names around PendingBlock to be a bit confusing. It doesn't convey that these well that these are source edges
- Factor out the giant #if DEBUG blocks in builder code to helper functions
- Remove the NOPs for loops and adjust the source notes. This should give more consistency
- Can
loopDepth
be replaced by just checking loopstack size? - The IonBuilder::startLoop nextPC update should be unconditional after we remove NOP for loops
- Explore moving loop condition blocks to start of loop so that we only process bytecode forward
- Can we make it a strict invariant that LOOPHEAD is the only backedge?
- Do we need to still need JUMPTARGET for the fallthrough of a conditional branch?
- We need an SMDOC for the overall cfg builder. The visitJumpTarget code is such a key part, but it is undersold
Updated•5 years ago
|
Priority: -- → P2
Reporter | ||
Comment 2•5 years ago
|
||
(In reply to Ted Campbell [:tcampbell] from comment #1)
Some things I'm interested in exploring here:
- Can
loopDepth
be replaced by just checking loopstack size?
I considered this but they're not equivalent when inlining: each builder then has its own loopStack_ and loopDepth_ is the sum of those...
Reporter | ||
Updated•5 years ago
|
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•