diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-05-22 13:19:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-22 13:19:47 -0700 |
commit | bb0ff51597f254ab199f8ad5b63de7a4bbca2c17 (patch) | |
tree | 2932c64f443ec7a36385c0ac96e865d0a9d8c53b /test/binaryen.js/push-pop.js | |
parent | c193e5727d541ad04bb1601da92f2a86ae959cc8 (diff) | |
download | binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.tar.gz binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.tar.bz2 binaryen-bb0ff51597f254ab199f8ad5b63de7a4bbca2c17.zip |
Remove `Push` (#2867)
Push and Pop have been superseded by tuples for their original
intended purpose of supporting multivalue. Pop is still used to
represent block arguments for exception handling, but there are no
plans to use Push for anything now or in the future.
Diffstat (limited to 'test/binaryen.js/push-pop.js')
-rw-r--r-- | test/binaryen.js/push-pop.js | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/test/binaryen.js/push-pop.js b/test/binaryen.js/push-pop.js deleted file mode 100644 index 042ed17d6..000000000 --- a/test/binaryen.js/push-pop.js +++ /dev/null @@ -1,43 +0,0 @@ -function cleanInfo(info) { - var ret = {}; - for (var x in info) { - if (x !== 'value') { - ret[x] = info[x]; - } - } - return ret; -} - -function stringify(expr) { - return JSON.stringify(cleanInfo(binaryen.getExpressionInfo(expr))); -} - -var module = new binaryen.Module(); - -var func = module.addFunction("func", binaryen.none, binaryen.none, [], - module.block(null, [ - 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.funcref.pop()), - module.push(module.anyref.pop()), - module.push(module.nullref.pop()), - module.push(module.exnref.pop()) - ]) -) - -assert(module.validate()); -console.log(module.emitText()); - -console.log("getExpressionInfo(i32.pop) = " + stringify(module.i32.pop())); -console.log("getExpressionInfo(i64.pop) = " + stringify(module.i64.pop())); -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)))); |