Skip to content

Commit

Permalink
more comments
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake committed Mar 5, 2024
1 parent 0599763 commit a935e35
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/engine/wazevo/frontend/frontend.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ type Compiler struct {
knownSafeBounds [] /* ssa.ValueID to */ knownSafeBound
knownSafeBoundsSet []ssa.ValueID

knownSafeBoundsAtTheEndOfBlocks [] /* ssa.ValueID to */ knownSafeBoundsAtTheEndOfBlock
knownSafeBoundsAtTheEndOfBlocks [] /* ssa.BlockID to */ knownSafeBoundsAtTheEndOfBlock
varLengthKnownSafeBoundWithIDPool wazevoapi.VarLengthPool[knownSafeBoundWithID]

execCtxPtrValue, moduleCtxPtrValue ssa.Value
Expand Down
3 changes: 3 additions & 0 deletions internal/engine/wazevo/frontend/lower.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ func (c *Compiler) lowerBody(entryBlk ssa.BasicBlock) {
c.lowerCurrentOpcode()
blkAfterLowering := c.ssaBuilder.CurrentBlock()
if blkBeforeLowering != blkAfterLowering {
// In Wasm, once a block exits, that means we've done compiling the block.
// Therefore, we finalize the known bounds at the end of the block for the exiting block.
c.finalizeKnownSafeBoundsAtTheEndOfBlock(blkBeforeLowering.ID())
// After that, we initialize the known bounds for the new compilation target block.
c.initializeCurrentBlockKnownBounds()
}
}
Expand Down

0 comments on commit a935e35

Please sign in to comment.