summaryrefslogtreecommitdiff
path: root/test/binaryen.js/hello-world.js.txt
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-03-24 15:45:31 -0700
committerGitHub <noreply@github.com>2017-03-24 15:45:31 -0700
commitf1c992f946438ba8785c418e769ee024606fdde0 (patch)
treea2c91c8e21fdddbc22e9455f2c180f446fa4bf70 /test/binaryen.js/hello-world.js.txt
parent7b71bb6b0d3966ce42b631d433c772e24d6e68be (diff)
downloadbinaryen-f1c992f946438ba8785c418e769ee024606fdde0.tar.gz
binaryen-f1c992f946438ba8785c418e769ee024606fdde0.tar.bz2
binaryen-f1c992f946438ba8785c418e769ee024606fdde0.zip
New binaryen.js (#922)
New binaryen.js implementation, based on the C API underneath and with a JS-friendly API on top. See docs under docs/ for API details.
Diffstat (limited to 'test/binaryen.js/hello-world.js.txt')
-rw-r--r--test/binaryen.js/hello-world.js.txt33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/binaryen.js/hello-world.js.txt b/test/binaryen.js/hello-world.js.txt
new file mode 100644
index 000000000..3b0d67f4d
--- /dev/null
+++ b/test/binaryen.js/hello-world.js.txt
@@ -0,0 +1,33 @@
+(module
+ (type $iii (func (param i32 i32) (result i32)))
+ (memory $0 0)
+ (export "adder" (func $adder))
+ (func $adder (type $iii) (param $0 i32) (param $1 i32) (result i32)
+ (return
+ (i32.add
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+ )
+)
+
+optimized:
+
+(module
+ (type $iii (func (param i32 i32) (result i32)))
+ (memory $0 0)
+ (export "adder" (func $adder))
+ (func $adder (type $iii) (param $0 i32) (param $1 i32) (result i32)
+ (i32.add
+ (get_local $0)
+ (get_local $1)
+ )
+ )
+)
+
+binary size: 82
+
+[object WebAssembly.Instance]
+
+an addition: 42