wazeroir: rm nullary Operations, move interpreterOp to UnionOperation (#1310)

Signed-off-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
This commit is contained in:
Edoardo Vacchi
2023-03-30 09:57:41 +02:00
committed by GitHub
parent 035c0ffaf4
commit 37135067b6
7 changed files with 708 additions and 822 deletions

View File

@@ -189,8 +189,8 @@ func TestCompile(t *testing.T) {
},
expected: &CompilationResult{
Operations: []Operation{ // begin with params: [$delta]
OperationPick{Depth: 0}, // [$delta, $delta]
OperationMemoryGrow{}, // [$delta, $old_size]
OperationPick{Depth: 0}, // [$delta, $delta]
NewOperationMemoryGrow(), // [$delta, $old_size]
OperationDrop{Depth: &InclusiveRange{Start: 1, End: 1}}, // [$old_size]
OperationBr{Target: Label{Kind: LabelKindReturn}}, // return!
},
@@ -711,7 +711,7 @@ func TestCompile_SignExtensionOps(t *testing.T) {
expected := &CompilationResult{
Operations: []Operation{ // begin with params: [$0]
OperationPick{Depth: 0}, // [$0, $0]
OperationSignExtend32From8{}, // [$0, i32.extend8_s($0)]
NewOperationSignExtend32From8(), // [$0, i32.extend8_s($0)]
OperationDrop{Depth: &InclusiveRange{Start: 1, End: 1}}, // [i32.extend8_s($0)]
OperationBr{Target: Label{Kind: LabelKindReturn}}, // return!
},