diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-07-24 23:57:04 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-24 23:57:04 -0700 |
commit | 443c0069df34bac9640ed75e396c8b76d3870ae0 (patch) | |
tree | 95869cd8599bf83689b7329a5ecc180622091a17 /test/binaryen.js/kitchen-sink.js | |
parent | 7bf827d38eb710069662b99eed6ba9ece20775c1 (diff) | |
download | binaryen-443c0069df34bac9640ed75e396c8b76d3870ae0.tar.gz binaryen-443c0069df34bac9640ed75e396c8b76d3870ae0.tar.bz2 binaryen-443c0069df34bac9640ed75e396c8b76d3870ae0.zip |
More push/pop support (#2260)
This adds
- `push`/`pop` support for other types: v128 and exnref
- `push`/`pop` support for binaryen.js
Because binaryen.js follows Binaryen's AST structure, without `pop` in
binaryen.js, EH instructions cannot be represented in binaryen.js.
Diffstat (limited to 'test/binaryen.js/kitchen-sink.js')
-rw-r--r-- | test/binaryen.js/kitchen-sink.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js index 2723be7cb..1fde6222e 100644 --- a/test/binaryen.js/kitchen-sink.js +++ b/test/binaryen.js/kitchen-sink.js @@ -111,6 +111,8 @@ function test_ids() { console.log("DataDropId: " + Binaryen.DataDropId); console.log("MemoryCopyId: " + Binaryen.MemoryCopyId); console.log("MemoryFillId: " + Binaryen.MemoryFillId); + console.log("PushId: " + Binaryen.PushId); + console.log("PopId: " + Binaryen.PopId); } function test_core() { @@ -399,6 +401,13 @@ function test_core() { // Tail Call module.returnCall("kitchen()sinker", [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], Binaryen.i32), module.returnCallIndirect(makeInt32(2449), [ makeInt32(13), makeInt64(37, 0), makeFloat32(1.3), makeFloat64(3.7) ], "iiIfF"), + // Push and pop + module.push(module.i32.pop()), + module.push(module.i64.pop()), + module.push(module.f32.pop()), + module.push(module.f64.pop()), + module.push(module.v128.pop()), + module.push(module.exnref.pop()), // TODO: Host module.nop(), module.unreachable(), |