Skip to content

Commit

Permalink
a case shows that block can have inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
butterunderflow committed Oct 13, 2024
1 parent 87db8a2 commit 24d3070
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions benchmarks/wasm/block.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
(module
(func $test_block (param i32 i32 i32) (result i32)
local.get 0
local.get 1
local.get 2
block (param i32 i32 i32) (result i32 i32)
i32.add
end
i32.add
)

(func $real_main (result i32)
i32.const 1
i32.const 3
i32.const 5
call $test_block
)
(export "real_main" (func $real_main))
)
2 changes: 2 additions & 0 deletions src/test/scala/genwasym/TestEval.scala
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ class TestEval extends FunSuite {
}
}

test("block") { testFile("./benchmarks/wasm/block.wat", Some("$real_main"), Some(9)) }

// FIXME:
//test("tribonacci-ret") { testFile("./benchmarks/wasm/tribonacci_ret.wat", None, Some(504)) }

Expand Down

0 comments on commit 24d3070

Please sign in to comment.