diff options
author | Alon Zakai <alonzakai@gmail.com> | 2017-09-01 12:34:03 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-01 12:34:03 -0700 |
commit | 6de14693110b4f898344ff1cb383caf0d74eb42e (patch) | |
tree | 6fbcb75fd3c2285191939a086989e14656908282 /test/reduce/memory_table.wast.txt | |
parent | b013f744e3d70effd9be348cbde7fb93f0a16c6a (diff) | |
download | binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.tar.gz binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.tar.bz2 binaryen-6de14693110b4f898344ff1cb383caf0d74eb42e.zip |
wasm-reduce tool (#1139)
Reduce an interesting wasm to a smaller still interesting wasm. This takes an arbitrary command to run, and reduces the wasm as much as it can while keeping the behavior of that command fixed. This can be used to reduce compiler bugs in an arbitrary VM, etc.
Diffstat (limited to 'test/reduce/memory_table.wast.txt')
-rw-r--r-- | test/reduce/memory_table.wast.txt | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/test/reduce/memory_table.wast.txt b/test/reduce/memory_table.wast.txt new file mode 100644 index 000000000..08918c9f3 --- /dev/null +++ b/test/reduce/memory_table.wast.txt @@ -0,0 +1,38 @@ +(module + (type $0 (func (result i32))) + (type $1 (func)) + (table 481 481 anyfunc) + (elem (i32.const 0) $1 $1 $1 $3) + (memory $0 256 256) + (export "f1" (func $2)) + (export "f2" (func $3)) + (export "f4" (func $0)) + (func $0 (type $0) (result i32) + (i32.add + (call_indirect $0 + (i32.const 3) + ) + (call_indirect $0 + (i32.const 0) + ) + ) + ) + (func $1 (type $0) (result i32) + (i32.const 1234) + ) + (func $2 (type $1) + (nop) + ) + (func $3 (type $0) (result i32) + (block $label$0 (result i32) + (i32.store + (i32.const 0) + (i32.const 65530) + ) + (i32.load + (i32.const 0) + ) + ) + ) +) + |