summaryrefslogtreecommitdiff
path: root/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go')
-rw-r--r--vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go19
1 files changed, 18 insertions, 1 deletions
diff --git a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go
index 54ce89e46..9044a9e4b 100644
--- a/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go
+++ b/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/backend/machine.go
@@ -11,7 +11,24 @@ import (
type (
// Machine is a backend for a specific ISA machine.
Machine interface {
- ExecutableContext() ExecutableContext
+ // StartLoweringFunction is called when the compilation of the given function is started.
+ // The maxBlockID is the maximum ssa.BasicBlockID in the function.
+ StartLoweringFunction(maxBlockID ssa.BasicBlockID)
+
+ // LinkAdjacentBlocks is called after finished lowering all blocks in order to create one single instruction list.
+ LinkAdjacentBlocks(prev, next ssa.BasicBlock)
+
+ // StartBlock is called when the compilation of the given block is started.
+ // The order of this being called is the reverse post order of the ssa.BasicBlock(s) as we iterate with
+ // ssa.Builder BlockIteratorReversePostOrderBegin and BlockIteratorReversePostOrderEnd.
+ StartBlock(ssa.BasicBlock)
+
+ // EndBlock is called when the compilation of the current block is finished.
+ EndBlock()
+
+ // FlushPendingInstructions flushes the pending instructions to the buffer.
+ // This will be called after the lowering of each SSA Instruction.
+ FlushPendingInstructions()
// DisableStackCheck disables the stack check for the current compilation for debugging/testing.
DisableStackCheck()