summaryrefslogtreecommitdiff
path: root/test/binaryen.js/kitchen-sink.js
diff options
context:
space:
mode:
authorDaniel Wirtz <dcode@dcode.io>2017-11-15 18:55:50 +0100
committerAlon Zakai <alonzakai@gmail.com>2017-11-15 09:55:50 -0800
commitdc0cd445c08ede80fa2b1747cffcd2254c97a0f6 (patch)
treedea167a459ceab94c64aa947eae7a2c90db12552 /test/binaryen.js/kitchen-sink.js
parent4deed1eb310993391fa0e7e06a18cf2303674f98 (diff)
downloadbinaryen-dc0cd445c08ede80fa2b1747cffcd2254c97a0f6.tar.gz
binaryen-dc0cd445c08ede80fa2b1747cffcd2254c97a0f6.tar.bz2
binaryen-dc0cd445c08ede80fa2b1747cffcd2254c97a0f6.zip
Add const expression utilities to binaryen-c/.js (#1288)
Diffstat (limited to 'test/binaryen.js/kitchen-sink.js')
-rw-r--r--test/binaryen.js/kitchen-sink.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/binaryen.js/kitchen-sink.js b/test/binaryen.js/kitchen-sink.js
index 234cac1fe..bd55dc8a0 100644
--- a/test/binaryen.js/kitchen-sink.js
+++ b/test/binaryen.js/kitchen-sink.js
@@ -213,6 +213,10 @@ function test_core() {
console.log("getExpressionId=" + Binaryen.getExpressionId(valueList[3]));
console.log("getExpressionType=" + Binaryen.getExpressionType(valueList[3]));
console.log(Binaryen.emitText(valueList[3])); // test printing a standalone expression
+ console.log(Binaryen.getConstValueI32(module.i32.const(5)));
+ console.log(Binaryen.getConstValueI64(module.i64.const(6, 7)));
+ console.log(Binaryen.getConstValueF32(module.f32.const(8.5)));
+ console.log(Binaryen.getConstValueF64(module.f64.const(9.5)));
// Make the main body of the function. and one block with a return value, one without
var value = module.block("the-value", valueList);