diff options
author | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
---|---|---|
committer | Matt A. Tobin <mattatobin@localhost.localdomain> | 2018-02-02 04:16:08 -0500 |
commit | 5f8de423f190bbb79a62f804151bc24824fa32d8 (patch) | |
tree | 10027f336435511475e392454359edea8e25895d /js/src/jit-test/tests/wasm/unreachable.js | |
parent | 49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff) | |
download | UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip |
Add m-esr52 at 52.6.0
Diffstat (limited to 'js/src/jit-test/tests/wasm/unreachable.js')
-rw-r--r-- | js/src/jit-test/tests/wasm/unreachable.js | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/wasm/unreachable.js b/js/src/jit-test/tests/wasm/unreachable.js new file mode 100644 index 000000000..0bfd90d7e --- /dev/null +++ b/js/src/jit-test/tests/wasm/unreachable.js @@ -0,0 +1,30 @@ +load(libdir + "wasm.js"); + +// In unreachable code, the current design is that validation is disabled, +// meaning we have to have a special mode in the decoder for decoding code +// that won't actually run. + +wasmFullPass(`(module + (func (result i32) + (return (i32.const 42)) + (i32.add (f64.const 1.0) (f32.const 0.0)) + (return (f64.const 2.0)) + (if (f32.const 3.0) (i64.const 2) (i32.const 1)) + (select (f64.const -5.0) (f32.const 2.3) (f64.const 8.9)) + ) + (export "run" 0) +)`, 42); + +wasmFullPass(`(module + (func (result i32) (param i32) + (block + (br_if 1 (i32.const 41) (get_local 0)) + (br 1 (i32.const 42)) + ) + (i32.add (f32.const 0.0) (f64.const 1.0)) + (return (f64.const 2.0)) + (if (f32.const 3.0) (i64.const 2) (i32.const 1)) + (select (f64.const -5.0) (f32.const 2.3) (f64.const 8.9)) + ) + (export "run" 0) +)`, 42, {}, 0); |