diff options
author | Heejin Ahn <aheejin@gmail.com> | 2019-12-30 17:55:20 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-30 17:55:20 -0800 |
commit | bcc76146fed433cbc8ba01a9f568d979c145110b (patch) | |
tree | ab70ad24afc257b73513c3e62f3aab9938d05944 /test/binaryen.js/push-pop.js | |
parent | a30f1df5696ccb3490e2eaa3a9ed5e7e487c7b0e (diff) | |
download | binaryen-bcc76146fed433cbc8ba01a9f568d979c145110b.tar.gz binaryen-bcc76146fed433cbc8ba01a9f568d979c145110b.tar.bz2 binaryen-bcc76146fed433cbc8ba01a9f568d979c145110b.zip |
Add support for reference types proposal (#2451)
This adds support for the reference type proposal. This includes support
for all reference types (`anyref`, `funcref`(=`anyfunc`), and `nullref`)
and four new instructions: `ref.null`, `ref.is_null`, `ref.func`, and
new typed `select`. This also adds subtype relationship support between
reference types.
This does not include table instructions yet. This also does not include
wasm2js support.
Fixes #2444 and fixes #2447.
Diffstat (limited to 'test/binaryen.js/push-pop.js')
-rw-r--r-- | test/binaryen.js/push-pop.js | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/binaryen.js/push-pop.js b/test/binaryen.js/push-pop.js index 01d6e76a9..2b50b2dca 100644 --- a/test/binaryen.js/push-pop.js +++ b/test/binaryen.js/push-pop.js @@ -26,7 +26,9 @@ function test() { module.push(module.f32.pop()), module.push(module.f64.pop()), module.push(module.v128.pop()), + module.push(module.funcref.pop()), module.push(module.anyref.pop()), + module.push(module.nullref.pop()), module.push(module.exnref.pop()) ] ) @@ -40,7 +42,9 @@ function test() { console.log("getExpressionInfo(f32.pop) = " + stringify(module.f32.pop())); console.log("getExpressionInfo(f64.pop) = " + stringify(module.f64.pop())); console.log("getExpressionInfo(v128.pop) = " + stringify(module.v128.pop())); + console.log("getExpressionInfo(funcref.pop) = " + stringify(module.funcref.pop())); console.log("getExpressionInfo(anyref.pop) = " + stringify(module.anyref.pop())); + console.log("getExpressionInfo(nullref.pop) = " + stringify(module.nullref.pop())); console.log("getExpressionInfo(exnref.pop) = " + stringify(module.exnref.pop())); console.log("getExpressionInfo(push) = " + stringify(module.push(module.i32.const(0)))); } |