Skip to content

Commit

Permalink
only the control flow structure for failed suspend16 test
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuoguo committed Nov 28, 2024
1 parent f2c64bb commit 57e271d
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 4 deletions.
43 changes: 43 additions & 0 deletions benchmarks/wasm/wasmfx/nested_resume-strip.wat
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
(module
(type (;0;) (func))
(type (;1;) (cont 0))
(type (;2;) (func))
(type (;3;) (cont 2))
(type (;4;) (func (param i32)))
(import "spectest" "print_i32" (func (;0;) (type 4)))
(tag (;0;) (type 0))
(export "main" (func 3))
(start 3)
(elem (;0;) declare func 1)
(elem (;1;) declare func 2)
(func (;1;) (type 0)
i32.const 111
call 0
suspend 0
i32.const 333
call 0
)
(func (;2;) (type 0)
i32.const 0
call 0
ref.func 1
cont.new 1
resume 1
i32.const 444
call 0
return
)
(func (;3;) (type 0)
block (result (ref null 3)) ;; label = @1
ref.func 2
cont.new 1
resume 1 (on 0 0 (;@1;))
return
end
i32.const 222
call 0
resume 3
i32.const 555
call 0
)
)
12 changes: 8 additions & 4 deletions src/test/scala/genwasym/TestFx.scala
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,16 @@ class TestFx extends FunSuite {
testFile("./benchmarks/wasm/wasmfx/diff_handler.wast")
}

test("suspend16") {
// TODO: fails this test!!!
// testWastFile("./benchmarks/wasm/wasmfx/suspend16.bin.wast")
testFile("./benchmarks/wasm/wasmfx/suspend16-strip.wast")
test("nested_resume") {
testFile("./benchmarks/wasm/wasmfx/nested_resume-strip.wast")
}

// test("suspend16") {
// // TODO: fails this test!!!
// // testWastFile("./benchmarks/wasm/wasmfx/suspend16.bin.wast")
// testFile("./benchmarks/wasm/wasmfx/suspend16-strip.wast")
// }

// TODO: the following two tests fails
// test("pipes") {
// testFile("./benchmarks/wasm/wasmfx/fun-pipes-strip.wast")
Expand Down

0 comments on commit 57e271d

Please sign in to comment.