diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-04-28 14:34:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-28 14:34:25 -0700 |
commit | a88d9b83a4629f4bf4c3b210b07d11d2396c594d (patch) | |
tree | 0df6fa75b22d4eb5a1590e6ee9fe5e6352ace5e4 /test/ctor-eval/just_some.wast.out | |
parent | 5d4f9eb82226acc0fdb5e2dea1a04e17c340c371 (diff) | |
download | binaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.tar.gz binaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.tar.bz2 binaryen-a88d9b83a4629f4bf4c3b210b07d11d2396c594d.zip |
ctor evaller (#982)
Add wasm-ctor-eval, which evaluates functions at compile time - typically static constructor functions - and applies their effects into memory, saving work at startup. If we encounter something we can't evaluate at compile time in our interpreter, stop there.
This is similar to ctor_evaller.py in emscripten (which was for asm.js).
Diffstat (limited to 'test/ctor-eval/just_some.wast.out')
-rw-r--r-- | test/ctor-eval/just_some.wast.out | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/ctor-eval/just_some.wast.out b/test/ctor-eval/just_some.wast.out new file mode 100644 index 000000000..41e3d7338 --- /dev/null +++ b/test/ctor-eval/just_some.wast.out @@ -0,0 +1,24 @@ +(module + (type $0 (func)) + (memory $0 256 256) + (data (i32.const 0) "\00\00\00\00\00\00\00\00\00\00wasa waka waka waka waka") + (export "test1" (func $test1)) + (export "test2" (func $test2)) + (export "test3" (func $test3)) + (func $test1 (type $0) + (nop) + ) + (func $test2 (type $0) + (unreachable) + (i32.store8 + (i32.const 13) + (i32.const 114) + ) + ) + (func $test3 (type $0) + (i32.store8 + (i32.const 13) + (i32.const 113) + ) + ) +) |