diff --git a/js/src/jit-test/etc/wasm/Makefile b/js/src/jit-test/etc/wasm/Makefile index a30c8368869d..28f39813e4ae 100644 --- a/js/src/jit-test/etc/wasm/Makefile +++ b/js/src/jit-test/etc/wasm/Makefile @@ -7,4 +7,4 @@ update: rm -r ../../tests/wasm/spec cp -R generate-spectests/tests/js ../../tests/wasm/spec echo $(warning) > ../../tests/wasm/spec/README.md - [ ! -d ./spec-tests.patch ] || (cd ../../tests/wasm/spec && patch -u -p7 < ../../../etc/wasm/spec-tests.patch) + [ -f ./spec-tests.patch ] && (cd ../../tests/wasm/spec && patch -u -p7 < ../../../etc/wasm/spec-tests.patch) diff --git a/js/src/jit-test/etc/wasm/generate-spectests/config-lock.toml b/js/src/jit-test/etc/wasm/generate-spectests/config-lock.toml index fc77197474d1..603030c9bf12 100644 --- a/js/src/jit-test/etc/wasm/generate-spectests/config-lock.toml +++ b/js/src/jit-test/etc/wasm/generate-spectests/config-lock.toml @@ -1,18 +1,18 @@ -[[repos]] -name = 'threads' -commit = 'dfdcb81a' - [[repos]] name = 'spec' -commit = 'c9ed6580' +commit = 'ffb5e3b4' + +[[repos]] +name = 'threads' +commit = '85b562cd' [[repos]] name = 'simd' -commit = '1618b39a' +commit = 'a78b98a6' [[repos]] name = 'exception-handling' -commit = '7fcfe173' +commit = '76419ef8' [[repos]] name = 'memory64' diff --git a/js/src/jit-test/etc/wasm/spec-tests.patch b/js/src/jit-test/etc/wasm/spec-tests.patch new file mode 100644 index 000000000000..b9d3f3f82e2a --- /dev/null +++ b/js/src/jit-test/etc/wasm/spec-tests.patch @@ -0,0 +1,90 @@ +# HG changeset patch +# User Lars T Hansen +# Date 1634962581 0 +# Sat Oct 23 04:16:21 2021 +0000 +# Node ID 1342a887d949e1a0f23da8c0421c7bfa46328e92 +# Parent ae6e0144bd5b37d044c34d62fd9d4a449b835a0e +Bug 1737225 - Disable some tests on arm. r=yury + +Disable a partial-oob test on arm/arm64 because some hardware will +perform byte-at-a-time writes at the end of the heap, and we have +not fixed that yet. + +Differential Revision: https://phabricator.services.mozilla.com/D129248 + +diff --git a/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js +--- a/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js ++++ b/js/src/jit-test/tests/wasm/spec/memory64/align64.wast.js +@@ -1445,11 +1445,15 @@ let $24 = instantiate(`(module + ) + )`); + +-// ./test/core/align64.wast:864 +-assert_trap( +- () => invoke($24, `store`, [65532n, -1n]), +- `out of bounds memory access`, +-); ++// Bug 1737225 - do not observe the partial store caused by bug 1666747 on ++// some native platforms. ++if (!partialOobWriteMayWritePartialData()) { ++ // ./test/core/align64.wast:864 ++ assert_trap( ++ () => invoke($24, `store`, [65532n, -1n]), ++ `out of bounds memory access`, ++ ); + +-// ./test/core/align64.wast:866 +-assert_return(() => invoke($24, `load`, [65532n]), [value("i32", 0)]); ++ // ./test/core/align64.wast:866 ++ assert_return(() => invoke($24, `load`, [65532n]), [value("i32", 0)]); ++} +diff --git a/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js b/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js +--- a/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js ++++ b/js/src/jit-test/tests/wasm/spec/memory64/harness/harness.js +@@ -19,6 +19,17 @@ if (!wasmIsSupported()) { + quit(); + } + ++function partialOobWriteMayWritePartialData() { ++ let cfg = getBuildConfiguration(); ++ let arm_native = cfg["arm"] && !cfg["arm-simulator"]; ++ let arm64_native = cfg["arm64"] && !cfg["arm64-simulator"]; ++ return arm_native || arm64_native; ++} ++ ++let cfg = getBuildConfiguration(); ++let native_arm = cfg["arm"] && !cfg["arm-simulator"]; ++let native_arm64 = cfg["arm64"] && !cfg["arm64-simulator"]; ++ + function bytes(type, bytes) { + var typedBuffer = new Uint8Array(bytes); + return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); +diff --git a/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js b/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js +--- a/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js ++++ b/js/src/jit-test/tests/wasm/spec/memory64/memory_trap64.wast.js +@@ -1028,12 +1028,17 @@ assert_trap( + `out of bounds memory access`, + ); + +-// ./test/core/memory_trap64.wast:268 +-assert_return(() => invoke($1, `i64.load`, [65528n]), [ +- value("i64", 7523094288207667809n), +-]); ++// Bug 1737225 - do not observe the partial store caused by bug 1666747 on ++// some native platforms. ++if (!partialOobWriteMayWritePartialData()) { ++ // ./test/core/memory_trap64.wast:268 ++ assert_return(() => invoke($1, `i64.load`, [65528n]), [ ++ value("i64", 7523094288207667809n), ++ ]); + +-// ./test/core/memory_trap64.wast:269 +-assert_return(() => invoke($1, `i64.load`, [0n]), [ +- value("i64", 7523094288207667809n), +-]); ++ // ./test/core/memory_trap64.wast:269 ++ assert_return(() => invoke($1, `i64.load`, [0n]), [ ++ value("i64", 7523094288207667809n), ++ ]); ++} ++ diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/rethrow.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/rethrow.wast.js index 8dae4f452667..83fcd4bf562d 100644 --- a/js/src/jit-test/tests/wasm/spec/exception-handling/rethrow.wast.js +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/rethrow.wast.js @@ -79,37 +79,65 @@ let $0 = instantiate(`(module ) ) ) + + (func (export "rethrow-stack-polymorphism") + (try + (do (throw $$e0)) + (catch $$e0 (i32.const 1) (rethrow 0)) + ) + ) )`); -// ./test/core/rethrow.wast:68 +// ./test/core/rethrow.wast:75 assert_exception(() => invoke($0, `catch-rethrow-0`, [])); -// ./test/core/rethrow.wast:70 +// ./test/core/rethrow.wast:77 assert_exception(() => invoke($0, `catch-rethrow-1`, [0])); -// ./test/core/rethrow.wast:71 +// ./test/core/rethrow.wast:78 assert_return(() => invoke($0, `catch-rethrow-1`, [1]), [value("i32", 23)]); -// ./test/core/rethrow.wast:73 +// ./test/core/rethrow.wast:80 assert_exception(() => invoke($0, `catchall-rethrow-0`, [])); -// ./test/core/rethrow.wast:75 +// ./test/core/rethrow.wast:82 assert_exception(() => invoke($0, `catchall-rethrow-1`, [0])); -// ./test/core/rethrow.wast:76 +// ./test/core/rethrow.wast:83 assert_return(() => invoke($0, `catchall-rethrow-1`, [1]), [value("i32", 23)]); -// ./test/core/rethrow.wast:77 +// ./test/core/rethrow.wast:84 assert_exception(() => invoke($0, `rethrow-nested`, [0])); -// ./test/core/rethrow.wast:78 +// ./test/core/rethrow.wast:85 assert_exception(() => invoke($0, `rethrow-nested`, [1])); -// ./test/core/rethrow.wast:79 +// ./test/core/rethrow.wast:86 assert_return(() => invoke($0, `rethrow-nested`, [2]), [value("i32", 23)]); -// ./test/core/rethrow.wast:81 +// ./test/core/rethrow.wast:88 assert_return(() => invoke($0, `rethrow-recatch`, [0]), [value("i32", 23)]); -// ./test/core/rethrow.wast:82 +// ./test/core/rethrow.wast:89 assert_return(() => invoke($0, `rethrow-recatch`, [1]), [value("i32", 42)]); + +// ./test/core/rethrow.wast:91 +assert_exception(() => invoke($0, `rethrow-stack-polymorphism`, [])); + +// ./test/core/rethrow.wast:93 +assert_invalid( + () => instantiate(`(module (func (rethrow 0)))`), + `invalid rethrow label`, +); + +// ./test/core/rethrow.wast:94 +assert_invalid( + () => instantiate(`(module (func (block (rethrow 0))))`), + `invalid rethrow label`, +); + +// ./test/core/rethrow.wast:95 +assert_invalid( + () => instantiate(`(module (func (try (do (rethrow 0)) (delegate 0))))`), + `invalid rethrow label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js index 9942f8acbd03..2a442cad3913 100644 --- a/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/throw.wast.js @@ -70,3 +70,19 @@ assert_exception(() => invoke($0, `throw-param-f64`, [value("f64", 5)])); // ./test/core/throw.wast:45 assert_return(() => invoke($0, `test-throw-1-2`, []), []); + +// ./test/core/throw.wast:47 +assert_invalid(() => instantiate(`(module (func (throw 0)))`), `unknown tag 0`); + +// ./test/core/throw.wast:48 +assert_invalid( + () => instantiate(`(module (tag (param i32)) (func (throw 0)))`), + `type mismatch: instruction requires [i32] but stack has []`, +); + +// ./test/core/throw.wast:50 +assert_invalid( + () => + instantiate(`(module (tag (param i32)) (func (i64.const 5) (throw 0)))`), + `type mismatch: instruction requires [i32] but stack has [i64]`, +); diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/try_catch.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/try_catch.wast.js index bd02b506a24c..9e75da6a9a31 100644 --- a/js/src/jit-test/tests/wasm/spec/exception-handling/try_catch.wast.js +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/try_catch.wast.js @@ -177,13 +177,16 @@ assert_return(() => invoke($1, `simple-throw-catch`, [0]), [value("i32", 23)]); assert_return(() => invoke($1, `simple-throw-catch`, [1]), [value("i32", 42)]); // ./test/core/try_catch.wast:157 -assert_exception(() => invoke($1, `unreachable-not-caught`, [])); +assert_trap(() => invoke($1, `unreachable-not-caught`, []), `unreachable`); // ./test/core/try_catch.wast:159 assert_return(() => invoke($1, `trap-in-callee`, [7, 2]), [value("i32", 3)]); // ./test/core/try_catch.wast:160 -assert_exception(() => invoke($1, `trap-in-callee`, [1, 0])); +assert_trap( + () => invoke($1, `trap-in-callee`, [1, 0]), + `integer divide by zero`, +); // ./test/core/try_catch.wast:162 assert_return(() => invoke($1, `catch-complex-1`, [0]), [value("i32", 3)]); @@ -266,19 +269,81 @@ assert_return(() => invoke($1, `catchless-try`, [0]), [value("i32", 0)]); assert_return(() => invoke($1, `catchless-try`, [1]), [value("i32", 1)]); // ./test/core/try_catch.wast:191 +let $2 = instantiate(`(module + (func $$imported-throw (import "test" "throw")) + (tag $$e0) + + (func (export "imported-mismatch") (result i32) + (try (result i32) + (do + (try (result i32) + (do + (i32.const 1) + (call $$imported-throw) + ) + (catch $$e0 (i32.const 2)) + ) + ) + (catch_all (i32.const 3)) + ) + ) +)`); + +// ./test/core/try_catch.wast:211 +assert_return(() => invoke($2, `imported-mismatch`, []), [value("i32", 3)]); + +// ./test/core/try_catch.wast:213 assert_malformed( () => instantiate(`(module (func (catch_all))) `), `unexpected token`, ); -// ./test/core/try_catch.wast:196 +// ./test/core/try_catch.wast:218 assert_malformed( () => instantiate(`(module (tag $$e) (func (catch $$e))) `), `unexpected token`, ); -// ./test/core/try_catch.wast:201 +// ./test/core/try_catch.wast:223 assert_malformed( () => instantiate(`(module (func (try (do) (catch_all) (catch_all)))) `), `unexpected token`, ); + +// ./test/core/try_catch.wast:230 +assert_invalid( + () => instantiate(`(module (func (result i32) (try (result i32) (do))))`), + `type mismatch: instruction requires [i32] but stack has []`, +); + +// ./test/core/try_catch.wast:232 +assert_invalid( + () => + instantiate( + `(module (func (result i32) (try (result i32) (do (i64.const 42)))))`, + ), + `type mismatch: instruction requires [i32] but stack has [i64]`, +); + +// ./test/core/try_catch.wast:234 +assert_invalid( + () => + instantiate(`(module (tag) (func (try (do) (catch 0 (i32.const 42)))))`), + `type mismatch: block requires [] but stack has [i32]`, +); + +// ./test/core/try_catch.wast:236 +assert_invalid( + () => + instantiate(`(module + (tag (param i64)) + (func (result i32) + (try (result i32) (do (i32.const 42)) (catch 0))))`), + `type mismatch: instruction requires [i32] but stack has [i64]`, +); + +// ./test/core/try_catch.wast:241 +assert_invalid( + () => instantiate(`(module (func (try (do) (catch_all (i32.const 42)))))`), + `type mismatch: block requires [] but stack has [i32]`, +); diff --git a/js/src/jit-test/tests/wasm/spec/exception-handling/try_delegate.wast.js b/js/src/jit-test/tests/wasm/spec/exception-handling/try_delegate.wast.js index d060fd2fdfa4..9d897e6738eb 100644 --- a/js/src/jit-test/tests/wasm/spec/exception-handling/try_delegate.wast.js +++ b/js/src/jit-test/tests/wasm/spec/exception-handling/try_delegate.wast.js @@ -61,6 +61,23 @@ let $0 = instantiate(`(module ) ) + (func (export "delegate-to-block") (result i32) + (try (result i32) + (do (block (try (do (throw $$e0)) (delegate 0))) + (i32.const 0)) + (catch_all (i32.const 1))) + ) + + (func (export "delegate-to-catch") (result i32) + (try (result i32) + (do (try + (do (throw $$e0)) + (catch $$e0 + (try (do (rethrow 1)) (delegate 0)))) + (i32.const 0)) + (catch_all (i32.const 1))) + ) + (func (export "delegate-to-caller") (try (do (try (do (throw $$e0)) (delegate 1))) (catch_all)) ) @@ -93,46 +110,52 @@ let $0 = instantiate(`(module ) )`); -// ./test/core/try_delegate.wast:80 +// ./test/core/try_delegate.wast:97 assert_return(() => invoke($0, `delegate-no-throw`, []), [value("i32", 1)]); -// ./test/core/try_delegate.wast:82 +// ./test/core/try_delegate.wast:99 assert_return(() => invoke($0, `delegate-throw`, [0]), [value("i32", 1)]); -// ./test/core/try_delegate.wast:83 +// ./test/core/try_delegate.wast:100 assert_return(() => invoke($0, `delegate-throw`, [1]), [value("i32", 2)]); -// ./test/core/try_delegate.wast:85 +// ./test/core/try_delegate.wast:102 assert_exception(() => invoke($0, `delegate-throw-no-catch`, [])); -// ./test/core/try_delegate.wast:87 +// ./test/core/try_delegate.wast:104 assert_return(() => invoke($0, `delegate-merge`, [1, 0]), [value("i32", 2)]); -// ./test/core/try_delegate.wast:88 +// ./test/core/try_delegate.wast:105 assert_exception(() => invoke($0, `delegate-merge`, [2, 0])); -// ./test/core/try_delegate.wast:89 +// ./test/core/try_delegate.wast:106 assert_return(() => invoke($0, `delegate-merge`, [0, 1]), [value("i32", 2)]); -// ./test/core/try_delegate.wast:90 +// ./test/core/try_delegate.wast:107 assert_exception(() => invoke($0, `delegate-merge`, [0, 2])); -// ./test/core/try_delegate.wast:91 +// ./test/core/try_delegate.wast:108 assert_return(() => invoke($0, `delegate-merge`, [0, 0]), [value("i32", 1)]); -// ./test/core/try_delegate.wast:93 +// ./test/core/try_delegate.wast:110 assert_return(() => invoke($0, `delegate-skip`, []), [value("i32", 3)]); -// ./test/core/try_delegate.wast:95 +// ./test/core/try_delegate.wast:112 +assert_return(() => invoke($0, `delegate-to-block`, []), [value("i32", 1)]); + +// ./test/core/try_delegate.wast:113 +assert_return(() => invoke($0, `delegate-to-catch`, []), [value("i32", 1)]); + +// ./test/core/try_delegate.wast:115 assert_exception(() => invoke($0, `delegate-to-caller`, [])); -// ./test/core/try_delegate.wast:97 +// ./test/core/try_delegate.wast:117 assert_malformed( () => instantiate(`(module (func (delegate 0))) `), `unexpected token`, ); -// ./test/core/try_delegate.wast:102 +// ./test/core/try_delegate.wast:122 assert_malformed( () => instantiate( @@ -141,14 +164,20 @@ assert_malformed( `unexpected token`, ); -// ./test/core/try_delegate.wast:107 +// ./test/core/try_delegate.wast:127 assert_malformed( () => instantiate(`(module (func (try (do) (catch_all) (delegate 0)))) `), `unexpected token`, ); -// ./test/core/try_delegate.wast:112 +// ./test/core/try_delegate.wast:132 assert_malformed( () => instantiate(`(module (func (try (do) (delegate) (delegate 0)))) `), `unexpected token`, ); + +// ./test/core/try_delegate.wast:137 +assert_invalid( + () => instantiate(`(module (func (try (do) (delegate 1))))`), + `unknown label`, +); diff --git a/js/src/jit-test/tests/wasm/spec/memory64/directives.txt b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt index c7b1e85c691d..c5750221b2a2 100644 --- a/js/src/jit-test/tests/wasm/spec/memory64/directives.txt +++ b/js/src/jit-test/tests/wasm/spec/memory64/directives.txt @@ -1 +1 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; skip-if: !wasmMemory64Enabled() +|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; skip-if: !wasmMemory64Enabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js b/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js index 4274d107b8b7..8eee0e3cc2e1 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/comments.wast.js @@ -19,16 +19,16 @@ let $0 = instantiate(`(module;;comment )`); -// ./test/core/comments.wast:52:11 +// ./test/core/comments.wast:56:11 let $1 = instantiate(`(module(;comment;) (;comment;))`); -// ./test/core/comments.wast:62 +// ./test/core/comments.wast:66 let $2 = instantiate(`(module (;comment(;nested(;further;)nested;)comment;) )`); -// ./test/core/comments.wast:71 +// ./test/core/comments.wast:75 let $3 = instantiate(`(module (;comment;;comment(;nested;)comment;) )`); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js index 1605d144a2df..9dd22d0e50f9 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/f32.wast.js @@ -21549,3 +21549,15 @@ assert_invalid( () => instantiate(`(module (func (result f32) (f32.trunc (i64.const 0))))`), `type mismatch`, ); + +// ./test/core/f32.wast:2536 +assert_malformed( + () => instantiate(`(func (result f32) (f32.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/f32.wast:2540 +assert_malformed( + () => instantiate(`(func (result f32) (f32.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js b/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js index 0eced6d94b0a..a26ea32bdefa 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/f64.wast.js @@ -28300,3 +28300,15 @@ assert_invalid( () => instantiate(`(module (func (result f64) (f64.trunc (i64.const 0))))`), `type mismatch`, ); + +// ./test/core/f64.wast:2536 +assert_malformed( + () => instantiate(`(func (result f64) (f64.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/f64.wast:2540 +assert_malformed( + () => instantiate(`(func (result f64) (f64.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js b/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js index 7101df19e6bd..aba43126c57e 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/i32.wast.js @@ -2105,3 +2105,15 @@ assert_invalid( ), `type mismatch`, ); + +// ./test/core/i32.wast:978 +assert_malformed( + () => instantiate(`(func (result i32) (i32.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/i32.wast:982 +assert_malformed( + () => instantiate(`(func (result i32) (i32.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js b/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js index 149e5668e576..87ce968d4ab0 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/i64.wast.js @@ -1872,3 +1872,15 @@ assert_invalid( ), `type mismatch`, ); + +// ./test/core/i64.wast:487 +assert_malformed( + () => instantiate(`(func (result i64) (i64.const nan:arithmetic)) `), + `unexpected token`, +); + +// ./test/core/i64.wast:491 +assert_malformed( + () => instantiate(`(func (result i64) (i64.const nan:canonical)) `), + `unexpected token`, +); diff --git a/js/src/jit-test/tests/wasm/spec/spec/select.wast.js b/js/src/jit-test/tests/wasm/spec/spec/select.wast.js index 5a357dff4c96..4347eccebb2a 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/select.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/select.wast.js @@ -54,31 +54,6 @@ let $0 = instantiate(`(module (select (result externref) (local.get 0) (local.get 1) (local.get 2)) ) - ;; Check that both sides of the select are evaluated - (func (export "select-trap-left") (param $$cond i32) (result i32) - (select (unreachable) (i32.const 0) (local.get $$cond)) - ) - (func (export "select-trap-right") (param $$cond i32) (result i32) - (select (i32.const 0) (unreachable) (local.get $$cond)) - ) - - (func (export "select-unreached") - (unreachable) (select) - (unreachable) (i32.const 0) (select) - (unreachable) (i32.const 0) (i32.const 0) (select) - (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select) - (unreachable) (f32.const 0) (i32.const 0) (select) - (unreachable) - ) - - (func (export "select_unreached_result_1") (result i32) - (unreachable) (i32.add (select)) - ) - - (func (export "select_unreached_result_2") (result i64) - (unreachable) (i64.add (select (i64.const 0) (i32.const 0))) - ) - ;; As the argument of control constructs and instructions (func (export "as-select-first") (param i32) (result i32) @@ -221,54 +196,41 @@ let $0 = instantiate(`(module (i32.wrap_i64 (select (i64.const 1) (i64.const 0) (local.get 0))) ) ) - - (func (export "unreachable-num") - (unreachable) - (select) - (i32.eqz) - (drop) - ) - (func (export "unreachable-ref") - (unreachable) - (select) - (ref.is_null) - (drop) - ) )`); -// ./test/core/select.wast:221 +// ./test/core/select.wast:183 assert_return(() => invoke($0, `select-i32`, [1, 2, 1]), [value("i32", 1)]); -// ./test/core/select.wast:222 +// ./test/core/select.wast:184 assert_return(() => invoke($0, `select-i64`, [2n, 1n, 1]), [value("i64", 2n)]); -// ./test/core/select.wast:223 +// ./test/core/select.wast:185 assert_return( () => invoke($0, `select-f32`, [value("f32", 1), value("f32", 2), 1]), [value("f32", 1)], ); -// ./test/core/select.wast:224 +// ./test/core/select.wast:186 assert_return( () => invoke($0, `select-f64`, [value("f64", 1), value("f64", 2), 1]), [value("f64", 1)], ); -// ./test/core/select.wast:226 +// ./test/core/select.wast:188 assert_return(() => invoke($0, `select-i32`, [1, 2, 0]), [value("i32", 2)]); -// ./test/core/select.wast:227 +// ./test/core/select.wast:189 assert_return(() => invoke($0, `select-i32`, [2, 1, 0]), [value("i32", 1)]); -// ./test/core/select.wast:228 +// ./test/core/select.wast:190 assert_return(() => invoke($0, `select-i64`, [2n, 1n, -1]), [value("i64", 2n)]); -// ./test/core/select.wast:229 +// ./test/core/select.wast:191 assert_return(() => invoke($0, `select-i64`, [2n, 1n, -252645136]), [ value("i64", 2n), ]); -// ./test/core/select.wast:231 +// ./test/core/select.wast:193 assert_return( () => invoke($0, `select-f32`, [ @@ -279,90 +241,391 @@ assert_return( [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], ); +// ./test/core/select.wast:194 +assert_return( + () => + invoke($0, `select-f32`, [ + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + value("f32", 1), + 1, + ]), + [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], +); + +// ./test/core/select.wast:195 +assert_return( + () => + invoke($0, `select-f32`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 1), + 0, + ]), + [value("f32", 1)], +); + +// ./test/core/select.wast:196 +assert_return( + () => + invoke($0, `select-f32`, [ + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + value("f32", 1), + 0, + ]), + [value("f32", 1)], +); + +// ./test/core/select.wast:197 +assert_return( + () => + invoke($0, `select-f32`, [ + value("f32", 2), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + 1, + ]), + [value("f32", 2)], +); + +// ./test/core/select.wast:198 +assert_return( + () => + invoke($0, `select-f32`, [ + value("f32", 2), + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + 1, + ]), + [value("f32", 2)], +); + +// ./test/core/select.wast:199 +assert_return( + () => + invoke($0, `select-f32`, [ + value("f32", 2), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + 0, + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/select.wast:200 +assert_return( + () => + invoke($0, `select-f32`, [ + value("f32", 2), + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + 0, + ]), + [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], +); + +// ./test/core/select.wast:202 +assert_return( + () => + invoke($0, `select-f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + 1, + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/select.wast:203 +assert_return( + () => + invoke($0, `select-f64`, [ + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + value("f64", 1), + 1, + ]), + [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/select.wast:204 +assert_return( + () => + invoke($0, `select-f64`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + 0, + ]), + [value("f64", 1)], +); + +// ./test/core/select.wast:205 +assert_return( + () => + invoke($0, `select-f64`, [ + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + value("f64", 1), + 0, + ]), + [value("f64", 1)], +); + +// ./test/core/select.wast:206 +assert_return( + () => + invoke($0, `select-f64`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + 1, + ]), + [value("f64", 2)], +); + +// ./test/core/select.wast:207 +assert_return( + () => + invoke($0, `select-f64`, [ + value("f64", 2), + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + 1, + ]), + [value("f64", 2)], +); + +// ./test/core/select.wast:208 +assert_return( + () => + invoke($0, `select-f64`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + 0, + ]), + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], +); + +// ./test/core/select.wast:209 +assert_return( + () => + invoke($0, `select-f64`, [ + value("f64", 2), + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + 0, + ]), + [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], +); + +// ./test/core/select.wast:211 +assert_return(() => invoke($0, `select-i32-t`, [1, 2, 1]), [value("i32", 1)]); + +// ./test/core/select.wast:212 +assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, 1]), [ + value("i64", 2n), +]); + +// ./test/core/select.wast:213 +assert_return( + () => invoke($0, `select-f32-t`, [value("f32", 1), value("f32", 2), 1]), + [value("f32", 1)], +); + +// ./test/core/select.wast:214 +assert_return( + () => invoke($0, `select-f64-t`, [value("f64", 1), value("f64", 2), 1]), + [value("f64", 1)], +); + +// ./test/core/select.wast:215 +assert_return(() => invoke($0, `select-funcref`, [null, null, 1]), [ + value("anyfunc", null), +]); + +// ./test/core/select.wast:216 +assert_return( + () => invoke($0, `select-externref`, [externref(1), externref(2), 1]), + [value("externref", externref(1))], +); + +// ./test/core/select.wast:218 +assert_return(() => invoke($0, `select-i32-t`, [1, 2, 0]), [value("i32", 2)]); + +// ./test/core/select.wast:219 +assert_return(() => invoke($0, `select-i32-t`, [2, 1, 0]), [value("i32", 1)]); + +// ./test/core/select.wast:220 +assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, -1]), [ + value("i64", 2n), +]); + +// ./test/core/select.wast:221 +assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, -252645136]), [ + value("i64", 2n), +]); + +// ./test/core/select.wast:222 +assert_return( + () => invoke($0, `select-externref`, [externref(1), externref(2), 0]), + [value("externref", externref(2))], +); + +// ./test/core/select.wast:223 +assert_return( + () => invoke($0, `select-externref`, [externref(2), externref(1), 0]), + [value("externref", externref(1))], +); + +// ./test/core/select.wast:225 +assert_return( + () => + invoke($0, `select-f32-t`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 1), + 1, + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + +// ./test/core/select.wast:226 +assert_return( + () => + invoke($0, `select-f32-t`, [ + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + value("f32", 1), + 1, + ]), + [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], +); + +// ./test/core/select.wast:227 +assert_return( + () => + invoke($0, `select-f32-t`, [ + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + value("f32", 1), + 0, + ]), + [value("f32", 1)], +); + +// ./test/core/select.wast:228 +assert_return( + () => + invoke($0, `select-f32-t`, [ + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + value("f32", 1), + 0, + ]), + [value("f32", 1)], +); + +// ./test/core/select.wast:229 +assert_return( + () => + invoke($0, `select-f32-t`, [ + value("f32", 2), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + 1, + ]), + [value("f32", 2)], +); + +// ./test/core/select.wast:230 +assert_return( + () => + invoke($0, `select-f32-t`, [ + value("f32", 2), + bytes("f32", [0x4, 0x3, 0x82, 0x7f]), + 1, + ]), + [value("f32", 2)], +); + +// ./test/core/select.wast:231 +assert_return( + () => + invoke($0, `select-f32-t`, [ + value("f32", 2), + bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + 0, + ]), + [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], +); + // ./test/core/select.wast:232 assert_return( () => - invoke($0, `select-f32`, [ + invoke($0, `select-f32-t`, [ + value("f32", 2), bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 1, - ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], -); - -// ./test/core/select.wast:233 -assert_return( - () => - invoke($0, `select-f32`, [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - value("f32", 1), 0, ]), - [value("f32", 1)], + [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], ); // ./test/core/select.wast:234 assert_return( () => - invoke($0, `select-f32`, [ - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 0, + invoke($0, `select-f64-t`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + 1, ]), - [value("f32", 1)], + [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], ); // ./test/core/select.wast:235 assert_return( () => - invoke($0, `select-f32`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + invoke($0, `select-f64-t`, [ + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + value("f64", 1), 1, ]), - [value("f32", 2)], + [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], ); // ./test/core/select.wast:236 assert_return( () => - invoke($0, `select-f32`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 1, + invoke($0, `select-f64-t`, [ + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + value("f64", 1), + 0, ]), - [value("f32", 2)], + [value("f64", 1)], ); // ./test/core/select.wast:237 assert_return( () => - invoke($0, `select-f32`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), + invoke($0, `select-f64-t`, [ + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + value("f64", 1), 0, ]), - [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], + [value("f64", 1)], ); // ./test/core/select.wast:238 assert_return( () => - invoke($0, `select-f32`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 0, + invoke($0, `select-f64-t`, [ + value("f64", 2), + bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), + 1, ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], + [value("f64", 2)], +); + +// ./test/core/select.wast:239 +assert_return( + () => + invoke($0, `select-f64-t`, [ + value("f64", 2), + bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), + 1, + ]), + [value("f64", 2)], ); // ./test/core/select.wast:240 assert_return( () => - invoke($0, `select-f64`, [ + invoke($0, `select-f64-t`, [ + value("f64", 2), bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), - 1, + 0, ]), [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], ); @@ -370,531 +633,223 @@ assert_return( // ./test/core/select.wast:241 assert_return( () => - invoke($0, `select-f64`, [ + invoke($0, `select-f64-t`, [ + value("f64", 2), bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 1, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:242 -assert_return( - () => - invoke($0, `select-f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), 0, ]), - [value("f64", 1)], + [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], ); // ./test/core/select.wast:243 -assert_return( - () => - invoke($0, `select-f64`, [ - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 0, - ]), - [value("f64", 1)], -); - -// ./test/core/select.wast:244 -assert_return( - () => - invoke($0, `select-f64`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:245 -assert_return( - () => - invoke($0, `select-f64`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:246 -assert_return( - () => - invoke($0, `select-f64`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 0, - ]), - [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], -); - -// ./test/core/select.wast:247 -assert_return( - () => - invoke($0, `select-f64`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 0, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:249 -assert_return(() => invoke($0, `select-i32-t`, [1, 2, 1]), [value("i32", 1)]); - -// ./test/core/select.wast:250 -assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, 1]), [ - value("i64", 2n), -]); - -// ./test/core/select.wast:251 -assert_return( - () => invoke($0, `select-f32-t`, [value("f32", 1), value("f32", 2), 1]), - [value("f32", 1)], -); - -// ./test/core/select.wast:252 -assert_return( - () => invoke($0, `select-f64-t`, [value("f64", 1), value("f64", 2), 1]), - [value("f64", 1)], -); - -// ./test/core/select.wast:253 -assert_return(() => invoke($0, `select-funcref`, [null, null, 1]), [ - value("anyfunc", null), -]); - -// ./test/core/select.wast:254 -assert_return( - () => invoke($0, `select-externref`, [externref(1), externref(2), 1]), - [value("externref", externref(1))], -); - -// ./test/core/select.wast:256 -assert_return(() => invoke($0, `select-i32-t`, [1, 2, 0]), [value("i32", 2)]); - -// ./test/core/select.wast:257 -assert_return(() => invoke($0, `select-i32-t`, [2, 1, 0]), [value("i32", 1)]); - -// ./test/core/select.wast:258 -assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, -1]), [ - value("i64", 2n), -]); - -// ./test/core/select.wast:259 -assert_return(() => invoke($0, `select-i64-t`, [2n, 1n, -252645136]), [ - value("i64", 2n), -]); - -// ./test/core/select.wast:260 -assert_return( - () => invoke($0, `select-externref`, [externref(1), externref(2), 0]), - [value("externref", externref(2))], -); - -// ./test/core/select.wast:261 -assert_return( - () => invoke($0, `select-externref`, [externref(2), externref(1), 0]), - [value("externref", externref(1))], -); - -// ./test/core/select.wast:263 -assert_return( - () => - invoke($0, `select-f32-t`, [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - value("f32", 1), - 1, - ]), - [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], -); - -// ./test/core/select.wast:264 -assert_return( - () => - invoke($0, `select-f32-t`, [ - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 1, - ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], -); - -// ./test/core/select.wast:265 -assert_return( - () => - invoke($0, `select-f32-t`, [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - value("f32", 1), - 0, - ]), - [value("f32", 1)], -); - -// ./test/core/select.wast:266 -assert_return( - () => - invoke($0, `select-f32-t`, [ - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 0, - ]), - [value("f32", 1)], -); - -// ./test/core/select.wast:267 -assert_return( - () => - invoke($0, `select-f32-t`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - 1, - ]), - [value("f32", 2)], -); - -// ./test/core/select.wast:268 -assert_return( - () => - invoke($0, `select-f32-t`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 1, - ]), - [value("f32", 2)], -); - -// ./test/core/select.wast:269 -assert_return( - () => - invoke($0, `select-f32-t`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - 0, - ]), - [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], -); - -// ./test/core/select.wast:270 -assert_return( - () => - invoke($0, `select-f32-t`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 0, - ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], -); - -// ./test/core/select.wast:272 -assert_return( - () => - invoke($0, `select-f64-t`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), - 1, - ]), - [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], -); - -// ./test/core/select.wast:273 -assert_return( - () => - invoke($0, `select-f64-t`, [ - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 1, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:274 -assert_return( - () => - invoke($0, `select-f64-t`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), - 0, - ]), - [value("f64", 1)], -); - -// ./test/core/select.wast:275 -assert_return( - () => - invoke($0, `select-f64-t`, [ - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 0, - ]), - [value("f64", 1)], -); - -// ./test/core/select.wast:276 -assert_return( - () => - invoke($0, `select-f64-t`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:277 -assert_return( - () => - invoke($0, `select-f64-t`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:278 -assert_return( - () => - invoke($0, `select-f64-t`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 0, - ]), - [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], -); - -// ./test/core/select.wast:279 -assert_return( - () => - invoke($0, `select-f64-t`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 0, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:281 -assert_trap(() => invoke($0, `select-trap-left`, [1]), `unreachable`); - -// ./test/core/select.wast:282 -assert_trap(() => invoke($0, `select-trap-left`, [0]), `unreachable`); - -// ./test/core/select.wast:283 -assert_trap(() => invoke($0, `select-trap-right`, [1]), `unreachable`); - -// ./test/core/select.wast:284 -assert_trap(() => invoke($0, `select-trap-right`, [0]), `unreachable`); - -// ./test/core/select.wast:286 assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 1)]); -// ./test/core/select.wast:287 +// ./test/core/select.wast:244 assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 0)]); -// ./test/core/select.wast:288 +// ./test/core/select.wast:245 assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:289 +// ./test/core/select.wast:246 assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:290 +// ./test/core/select.wast:247 assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:291 +// ./test/core/select.wast:248 assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 3)]); -// ./test/core/select.wast:293 +// ./test/core/select.wast:250 assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:294 +// ./test/core/select.wast:251 assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:295 +// ./test/core/select.wast:252 assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:296 +// ./test/core/select.wast:253 assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:297 +// ./test/core/select.wast:254 assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:298 +// ./test/core/select.wast:255 assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:300 +// ./test/core/select.wast:257 assert_return(() => invoke($0, `as-if-condition`, [0]), []); -// ./test/core/select.wast:301 +// ./test/core/select.wast:258 assert_return(() => invoke($0, `as-if-condition`, [1]), []); -// ./test/core/select.wast:302 +// ./test/core/select.wast:259 assert_return(() => invoke($0, `as-if-then`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:303 +// ./test/core/select.wast:260 assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:304 +// ./test/core/select.wast:261 assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:305 +// ./test/core/select.wast:262 assert_return(() => invoke($0, `as-if-else`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:307 +// ./test/core/select.wast:264 assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:308 +// ./test/core/select.wast:265 assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:309 +// ./test/core/select.wast:266 assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:310 +// ./test/core/select.wast:267 assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:312 +// ./test/core/select.wast:269 assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 3)]); -// ./test/core/select.wast:313 +// ./test/core/select.wast:270 assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:314 +// ./test/core/select.wast:271 assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:315 +// ./test/core/select.wast:272 assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); -// ./test/core/select.wast:317 +// ./test/core/select.wast:274 assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [ value("i32", 3), ]); -// ./test/core/select.wast:319 +// ./test/core/select.wast:275 +assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [ + value("i32", 2), +]); + +// ./test/core/select.wast:276 assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 1)]); -// ./test/core/select.wast:320 +// ./test/core/select.wast:277 assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:321 +// ./test/core/select.wast:278 assert_trap( () => invoke($0, `as-call_indirect-last`, [0]), `undefined element`, ); -// ./test/core/select.wast:322 +// ./test/core/select.wast:279 assert_trap( () => invoke($0, `as-call_indirect-last`, [1]), `undefined element`, ); -// ./test/core/select.wast:324 +// ./test/core/select.wast:281 assert_return(() => invoke($0, `as-store-first`, [0]), []); -// ./test/core/select.wast:325 +// ./test/core/select.wast:282 assert_return(() => invoke($0, `as-store-first`, [1]), []); -// ./test/core/select.wast:326 +// ./test/core/select.wast:283 assert_return(() => invoke($0, `as-store-last`, [0]), []); -// ./test/core/select.wast:327 +// ./test/core/select.wast:284 assert_return(() => invoke($0, `as-store-last`, [1]), []); -// ./test/core/select.wast:329 +// ./test/core/select.wast:286 assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); -// ./test/core/select.wast:330 +// ./test/core/select.wast:287 assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 3)]); -// ./test/core/select.wast:332 +// ./test/core/select.wast:289 assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:333 +// ./test/core/select.wast:290 assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:334 +// ./test/core/select.wast:291 assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:335 +// ./test/core/select.wast:292 assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:336 +// ./test/core/select.wast:293 assert_return(() => invoke($0, `as-drop-operand`, [0]), []); -// ./test/core/select.wast:337 +// ./test/core/select.wast:294 assert_return(() => invoke($0, `as-drop-operand`, [1]), []); -// ./test/core/select.wast:338 +// ./test/core/select.wast:295 assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:339 +// ./test/core/select.wast:296 assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:340 +// ./test/core/select.wast:297 assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:341 +// ./test/core/select.wast:298 assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:342 +// ./test/core/select.wast:299 assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:343 +// ./test/core/select.wast:300 assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:344 +// ./test/core/select.wast:301 assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 2)]); -// ./test/core/select.wast:345 +// ./test/core/select.wast:302 assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:346 +// ./test/core/select.wast:303 assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 1)]); -// ./test/core/select.wast:347 +// ./test/core/select.wast:304 assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:349 +// ./test/core/select.wast:306 assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); -// ./test/core/select.wast:350 +// ./test/core/select.wast:307 assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:351 +// ./test/core/select.wast:308 assert_return(() => invoke($0, `as-binary-operand`, [0]), [value("i32", 4)]); -// ./test/core/select.wast:352 +// ./test/core/select.wast:309 assert_return(() => invoke($0, `as-binary-operand`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:353 +// ./test/core/select.wast:310 assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 0)]); -// ./test/core/select.wast:354 +// ./test/core/select.wast:311 assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:355 +// ./test/core/select.wast:312 assert_return(() => invoke($0, `as-compare-left`, [0]), [value("i32", 0)]); -// ./test/core/select.wast:356 +// ./test/core/select.wast:313 assert_return(() => invoke($0, `as-compare-left`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:357 +// ./test/core/select.wast:314 assert_return(() => invoke($0, `as-compare-right`, [0]), [value("i32", 0)]); -// ./test/core/select.wast:358 +// ./test/core/select.wast:315 assert_return(() => invoke($0, `as-compare-right`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:359 +// ./test/core/select.wast:316 assert_return(() => invoke($0, `as-convert-operand`, [0]), [value("i32", 0)]); -// ./test/core/select.wast:360 +// ./test/core/select.wast:317 assert_return(() => invoke($0, `as-convert-operand`, [1]), [value("i32", 1)]); -// ./test/core/select.wast:362 +// ./test/core/select.wast:319 assert_invalid( () => instantiate( @@ -903,7 +858,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:366 +// ./test/core/select.wast:323 assert_invalid( () => instantiate( @@ -912,7 +867,7 @@ assert_invalid( `invalid result arity`, ); -// ./test/core/select.wast:370 +// ./test/core/select.wast:327 assert_invalid(() => instantiate(`(module (func $$arity-2 (result i32 i32) (select (result i32 i32) @@ -922,7 +877,7 @@ assert_invalid(() => ) ))`), `invalid result arity`); -// ./test/core/select.wast:382 +// ./test/core/select.wast:339 assert_invalid( () => instantiate(`(module (func $$type-externref-implicit (param $$r externref) @@ -931,25 +886,25 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:389 +// ./test/core/select.wast:346 assert_invalid(() => instantiate(`(module (func $$type-num-vs-num (drop (select (i32.const 1) (i64.const 1) (i32.const 1))) ))`), `type mismatch`); -// ./test/core/select.wast:395 +// ./test/core/select.wast:352 assert_invalid(() => instantiate(`(module (func $$type-num-vs-num (drop (select (i32.const 1) (f32.const 1.0) (i32.const 1))) ))`), `type mismatch`); -// ./test/core/select.wast:401 +// ./test/core/select.wast:358 assert_invalid(() => instantiate(`(module (func $$type-num-vs-num (drop (select (i32.const 1) (f64.const 1.0) (i32.const 1))) ))`), `type mismatch`); -// ./test/core/select.wast:408 +// ./test/core/select.wast:365 assert_invalid( () => instantiate( @@ -958,7 +913,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:412 +// ./test/core/select.wast:369 assert_invalid( () => instantiate( @@ -967,7 +922,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:416 +// ./test/core/select.wast:373 assert_invalid( () => instantiate( @@ -976,7 +931,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:420 +// ./test/core/select.wast:377 assert_invalid( () => instantiate( @@ -985,7 +940,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:424 +// ./test/core/select.wast:381 assert_invalid( () => instantiate( @@ -994,7 +949,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:430 +// ./test/core/select.wast:387 assert_invalid(() => instantiate(`(module (func $$type-1st-operand-empty @@ -1002,7 +957,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:438 +// ./test/core/select.wast:395 assert_invalid(() => instantiate(`(module (func $$type-2nd-operand-empty @@ -1010,7 +965,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:446 +// ./test/core/select.wast:403 assert_invalid(() => instantiate(`(module (func $$type-3rd-operand-empty @@ -1018,7 +973,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:454 +// ./test/core/select.wast:411 assert_invalid(() => instantiate(`(module (func $$type-1st-operand-empty-in-block @@ -1027,7 +982,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:463 +// ./test/core/select.wast:420 assert_invalid(() => instantiate(`(module (func $$type-2nd-operand-empty-in-block @@ -1036,7 +991,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:472 +// ./test/core/select.wast:429 assert_invalid(() => instantiate(`(module (func $$type-3rd-operand-empty-in-block @@ -1045,7 +1000,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:481 +// ./test/core/select.wast:438 assert_invalid(() => instantiate(`(module (func $$type-1st-operand-empty-in-loop @@ -1054,7 +1009,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:490 +// ./test/core/select.wast:447 assert_invalid(() => instantiate(`(module (func $$type-2nd-operand-empty-in-loop @@ -1063,7 +1018,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:499 +// ./test/core/select.wast:456 assert_invalid(() => instantiate(`(module (func $$type-3rd-operand-empty-in-loop @@ -1072,7 +1027,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:508 +// ./test/core/select.wast:465 assert_invalid(() => instantiate(`(module (func $$type-1st-operand-empty-in-then @@ -1081,7 +1036,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:517 +// ./test/core/select.wast:474 assert_invalid(() => instantiate(`(module (func $$type-2nd-operand-empty-in-then @@ -1090,7 +1045,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:526 +// ./test/core/select.wast:483 assert_invalid(() => instantiate(`(module (func $$type-3rd-operand-empty-in-then @@ -1099,7 +1054,7 @@ assert_invalid(() => ) )`), `type mismatch`); -// ./test/core/select.wast:538 +// ./test/core/select.wast:495 assert_invalid( () => instantiate( @@ -1108,7 +1063,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:542 +// ./test/core/select.wast:499 assert_invalid( () => instantiate( @@ -1117,7 +1072,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:546 +// ./test/core/select.wast:503 assert_invalid( () => instantiate( @@ -1126,7 +1081,7 @@ assert_invalid( `type mismatch`, ); -// ./test/core/select.wast:553 +// ./test/core/select.wast:510 assert_invalid( () => instantiate( @@ -1134,61 +1089,3 @@ assert_invalid( ), `type mismatch`, ); - -// ./test/core/select.wast:561 -assert_invalid( - () => - instantiate( - `(module (func (unreachable) (select (i32.const 1) (i64.const 1) (i32.const 1)) (drop)))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:566 -assert_invalid( - () => - instantiate( - `(module (func (unreachable) (select (i64.const 1) (i32.const 1) (i32.const 1)) (drop)))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:572 -assert_invalid( - () => - instantiate( - `(module (func (unreachable) (select (i32.const 1) (i32.const 1) (i64.const 1)) (drop)))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:577 -assert_invalid( - () => - instantiate( - `(module (func (unreachable) (select (i32.const 1) (i64.const 1)) (drop)))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:582 -assert_invalid( - () => - instantiate(`(module (func (unreachable) (select (i64.const 1)) (drop)))`), - `type mismatch`, -); - -// ./test/core/select.wast:588 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (unreachable) (select (i64.const 1) (i32.const 1))))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:594 -assert_invalid( - () => instantiate(`(module (func (unreachable) (select)))`), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_address.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_address.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_address.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_bit_shift.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_bit_shift.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_bit_shift.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_bitwise.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_bitwise.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_bitwise.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_boolean.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_boolean.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_boolean.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_const.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_const.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_const.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_conversions.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_conversions.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_conversions.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f32x4.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f32x4.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_pmin_pmax.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_pmin_pmax.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_pmin_pmax.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_rounding.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f32x4_rounding.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f32x4_rounding.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f64x2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f64x2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f64x2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_pmin_pmax.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_pmin_pmax.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_pmin_pmax.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_rounding.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_f64x2_rounding.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_f64x2_rounding.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_arith2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_arith2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_extadd_pairwise_i8x16.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_extadd_pairwise_i8x16.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extadd_pairwise_i8x16.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_extmul_i8x16.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_extmul_i8x16.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_extmul_i8x16.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_q15mulr_sat_s.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_q15mulr_sat_s.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_q15mulr_sat_s.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_sat_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i16x8_sat_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i16x8_sat_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_arith2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_arith2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_dot_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_dot_i16x8.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_dot_i16x8.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_extadd_pairwise_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_extadd_pairwise_i16x8.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extadd_pairwise_i16x8.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_extmul_i16x8.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_extmul_i16x8.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_extmul_i16x8.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_trunc_sat_f32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_trunc_sat_f32x4.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f32x4.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_trunc_sat_f64x2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i32x4_trunc_sat_f64x2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i32x4_trunc_sat_f64x2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_arith2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_arith2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_extmul_i32x4.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i64x2_extmul_i32x4.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i64x2_extmul_i32x4.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_arith2.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_arith2.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_arith2.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_cmp.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_cmp.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_cmp.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_sat_arith.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_i8x16_sat_arith.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_i8x16_sat_arith.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_int_to_int_extend.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_int_to_int_extend.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_int_to_int_extend.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load16_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load16_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load16_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load32_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load32_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load32_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load64_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load64_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load64_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load8_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load8_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load8_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load_extend.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load_extend.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load_extend.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load_splat.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load_splat.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load_splat.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_load_zero.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_load_zero.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_load_zero.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_splat.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_splat.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_splat.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_store.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_store.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_store.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_store16_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_store16_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_store16_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_store32_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_store32_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_store32_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_store64_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_store64_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_store64_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/simd/simd_store8_lane.wast.js b/js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js similarity index 100% rename from js/src/jit-test/tests/wasm/spec/simd/simd_store8_lane.wast.js rename to js/src/jit-test/tests/wasm/spec/spec/simd_store8_lane.wast.js diff --git a/js/src/jit-test/tests/wasm/spec/spec/type.wast.js b/js/src/jit-test/tests/wasm/spec/spec/type.wast.js index b986a494b1aa..e8b9785d3292 100644 --- a/js/src/jit-test/tests/wasm/spec/spec/type.wast.js +++ b/js/src/jit-test/tests/wasm/spec/spec/type.wast.js @@ -59,7 +59,7 @@ let $0 = instantiate(`(module // ./test/core/type.wast:43 assert_malformed( () => instantiate(`(type (func (result i32) (param i32))) `), - `result before parameter`, + `unexpected token`, ); // ./test/core/type.wast:47 diff --git a/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js b/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js new file mode 100644 index 000000000000..20ee3b42c79c --- /dev/null +++ b/js/src/jit-test/tests/wasm/spec/spec/unreached-valid.wast.js @@ -0,0 +1,85 @@ +/* Copyright 2021 Mozilla Foundation + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// ./test/core/unreached-valid.wast + +// ./test/core/unreached-valid.wast:1 +let $0 = instantiate(`(module + + ;; Check that both sides of the select are evaluated + (func (export "select-trap-left") (param $$cond i32) (result i32) + (select (unreachable) (i32.const 0) (local.get $$cond)) + ) + (func (export "select-trap-right") (param $$cond i32) (result i32) + (select (i32.const 0) (unreachable) (local.get $$cond)) + ) + + (func (export "select-unreached") + (unreachable) (select) + (unreachable) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (select) + (unreachable) (i32.const 0) (i32.const 0) (i32.const 0) (select) + (unreachable) (f32.const 0) (i32.const 0) (select) + (unreachable) + ) + + (func (export "select_unreached_result_1") (result i32) + (unreachable) (i32.add (select)) + ) + + (func (export "select_unreached_result_2") (result i64) + (unreachable) (i64.add (select (i64.const 0) (i32.const 0))) + ) + + (func (export "unreachable-num") + (unreachable) + (select) + (i32.eqz) + (drop) + ) + (func (export "unreachable-ref") + (unreachable) + (select) + (ref.is_null) + (drop) + ) +)`); + +// ./test/core/unreached-valid.wast:42 +assert_trap(() => invoke($0, `select-trap-left`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:43 +assert_trap(() => invoke($0, `select-trap-left`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:44 +assert_trap(() => invoke($0, `select-trap-right`, [1]), `unreachable`); + +// ./test/core/unreached-valid.wast:45 +assert_trap(() => invoke($0, `select-trap-right`, [0]), `unreachable`); + +// ./test/core/unreached-valid.wast:49 +let $1 = instantiate(`(module + (func (export "meet-bottom") + (block (result f64) + (block (result f32) + (unreachable) + (br_table 0 1 1 (i32.const 1)) + ) + (drop) + (f64.const 0) + ) + (drop) + ) +)`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/address.wast.js b/js/src/jit-test/tests/wasm/spec/threads/address.wast.js deleted file mode 100644 index 96ee2b71afb9..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/address.wast.js +++ /dev/null @@ -1,1055 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/address.wast - -// ./test/core/address.wast:3 -let $0 = instantiate(`(module - (memory 1) - (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") - - (func (export "8u_good1") (param $$i i32) (result i32) - (i32.load8_u offset=0 (local.get $$i)) ;; 97 'a' - ) - (func (export "8u_good2") (param $$i i32) (result i32) - (i32.load8_u align=1 (local.get $$i)) ;; 97 'a' - ) - (func (export "8u_good3") (param $$i i32) (result i32) - (i32.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' - ) - (func (export "8u_good4") (param $$i i32) (result i32) - (i32.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' - ) - (func (export "8u_good5") (param $$i i32) (result i32) - (i32.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' - ) - - (func (export "8s_good1") (param $$i i32) (result i32) - (i32.load8_s offset=0 (local.get $$i)) ;; 97 'a' - ) - (func (export "8s_good2") (param $$i i32) (result i32) - (i32.load8_s align=1 (local.get $$i)) ;; 97 'a' - ) - (func (export "8s_good3") (param $$i i32) (result i32) - (i32.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' - ) - (func (export "8s_good4") (param $$i i32) (result i32) - (i32.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' - ) - (func (export "8s_good5") (param $$i i32) (result i32) - (i32.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' - ) - - (func (export "16u_good1") (param $$i i32) (result i32) - (i32.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16u_good2") (param $$i i32) (result i32) - (i32.load16_u align=1 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16u_good3") (param $$i i32) (result i32) - (i32.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' - ) - (func (export "16u_good4") (param $$i i32) (result i32) - (i32.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' - ) - (func (export "16u_good5") (param $$i i32) (result i32) - (i32.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' - ) - - (func (export "16s_good1") (param $$i i32) (result i32) - (i32.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16s_good2") (param $$i i32) (result i32) - (i32.load16_s align=1 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16s_good3") (param $$i i32) (result i32) - (i32.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' - ) - (func (export "16s_good4") (param $$i i32) (result i32) - (i32.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' - ) - (func (export "16s_good5") (param $$i i32) (result i32) - (i32.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' - ) - - (func (export "32_good1") (param $$i i32) (result i32) - (i32.load offset=0 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32_good2") (param $$i i32) (result i32) - (i32.load align=1 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32_good3") (param $$i i32) (result i32) - (i32.load offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' - ) - (func (export "32_good4") (param $$i i32) (result i32) - (i32.load offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' - ) - (func (export "32_good5") (param $$i i32) (result i32) - (i32.load offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' - ) - - (func (export "8u_bad") (param $$i i32) - (drop (i32.load8_u offset=4294967295 (local.get $$i))) - ) - (func (export "8s_bad") (param $$i i32) - (drop (i32.load8_s offset=4294967295 (local.get $$i))) - ) - (func (export "16u_bad") (param $$i i32) - (drop (i32.load16_u offset=4294967295 (local.get $$i))) - ) - (func (export "16s_bad") (param $$i i32) - (drop (i32.load16_s offset=4294967295 (local.get $$i))) - ) - (func (export "32_bad") (param $$i i32) - (drop (i32.load offset=4294967295 (local.get $$i))) - ) -)`); - -// ./test/core/address.wast:104 -assert_return(() => invoke($0, `8u_good1`, [0]), [value("i32", 97)]); - -// ./test/core/address.wast:105 -assert_return(() => invoke($0, `8u_good2`, [0]), [value("i32", 97)]); - -// ./test/core/address.wast:106 -assert_return(() => invoke($0, `8u_good3`, [0]), [value("i32", 98)]); - -// ./test/core/address.wast:107 -assert_return(() => invoke($0, `8u_good4`, [0]), [value("i32", 99)]); - -// ./test/core/address.wast:108 -assert_return(() => invoke($0, `8u_good5`, [0]), [value("i32", 122)]); - -// ./test/core/address.wast:110 -assert_return(() => invoke($0, `8s_good1`, [0]), [value("i32", 97)]); - -// ./test/core/address.wast:111 -assert_return(() => invoke($0, `8s_good2`, [0]), [value("i32", 97)]); - -// ./test/core/address.wast:112 -assert_return(() => invoke($0, `8s_good3`, [0]), [value("i32", 98)]); - -// ./test/core/address.wast:113 -assert_return(() => invoke($0, `8s_good4`, [0]), [value("i32", 99)]); - -// ./test/core/address.wast:114 -assert_return(() => invoke($0, `8s_good5`, [0]), [value("i32", 122)]); - -// ./test/core/address.wast:116 -assert_return(() => invoke($0, `16u_good1`, [0]), [value("i32", 25185)]); - -// ./test/core/address.wast:117 -assert_return(() => invoke($0, `16u_good2`, [0]), [value("i32", 25185)]); - -// ./test/core/address.wast:118 -assert_return(() => invoke($0, `16u_good3`, [0]), [value("i32", 25442)]); - -// ./test/core/address.wast:119 -assert_return(() => invoke($0, `16u_good4`, [0]), [value("i32", 25699)]); - -// ./test/core/address.wast:120 -assert_return(() => invoke($0, `16u_good5`, [0]), [value("i32", 122)]); - -// ./test/core/address.wast:122 -assert_return(() => invoke($0, `16s_good1`, [0]), [value("i32", 25185)]); - -// ./test/core/address.wast:123 -assert_return(() => invoke($0, `16s_good2`, [0]), [value("i32", 25185)]); - -// ./test/core/address.wast:124 -assert_return(() => invoke($0, `16s_good3`, [0]), [value("i32", 25442)]); - -// ./test/core/address.wast:125 -assert_return(() => invoke($0, `16s_good4`, [0]), [value("i32", 25699)]); - -// ./test/core/address.wast:126 -assert_return(() => invoke($0, `16s_good5`, [0]), [value("i32", 122)]); - -// ./test/core/address.wast:128 -assert_return(() => invoke($0, `32_good1`, [0]), [value("i32", 1684234849)]); - -// ./test/core/address.wast:129 -assert_return(() => invoke($0, `32_good2`, [0]), [value("i32", 1684234849)]); - -// ./test/core/address.wast:130 -assert_return(() => invoke($0, `32_good3`, [0]), [value("i32", 1701077858)]); - -// ./test/core/address.wast:131 -assert_return(() => invoke($0, `32_good4`, [0]), [value("i32", 1717920867)]); - -// ./test/core/address.wast:132 -assert_return(() => invoke($0, `32_good5`, [0]), [value("i32", 122)]); - -// ./test/core/address.wast:134 -assert_return(() => invoke($0, `8u_good1`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:135 -assert_return(() => invoke($0, `8u_good2`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:136 -assert_return(() => invoke($0, `8u_good3`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:137 -assert_return(() => invoke($0, `8u_good4`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:138 -assert_return(() => invoke($0, `8u_good5`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:140 -assert_return(() => invoke($0, `8s_good1`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:141 -assert_return(() => invoke($0, `8s_good2`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:142 -assert_return(() => invoke($0, `8s_good3`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:143 -assert_return(() => invoke($0, `8s_good4`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:144 -assert_return(() => invoke($0, `8s_good5`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:146 -assert_return(() => invoke($0, `16u_good1`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:147 -assert_return(() => invoke($0, `16u_good2`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:148 -assert_return(() => invoke($0, `16u_good3`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:149 -assert_return(() => invoke($0, `16u_good4`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:150 -assert_return(() => invoke($0, `16u_good5`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:152 -assert_return(() => invoke($0, `16s_good1`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:153 -assert_return(() => invoke($0, `16s_good2`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:154 -assert_return(() => invoke($0, `16s_good3`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:155 -assert_return(() => invoke($0, `16s_good4`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:156 -assert_return(() => invoke($0, `16s_good5`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:158 -assert_return(() => invoke($0, `32_good1`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:159 -assert_return(() => invoke($0, `32_good2`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:160 -assert_return(() => invoke($0, `32_good3`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:161 -assert_return(() => invoke($0, `32_good4`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:162 -assert_return(() => invoke($0, `32_good5`, [65507]), [value("i32", 0)]); - -// ./test/core/address.wast:164 -assert_return(() => invoke($0, `8u_good1`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:165 -assert_return(() => invoke($0, `8u_good2`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:166 -assert_return(() => invoke($0, `8u_good3`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:167 -assert_return(() => invoke($0, `8u_good4`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:168 -assert_return(() => invoke($0, `8u_good5`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:170 -assert_return(() => invoke($0, `8s_good1`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:171 -assert_return(() => invoke($0, `8s_good2`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:172 -assert_return(() => invoke($0, `8s_good3`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:173 -assert_return(() => invoke($0, `8s_good4`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:174 -assert_return(() => invoke($0, `8s_good5`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:176 -assert_return(() => invoke($0, `16u_good1`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:177 -assert_return(() => invoke($0, `16u_good2`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:178 -assert_return(() => invoke($0, `16u_good3`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:179 -assert_return(() => invoke($0, `16u_good4`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:180 -assert_return(() => invoke($0, `16u_good5`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:182 -assert_return(() => invoke($0, `16s_good1`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:183 -assert_return(() => invoke($0, `16s_good2`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:184 -assert_return(() => invoke($0, `16s_good3`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:185 -assert_return(() => invoke($0, `16s_good4`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:186 -assert_return(() => invoke($0, `16s_good5`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:188 -assert_return(() => invoke($0, `32_good1`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:189 -assert_return(() => invoke($0, `32_good2`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:190 -assert_return(() => invoke($0, `32_good3`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:191 -assert_return(() => invoke($0, `32_good4`, [65508]), [value("i32", 0)]); - -// ./test/core/address.wast:192 -assert_trap( - () => invoke($0, `32_good5`, [65508]), - `out of bounds memory access`, -); - -// ./test/core/address.wast:194 -assert_trap(() => invoke($0, `8u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:195 -assert_trap(() => invoke($0, `8s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:196 -assert_trap(() => invoke($0, `16u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:197 -assert_trap(() => invoke($0, `16s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:198 -assert_trap(() => invoke($0, `32_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:200 -assert_trap(() => invoke($0, `8u_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:201 -assert_trap(() => invoke($0, `8s_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:202 -assert_trap(() => invoke($0, `16u_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:203 -assert_trap(() => invoke($0, `16s_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:204 -assert_trap(() => invoke($0, `32_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:206 -assert_malformed( - () => - instantiate( - `(memory 1) (func (drop (i32.load offset=4294967296 (i32.const 0)))) `, - ), - `i32 constant`, -); - -// ./test/core/address.wast:216 -let $1 = instantiate(`(module - (memory 1) - (data (i32.const 0) "abcdefghijklmnopqrstuvwxyz") - - (func (export "8u_good1") (param $$i i32) (result i64) - (i64.load8_u offset=0 (local.get $$i)) ;; 97 'a' - ) - (func (export "8u_good2") (param $$i i32) (result i64) - (i64.load8_u align=1 (local.get $$i)) ;; 97 'a' - ) - (func (export "8u_good3") (param $$i i32) (result i64) - (i64.load8_u offset=1 align=1 (local.get $$i)) ;; 98 'b' - ) - (func (export "8u_good4") (param $$i i32) (result i64) - (i64.load8_u offset=2 align=1 (local.get $$i)) ;; 99 'c' - ) - (func (export "8u_good5") (param $$i i32) (result i64) - (i64.load8_u offset=25 align=1 (local.get $$i)) ;; 122 'z' - ) - - (func (export "8s_good1") (param $$i i32) (result i64) - (i64.load8_s offset=0 (local.get $$i)) ;; 97 'a' - ) - (func (export "8s_good2") (param $$i i32) (result i64) - (i64.load8_s align=1 (local.get $$i)) ;; 97 'a' - ) - (func (export "8s_good3") (param $$i i32) (result i64) - (i64.load8_s offset=1 align=1 (local.get $$i)) ;; 98 'b' - ) - (func (export "8s_good4") (param $$i i32) (result i64) - (i64.load8_s offset=2 align=1 (local.get $$i)) ;; 99 'c' - ) - (func (export "8s_good5") (param $$i i32) (result i64) - (i64.load8_s offset=25 align=1 (local.get $$i)) ;; 122 'z' - ) - - (func (export "16u_good1") (param $$i i32) (result i64) - (i64.load16_u offset=0 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16u_good2") (param $$i i32) (result i64) - (i64.load16_u align=1 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16u_good3") (param $$i i32) (result i64) - (i64.load16_u offset=1 align=1 (local.get $$i)) ;; 25442 'bc' - ) - (func (export "16u_good4") (param $$i i32) (result i64) - (i64.load16_u offset=2 align=2 (local.get $$i)) ;; 25699 'cd' - ) - (func (export "16u_good5") (param $$i i32) (result i64) - (i64.load16_u offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' - ) - - (func (export "16s_good1") (param $$i i32) (result i64) - (i64.load16_s offset=0 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16s_good2") (param $$i i32) (result i64) - (i64.load16_s align=1 (local.get $$i)) ;; 25185 'ab' - ) - (func (export "16s_good3") (param $$i i32) (result i64) - (i64.load16_s offset=1 align=1 (local.get $$i)) ;; 25442 'bc' - ) - (func (export "16s_good4") (param $$i i32) (result i64) - (i64.load16_s offset=2 align=2 (local.get $$i)) ;; 25699 'cd' - ) - (func (export "16s_good5") (param $$i i32) (result i64) - (i64.load16_s offset=25 align=2 (local.get $$i)) ;; 122 'z\\0' - ) - - (func (export "32u_good1") (param $$i i32) (result i64) - (i64.load32_u offset=0 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32u_good2") (param $$i i32) (result i64) - (i64.load32_u align=1 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32u_good3") (param $$i i32) (result i64) - (i64.load32_u offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' - ) - (func (export "32u_good4") (param $$i i32) (result i64) - (i64.load32_u offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' - ) - (func (export "32u_good5") (param $$i i32) (result i64) - (i64.load32_u offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' - ) - - (func (export "32s_good1") (param $$i i32) (result i64) - (i64.load32_s offset=0 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32s_good2") (param $$i i32) (result i64) - (i64.load32_s align=1 (local.get $$i)) ;; 1684234849 'abcd' - ) - (func (export "32s_good3") (param $$i i32) (result i64) - (i64.load32_s offset=1 align=1 (local.get $$i)) ;; 1701077858 'bcde' - ) - (func (export "32s_good4") (param $$i i32) (result i64) - (i64.load32_s offset=2 align=2 (local.get $$i)) ;; 1717920867 'cdef' - ) - (func (export "32s_good5") (param $$i i32) (result i64) - (i64.load32_s offset=25 align=4 (local.get $$i)) ;; 122 'z\\0\\0\\0' - ) - - (func (export "64_good1") (param $$i i32) (result i64) - (i64.load offset=0 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' - ) - (func (export "64_good2") (param $$i i32) (result i64) - (i64.load align=1 (local.get $$i)) ;; 0x6867666564636261 'abcdefgh' - ) - (func (export "64_good3") (param $$i i32) (result i64) - (i64.load offset=1 align=1 (local.get $$i)) ;; 0x6968676665646362 'bcdefghi' - ) - (func (export "64_good4") (param $$i i32) (result i64) - (i64.load offset=2 align=2 (local.get $$i)) ;; 0x6a69686766656463 'cdefghij' - ) - (func (export "64_good5") (param $$i i32) (result i64) - (i64.load offset=25 align=8 (local.get $$i)) ;; 122 'z\\0\\0\\0\\0\\0\\0\\0' - ) - - (func (export "8u_bad") (param $$i i32) - (drop (i64.load8_u offset=4294967295 (local.get $$i))) - ) - (func (export "8s_bad") (param $$i i32) - (drop (i64.load8_s offset=4294967295 (local.get $$i))) - ) - (func (export "16u_bad") (param $$i i32) - (drop (i64.load16_u offset=4294967295 (local.get $$i))) - ) - (func (export "16s_bad") (param $$i i32) - (drop (i64.load16_s offset=4294967295 (local.get $$i))) - ) - (func (export "32u_bad") (param $$i i32) - (drop (i64.load32_u offset=4294967295 (local.get $$i))) - ) - (func (export "32s_bad") (param $$i i32) - (drop (i64.load32_s offset=4294967295 (local.get $$i))) - ) - (func (export "64_bad") (param $$i i32) - (drop (i64.load offset=4294967295 (local.get $$i))) - ) -)`); - -// ./test/core/address.wast:355 -assert_return(() => invoke($1, `8u_good1`, [0]), [value("i64", 97n)]); - -// ./test/core/address.wast:356 -assert_return(() => invoke($1, `8u_good2`, [0]), [value("i64", 97n)]); - -// ./test/core/address.wast:357 -assert_return(() => invoke($1, `8u_good3`, [0]), [value("i64", 98n)]); - -// ./test/core/address.wast:358 -assert_return(() => invoke($1, `8u_good4`, [0]), [value("i64", 99n)]); - -// ./test/core/address.wast:359 -assert_return(() => invoke($1, `8u_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:361 -assert_return(() => invoke($1, `8s_good1`, [0]), [value("i64", 97n)]); - -// ./test/core/address.wast:362 -assert_return(() => invoke($1, `8s_good2`, [0]), [value("i64", 97n)]); - -// ./test/core/address.wast:363 -assert_return(() => invoke($1, `8s_good3`, [0]), [value("i64", 98n)]); - -// ./test/core/address.wast:364 -assert_return(() => invoke($1, `8s_good4`, [0]), [value("i64", 99n)]); - -// ./test/core/address.wast:365 -assert_return(() => invoke($1, `8s_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:367 -assert_return(() => invoke($1, `16u_good1`, [0]), [value("i64", 25185n)]); - -// ./test/core/address.wast:368 -assert_return(() => invoke($1, `16u_good2`, [0]), [value("i64", 25185n)]); - -// ./test/core/address.wast:369 -assert_return(() => invoke($1, `16u_good3`, [0]), [value("i64", 25442n)]); - -// ./test/core/address.wast:370 -assert_return(() => invoke($1, `16u_good4`, [0]), [value("i64", 25699n)]); - -// ./test/core/address.wast:371 -assert_return(() => invoke($1, `16u_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:373 -assert_return(() => invoke($1, `16s_good1`, [0]), [value("i64", 25185n)]); - -// ./test/core/address.wast:374 -assert_return(() => invoke($1, `16s_good2`, [0]), [value("i64", 25185n)]); - -// ./test/core/address.wast:375 -assert_return(() => invoke($1, `16s_good3`, [0]), [value("i64", 25442n)]); - -// ./test/core/address.wast:376 -assert_return(() => invoke($1, `16s_good4`, [0]), [value("i64", 25699n)]); - -// ./test/core/address.wast:377 -assert_return(() => invoke($1, `16s_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:379 -assert_return(() => invoke($1, `32u_good1`, [0]), [value("i64", 1684234849n)]); - -// ./test/core/address.wast:380 -assert_return(() => invoke($1, `32u_good2`, [0]), [value("i64", 1684234849n)]); - -// ./test/core/address.wast:381 -assert_return(() => invoke($1, `32u_good3`, [0]), [value("i64", 1701077858n)]); - -// ./test/core/address.wast:382 -assert_return(() => invoke($1, `32u_good4`, [0]), [value("i64", 1717920867n)]); - -// ./test/core/address.wast:383 -assert_return(() => invoke($1, `32u_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:385 -assert_return(() => invoke($1, `32s_good1`, [0]), [value("i64", 1684234849n)]); - -// ./test/core/address.wast:386 -assert_return(() => invoke($1, `32s_good2`, [0]), [value("i64", 1684234849n)]); - -// ./test/core/address.wast:387 -assert_return(() => invoke($1, `32s_good3`, [0]), [value("i64", 1701077858n)]); - -// ./test/core/address.wast:388 -assert_return(() => invoke($1, `32s_good4`, [0]), [value("i64", 1717920867n)]); - -// ./test/core/address.wast:389 -assert_return(() => invoke($1, `32s_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:391 -assert_return(() => invoke($1, `64_good1`, [0]), [ - value("i64", 7523094288207667809n), -]); - -// ./test/core/address.wast:392 -assert_return(() => invoke($1, `64_good2`, [0]), [ - value("i64", 7523094288207667809n), -]); - -// ./test/core/address.wast:393 -assert_return(() => invoke($1, `64_good3`, [0]), [ - value("i64", 7595434461045744482n), -]); - -// ./test/core/address.wast:394 -assert_return(() => invoke($1, `64_good4`, [0]), [ - value("i64", 7667774633883821155n), -]); - -// ./test/core/address.wast:395 -assert_return(() => invoke($1, `64_good5`, [0]), [value("i64", 122n)]); - -// ./test/core/address.wast:397 -assert_return(() => invoke($1, `8u_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:398 -assert_return(() => invoke($1, `8u_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:399 -assert_return(() => invoke($1, `8u_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:400 -assert_return(() => invoke($1, `8u_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:401 -assert_return(() => invoke($1, `8u_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:403 -assert_return(() => invoke($1, `8s_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:404 -assert_return(() => invoke($1, `8s_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:405 -assert_return(() => invoke($1, `8s_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:406 -assert_return(() => invoke($1, `8s_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:407 -assert_return(() => invoke($1, `8s_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:409 -assert_return(() => invoke($1, `16u_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:410 -assert_return(() => invoke($1, `16u_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:411 -assert_return(() => invoke($1, `16u_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:412 -assert_return(() => invoke($1, `16u_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:413 -assert_return(() => invoke($1, `16u_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:415 -assert_return(() => invoke($1, `16s_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:416 -assert_return(() => invoke($1, `16s_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:417 -assert_return(() => invoke($1, `16s_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:418 -assert_return(() => invoke($1, `16s_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:419 -assert_return(() => invoke($1, `16s_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:421 -assert_return(() => invoke($1, `32u_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:422 -assert_return(() => invoke($1, `32u_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:423 -assert_return(() => invoke($1, `32u_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:424 -assert_return(() => invoke($1, `32u_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:425 -assert_return(() => invoke($1, `32u_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:427 -assert_return(() => invoke($1, `32s_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:428 -assert_return(() => invoke($1, `32s_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:429 -assert_return(() => invoke($1, `32s_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:430 -assert_return(() => invoke($1, `32s_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:431 -assert_return(() => invoke($1, `32s_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:433 -assert_return(() => invoke($1, `64_good1`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:434 -assert_return(() => invoke($1, `64_good2`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:435 -assert_return(() => invoke($1, `64_good3`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:436 -assert_return(() => invoke($1, `64_good4`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:437 -assert_return(() => invoke($1, `64_good5`, [65503]), [value("i64", 0n)]); - -// ./test/core/address.wast:439 -assert_return(() => invoke($1, `8u_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:440 -assert_return(() => invoke($1, `8u_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:441 -assert_return(() => invoke($1, `8u_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:442 -assert_return(() => invoke($1, `8u_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:443 -assert_return(() => invoke($1, `8u_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:445 -assert_return(() => invoke($1, `8s_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:446 -assert_return(() => invoke($1, `8s_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:447 -assert_return(() => invoke($1, `8s_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:448 -assert_return(() => invoke($1, `8s_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:449 -assert_return(() => invoke($1, `8s_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:451 -assert_return(() => invoke($1, `16u_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:452 -assert_return(() => invoke($1, `16u_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:453 -assert_return(() => invoke($1, `16u_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:454 -assert_return(() => invoke($1, `16u_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:455 -assert_return(() => invoke($1, `16u_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:457 -assert_return(() => invoke($1, `16s_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:458 -assert_return(() => invoke($1, `16s_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:459 -assert_return(() => invoke($1, `16s_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:460 -assert_return(() => invoke($1, `16s_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:461 -assert_return(() => invoke($1, `16s_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:463 -assert_return(() => invoke($1, `32u_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:464 -assert_return(() => invoke($1, `32u_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:465 -assert_return(() => invoke($1, `32u_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:466 -assert_return(() => invoke($1, `32u_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:467 -assert_return(() => invoke($1, `32u_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:469 -assert_return(() => invoke($1, `32s_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:470 -assert_return(() => invoke($1, `32s_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:471 -assert_return(() => invoke($1, `32s_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:472 -assert_return(() => invoke($1, `32s_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:473 -assert_return(() => invoke($1, `32s_good5`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:475 -assert_return(() => invoke($1, `64_good1`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:476 -assert_return(() => invoke($1, `64_good2`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:477 -assert_return(() => invoke($1, `64_good3`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:478 -assert_return(() => invoke($1, `64_good4`, [65504]), [value("i64", 0n)]); - -// ./test/core/address.wast:479 -assert_trap( - () => invoke($1, `64_good5`, [65504]), - `out of bounds memory access`, -); - -// ./test/core/address.wast:481 -assert_trap(() => invoke($1, `8u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:482 -assert_trap(() => invoke($1, `8s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:483 -assert_trap(() => invoke($1, `16u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:484 -assert_trap(() => invoke($1, `16s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:485 -assert_trap(() => invoke($1, `32u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:486 -assert_trap(() => invoke($1, `32s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:487 -assert_trap(() => invoke($1, `64_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:489 -assert_trap(() => invoke($1, `8u_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:490 -assert_trap(() => invoke($1, `8s_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:491 -assert_trap(() => invoke($1, `16u_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:492 -assert_trap(() => invoke($1, `16s_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:493 -assert_trap(() => invoke($1, `32u_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:494 -assert_trap(() => invoke($1, `32s_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:495 -assert_trap(() => invoke($1, `64_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:499 -let $2 = instantiate(`(module - (memory 1) - (data (i32.const 0) "\\00\\00\\00\\00\\00\\00\\a0\\7f\\01\\00\\d0\\7f") - - (func (export "32_good1") (param $$i i32) (result f32) - (f32.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' - ) - (func (export "32_good2") (param $$i i32) (result f32) - (f32.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' - ) - (func (export "32_good3") (param $$i i32) (result f32) - (f32.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' - ) - (func (export "32_good4") (param $$i i32) (result f32) - (f32.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00' - ) - (func (export "32_good5") (param $$i i32) (result f32) - (f32.load offset=8 align=4 (local.get $$i)) ;; nan:0x500001 '\\01\\00\\d0\\7f' - ) - (func (export "32_bad") (param $$i i32) - (drop (f32.load offset=4294967295 (local.get $$i))) - ) -)`); - -// ./test/core/address.wast:523 -assert_return(() => invoke($2, `32_good1`, [0]), [value("f32", 0)]); - -// ./test/core/address.wast:524 -assert_return(() => invoke($2, `32_good2`, [0]), [value("f32", 0)]); - -// ./test/core/address.wast:525 -assert_return(() => invoke($2, `32_good3`, [0]), [value("f32", 0)]); - -// ./test/core/address.wast:526 -assert_return(() => invoke($2, `32_good4`, [0]), [value("f32", 0)]); - -// ./test/core/address.wast:527 -assert_return(() => invoke($2, `32_good5`, [0]), [ - bytes("f32", [0x1, 0x0, 0xd0, 0x7f]), -]); - -// ./test/core/address.wast:529 -assert_return(() => invoke($2, `32_good1`, [65524]), [value("f32", 0)]); - -// ./test/core/address.wast:530 -assert_return(() => invoke($2, `32_good2`, [65524]), [value("f32", 0)]); - -// ./test/core/address.wast:531 -assert_return(() => invoke($2, `32_good3`, [65524]), [value("f32", 0)]); - -// ./test/core/address.wast:532 -assert_return(() => invoke($2, `32_good4`, [65524]), [value("f32", 0)]); - -// ./test/core/address.wast:533 -assert_return(() => invoke($2, `32_good5`, [65524]), [value("f32", 0)]); - -// ./test/core/address.wast:535 -assert_return(() => invoke($2, `32_good1`, [65525]), [value("f32", 0)]); - -// ./test/core/address.wast:536 -assert_return(() => invoke($2, `32_good2`, [65525]), [value("f32", 0)]); - -// ./test/core/address.wast:537 -assert_return(() => invoke($2, `32_good3`, [65525]), [value("f32", 0)]); - -// ./test/core/address.wast:538 -assert_return(() => invoke($2, `32_good4`, [65525]), [value("f32", 0)]); - -// ./test/core/address.wast:539 -assert_trap( - () => invoke($2, `32_good5`, [65525]), - `out of bounds memory access`, -); - -// ./test/core/address.wast:541 -assert_trap(() => invoke($2, `32_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:542 -assert_trap(() => invoke($2, `32_bad`, [1]), `out of bounds memory access`); - -// ./test/core/address.wast:546 -let $3 = instantiate(`(module - (memory 1) - (data (i32.const 0) "\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\00\\f4\\7f\\01\\00\\00\\00\\00\\00\\fc\\7f") - - (func (export "64_good1") (param $$i i32) (result f64) - (f64.load offset=0 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' - ) - (func (export "64_good2") (param $$i i32) (result f64) - (f64.load align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' - ) - (func (export "64_good3") (param $$i i32) (result f64) - (f64.load offset=1 align=1 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' - ) - (func (export "64_good4") (param $$i i32) (result f64) - (f64.load offset=2 align=2 (local.get $$i)) ;; 0.0 '\\00\\00\\00\\00\\00\\00\\00\\00' - ) - (func (export "64_good5") (param $$i i32) (result f64) - (f64.load offset=18 align=8 (local.get $$i)) ;; nan:0xc000000000001 '\\01\\00\\00\\00\\00\\00\\fc\\7f' - ) - (func (export "64_bad") (param $$i i32) - (drop (f64.load offset=4294967295 (local.get $$i))) - ) -)`); - -// ./test/core/address.wast:570 -assert_return(() => invoke($3, `64_good1`, [0]), [value("f64", 0)]); - -// ./test/core/address.wast:571 -assert_return(() => invoke($3, `64_good2`, [0]), [value("f64", 0)]); - -// ./test/core/address.wast:572 -assert_return(() => invoke($3, `64_good3`, [0]), [value("f64", 0)]); - -// ./test/core/address.wast:573 -assert_return(() => invoke($3, `64_good4`, [0]), [value("f64", 0)]); - -// ./test/core/address.wast:574 -assert_return(() => invoke($3, `64_good5`, [0]), [ - bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f]), -]); - -// ./test/core/address.wast:576 -assert_return(() => invoke($3, `64_good1`, [65510]), [value("f64", 0)]); - -// ./test/core/address.wast:577 -assert_return(() => invoke($3, `64_good2`, [65510]), [value("f64", 0)]); - -// ./test/core/address.wast:578 -assert_return(() => invoke($3, `64_good3`, [65510]), [value("f64", 0)]); - -// ./test/core/address.wast:579 -assert_return(() => invoke($3, `64_good4`, [65510]), [value("f64", 0)]); - -// ./test/core/address.wast:580 -assert_return(() => invoke($3, `64_good5`, [65510]), [value("f64", 0)]); - -// ./test/core/address.wast:582 -assert_return(() => invoke($3, `64_good1`, [65511]), [value("f64", 0)]); - -// ./test/core/address.wast:583 -assert_return(() => invoke($3, `64_good2`, [65511]), [value("f64", 0)]); - -// ./test/core/address.wast:584 -assert_return(() => invoke($3, `64_good3`, [65511]), [value("f64", 0)]); - -// ./test/core/address.wast:585 -assert_return(() => invoke($3, `64_good4`, [65511]), [value("f64", 0)]); - -// ./test/core/address.wast:586 -assert_trap( - () => invoke($3, `64_good5`, [65511]), - `out of bounds memory access`, -); - -// ./test/core/address.wast:588 -assert_trap(() => invoke($3, `64_bad`, [0]), `out of bounds memory access`); - -// ./test/core/address.wast:589 -assert_trap(() => invoke($3, `64_bad`, [1]), `out of bounds memory access`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/block.wast.js b/js/src/jit-test/tests/wasm/spec/threads/block.wast.js deleted file mode 100644 index b6f879f2aa98..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/block.wast.js +++ /dev/null @@ -1,1558 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/block.wast - -// ./test/core/block.wast:3 -let $0 = instantiate(`(module - ;; Auxiliary definition - (memory 1) - - (func $$dummy) - - (func (export "empty") - (block) - (block $$l) - ) - - (func (export "singular") (result i32) - (block (nop)) - (block (result i32) (i32.const 7)) - ) - - (func (export "multi") (result i32) - (block (call $$dummy) (call $$dummy) (call $$dummy) (call $$dummy)) - (block (result i32) (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 8)) - ) - - (func (export "nested") (result i32) - (block (result i32) - (block (call $$dummy) (block) (nop)) - (block (result i32) (call $$dummy) (i32.const 9)) - ) - ) - - (func (export "deep") (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (block (result i32) (block (result i32) - (call $$dummy) (i32.const 150) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - ) - - (func (export "as-select-first") (result i32) - (select (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-select-mid") (result i32) - (select (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 3)) - ) - (func (export "as-select-last") (result i32) - (select (i32.const 2) (i32.const 3) (block (result i32) (i32.const 1))) - ) - - (func (export "as-loop-first") (result i32) - (loop (result i32) (block (result i32) (i32.const 1)) (call $$dummy) (call $$dummy)) - ) - (func (export "as-loop-mid") (result i32) - (loop (result i32) (call $$dummy) (block (result i32) (i32.const 1)) (call $$dummy)) - ) - (func (export "as-loop-last") (result i32) - (loop (result i32) (call $$dummy) (call $$dummy) (block (result i32) (i32.const 1))) - ) - - (func (export "as-if-condition") - (block (result i32) (i32.const 1)) (if (then (call $$dummy))) - ) - (func (export "as-if-then") (result i32) - (if (result i32) (i32.const 1) (then (block (result i32) (i32.const 1))) (else (i32.const 2))) - ) - (func (export "as-if-else") (result i32) - (if (result i32) (i32.const 1) (then (i32.const 2)) (else (block (result i32) (i32.const 1)))) - ) - - (func (export "as-br_if-first") (result i32) - (block (result i32) (br_if 0 (block (result i32) (i32.const 1)) (i32.const 2))) - ) - (func (export "as-br_if-last") (result i32) - (block (result i32) (br_if 0 (i32.const 2) (block (result i32) (i32.const 1)))) - ) - - (func (export "as-br_table-first") (result i32) - (block (result i32) (block (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) - ) - (func (export "as-br_table-last") (result i32) - (block (result i32) (i32.const 2) (block (result i32) (i32.const 1)) (br_table 0 0)) - ) - - (func $$func (param i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-first") (result i32) - (block (result i32) - (call_indirect (type $$check) - (block (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 2) (block (result i32) (i32.const 1)) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 2) (block (result i32) (i32.const 0)) - ) - ) - ) - - (func (export "as-store-first") - (block (result i32) (i32.const 1)) (i32.const 1) (i32.store) - ) - (func (export "as-store-last") - (i32.const 10) (block (result i32) (i32.const 1)) (i32.store) - ) - - (func (export "as-memory.grow-value") (result i32) - (memory.grow (block (result i32) (i32.const 1))) - ) - - (func $$f (param i32) (result i32) (local.get 0)) - - (func (export "as-call-value") (result i32) - (call $$f (block (result i32) (i32.const 1))) - ) - (func (export "as-return-value") (result i32) - (block (result i32) (i32.const 1)) (return) - ) - (func (export "as-drop-operand") - (drop (block (result i32) (i32.const 1))) - ) - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (block (result i32) (i32.const 1)))) - ) - (func (export "as-local.set-value") (result i32) - (local i32) (local.set 0 (block (result i32) (i32.const 1))) (local.get 0) - ) - (func (export "as-local.tee-value") (result i32) - (local i32) (local.tee 0 (block (result i32) (i32.const 1))) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (result i32) - (global.set $$a (block (result i32) (i32.const 1))) - (global.get $$a) - ) - - (func (export "as-load-operand") (result i32) - (i32.load (block (result i32) (i32.const 1))) - ) - - (func (export "as-unary-operand") (result i32) - (i32.ctz (block (result i32) (call $$dummy) (i32.const 13))) - ) - (func (export "as-binary-operand") (result i32) - (i32.mul - (block (result i32) (call $$dummy) (i32.const 3)) - (block (result i32) (call $$dummy) (i32.const 4)) - ) - ) - (func (export "as-test-operand") (result i32) - (i32.eqz (block (result i32) (call $$dummy) (i32.const 13))) - ) - (func (export "as-compare-operand") (result i32) - (f32.gt - (block (result f32) (call $$dummy) (f32.const 3)) - (block (result f32) (call $$dummy) (f32.const 3)) - ) - ) - - (func (export "break-bare") (result i32) - (block (br 0) (unreachable)) - (block (br_if 0 (i32.const 1)) (unreachable)) - (block (br_table 0 (i32.const 0)) (unreachable)) - (block (br_table 0 0 0 (i32.const 1)) (unreachable)) - (i32.const 19) - ) - (func (export "break-value") (result i32) - (block (result i32) (br 0 (i32.const 18)) (i32.const 19)) - ) - (func (export "break-repeated") (result i32) - (block (result i32) - (br 0 (i32.const 18)) - (br 0 (i32.const 19)) - (drop (br_if 0 (i32.const 20) (i32.const 0))) - (drop (br_if 0 (i32.const 20) (i32.const 1))) - (br 0 (i32.const 21)) - (br_table 0 (i32.const 22) (i32.const 4)) - (br_table 0 0 0 (i32.const 23) (i32.const 1)) - (i32.const 21) - ) - ) - (func (export "break-inner") (result i32) - (local i32) - (local.set 0 (i32.const 0)) - (local.set 0 (i32.add (local.get 0) (block (result i32) (block (result i32) (br 1 (i32.const 0x1)))))) - (local.set 0 (i32.add (local.get 0) (block (result i32) (block (br 0)) (i32.const 0x2)))) - (local.set 0 - (i32.add (local.get 0) (block (result i32) (i32.ctz (br 0 (i32.const 0x4))))) - ) - (local.set 0 - (i32.add (local.get 0) (block (result i32) (i32.ctz (block (result i32) (br 1 (i32.const 0x8)))))) - ) - (local.get 0) - ) - - (func (export "effects") (result i32) - (local i32) - (block - (local.set 0 (i32.const 1)) - (local.set 0 (i32.mul (local.get 0) (i32.const 3))) - (local.set 0 (i32.sub (local.get 0) (i32.const 5))) - (local.set 0 (i32.mul (local.get 0) (i32.const 7))) - (br 0) - (local.set 0 (i32.mul (local.get 0) (i32.const 100))) - ) - (i32.eq (local.get 0) (i32.const -14)) - ) -)`); - -// ./test/core/block.wast:252 -assert_return(() => invoke($0, `empty`, []), []); - -// ./test/core/block.wast:253 -assert_return(() => invoke($0, `singular`, []), [value("i32", 7)]); - -// ./test/core/block.wast:254 -assert_return(() => invoke($0, `multi`, []), [value("i32", 8)]); - -// ./test/core/block.wast:255 -assert_return(() => invoke($0, `nested`, []), [value("i32", 9)]); - -// ./test/core/block.wast:256 -assert_return(() => invoke($0, `deep`, []), [value("i32", 150)]); - -// ./test/core/block.wast:258 -assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 1)]); - -// ./test/core/block.wast:259 -assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); - -// ./test/core/block.wast:260 -assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); - -// ./test/core/block.wast:262 -assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 1)]); - -// ./test/core/block.wast:263 -assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 1)]); - -// ./test/core/block.wast:264 -assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 1)]); - -// ./test/core/block.wast:266 -assert_return(() => invoke($0, `as-if-condition`, []), []); - -// ./test/core/block.wast:267 -assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 1)]); - -// ./test/core/block.wast:268 -assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 2)]); - -// ./test/core/block.wast:270 -assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 1)]); - -// ./test/core/block.wast:271 -assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); - -// ./test/core/block.wast:273 -assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 1)]); - -// ./test/core/block.wast:274 -assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); - -// ./test/core/block.wast:276 -assert_return(() => invoke($0, `as-call_indirect-first`, []), [ - value("i32", 1), -]); - -// ./test/core/block.wast:277 -assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); - -// ./test/core/block.wast:278 -assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 1)]); - -// ./test/core/block.wast:280 -assert_return(() => invoke($0, `as-store-first`, []), []); - -// ./test/core/block.wast:281 -assert_return(() => invoke($0, `as-store-last`, []), []); - -// ./test/core/block.wast:283 -assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:284 -assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:285 -assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:286 -assert_return(() => invoke($0, `as-drop-operand`, []), []); - -// ./test/core/block.wast:287 -assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:288 -assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:289 -assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:290 -assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); - -// ./test/core/block.wast:291 -assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); - -// ./test/core/block.wast:293 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); - -// ./test/core/block.wast:294 -assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 12)]); - -// ./test/core/block.wast:295 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/block.wast:296 -assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 0)]); - -// ./test/core/block.wast:298 -assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); - -// ./test/core/block.wast:299 -assert_return(() => invoke($0, `break-value`, []), [value("i32", 18)]); - -// ./test/core/block.wast:300 -assert_return(() => invoke($0, `break-repeated`, []), [value("i32", 18)]); - -// ./test/core/block.wast:301 -assert_return(() => invoke($0, `break-inner`, []), [value("i32", 15)]); - -// ./test/core/block.wast:303 -assert_return(() => invoke($0, `effects`, []), [value("i32", 1)]); - -// ./test/core/block.wast:305 -assert_invalid( - () => instantiate(`(module (func $$type-empty-i32 (result i32) (block)))`), - `type mismatch`, -); - -// ./test/core/block.wast:309 -assert_invalid( - () => instantiate(`(module (func $$type-empty-i64 (result i64) (block)))`), - `type mismatch`, -); - -// ./test/core/block.wast:313 -assert_invalid( - () => instantiate(`(module (func $$type-empty-f32 (result f32) (block)))`), - `type mismatch`, -); - -// ./test/core/block.wast:317 -assert_invalid( - () => instantiate(`(module (func $$type-empty-f64 (result f64) (block)))`), - `type mismatch`, -); - -// ./test/core/block.wast:322 -assert_invalid(() => - instantiate(`(module (func $$type-value-i32-vs-void - (block (i32.const 1)) - ))`), `type mismatch`); - -// ./test/core/block.wast:328 -assert_invalid(() => - instantiate(`(module (func $$type-value-i64-vs-void - (block (i64.const 1)) - ))`), `type mismatch`); - -// ./test/core/block.wast:334 -assert_invalid(() => - instantiate(`(module (func $$type-value-f32-vs-void - (block (f32.const 1.0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:340 -assert_invalid(() => - instantiate(`(module (func $$type-value-f64-vs-void - (block (f64.const 1.0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:347 -assert_invalid( - () => - instantiate(`(module (func $$type-value-empty-vs-i32 (result i32) - (block (result i32)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:353 -assert_invalid( - () => - instantiate(`(module (func $$type-value-empty-vs-i64 (result i64) - (block (result i64)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:359 -assert_invalid( - () => - instantiate(`(module (func $$type-value-empty-vs-f32 (result f32) - (block (result f32)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:365 -assert_invalid( - () => - instantiate(`(module (func $$type-value-empty-vs-f64 (result f64) - (block (result f64)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:372 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-block - (i32.const 0) - (block (block (result i32)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/block.wast:381 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-loop - (i32.const 0) - (loop (block (result i32)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/block.wast:390 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-then - (i32.const 0) (i32.const 0) - (if (then (block (result i32)) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/block.wast:400 -assert_invalid( - () => - instantiate(`(module (func $$type-value-void-vs-i32 (result i32) - (block (result i32) (nop)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:406 -assert_invalid( - () => - instantiate(`(module (func $$type-value-void-vs-i64 (result i64) - (block (result i64) (nop)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:412 -assert_invalid( - () => - instantiate(`(module (func $$type-value-void-vs-f32 (result f32) - (block (result f32) (nop)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:418 -assert_invalid( - () => - instantiate(`(module (func $$type-value-void-vs-f64 (result f64) - (block (result f64) (nop)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:425 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i32-vs-i64 (result i32) - (block (result i32) (i64.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:431 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i32-vs-f32 (result i32) - (block (result i32) (f32.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:437 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i32-vs-f64 (result i32) - (block (result i32) (f64.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:443 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i64-vs-i32 (result i64) - (block (result i64) (i32.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:449 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i64-vs-f32 (result i64) - (block (result i64) (f32.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:455 -assert_invalid( - () => - instantiate(`(module (func $$type-value-i64-vs-f64 (result i64) - (block (result i64) (f64.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:461 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f32-vs-i32 (result f32) - (block (result f32) (i32.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:467 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f32-vs-i64 (result f32) - (block (result f32) (i64.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:473 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f32-vs-f64 (result f32) - (block (result f32) (f64.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:479 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f64-vs-i32 (result f64) - (block (result f64) (i32.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:485 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f64-vs-i64 (result f64) - (block (result f64) (i64.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:491 -assert_invalid( - () => - instantiate(`(module (func $$type-value-f64-vs-f32 (result f32) - (block (result f64) (f32.const 0.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:498 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i32-i64 (result i32) - (block (result i64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:504 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i32-f32 (result i32) - (block (result f32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:510 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i32-f64 (result i32) - (block (result f64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:516 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i64-i32 (result i64) - (block (result i32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:522 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i64-f32 (result i64) - (block (result f32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:528 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-i64-f64 (result i64) - (block (result f64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:534 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f32-i32 (result f32) - (block (result i32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:540 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f32-i64 (result f32) - (block (result i64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:546 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f32-f64 (result f32) - (block (result f64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:552 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f64-i32 (result f64) - (block (result i32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:558 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f64-i64 (result f64) - (block (result i64) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:564 -assert_invalid( - () => - instantiate( - `(module (func $$type-value-unreached-select-f64-f32 (result f64) - (block (result f32) (select (unreachable) (unreachable) (unreachable))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/block.wast:571 -assert_invalid( - () => - instantiate(`(module (func $$type-break-last-void-vs-i32 (result i32) - (block (result i32) (br 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:577 -assert_invalid( - () => - instantiate(`(module (func $$type-break-last-void-vs-i64 (result i64) - (block (result i64) (br 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:583 -assert_invalid( - () => - instantiate(`(module (func $$type-break-last-void-vs-f32 (result f32) - (block (result f32) (br 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:589 -assert_invalid( - () => - instantiate(`(module (func $$type-break-last-void-vs-f64 (result f64) - (block (result f64) (br 0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:596 -assert_invalid( - () => - instantiate(`(module (func $$type-break-empty-vs-i32 (result i32) - (block (result i32) (br 0) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:602 -assert_invalid( - () => - instantiate(`(module (func $$type-break-empty-vs-i64 (result i64) - (block (result i64) (br 0) (i64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:608 -assert_invalid( - () => - instantiate(`(module (func $$type-break-empty-vs-f32 (result f32) - (block (result f32) (br 0) (f32.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:614 -assert_invalid( - () => - instantiate(`(module (func $$type-break-empty-vs-f64 (result f64) - (block (result f64) (br 0) (f64.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:621 -assert_invalid( - () => - instantiate(`(module (func $$type-break-void-vs-i32 (result i32) - (block (result i32) (br 0 (nop)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:627 -assert_invalid( - () => - instantiate(`(module (func $$type-break-void-vs-i64 (result i64) - (block (result i64) (br 0 (nop)) (i64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:633 -assert_invalid( - () => - instantiate(`(module (func $$type-break-void-vs-f32 (result f32) - (block (result f32) (br 0 (nop)) (f32.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:639 -assert_invalid( - () => - instantiate(`(module (func $$type-break-void-vs-f64 (result f64) - (block (result f64) (br 0 (nop)) (f64.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:646 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i32-vs-i64 (result i32) - (block (result i32) (br 0 (i64.const 1)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:652 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i32-vs-f32 (result i32) - (block (result i32) (br 0 (f32.const 1.0)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:658 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i32-vs-f64 (result i32) - (block (result i32) (br 0 (f64.const 1.0)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:664 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i64-vs-i32 (result i64) - (block (result i64) (br 0 (i32.const 1)) (i64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:670 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i64-vs-f32 (result i64) - (block (result i64) (br 0 (f32.const 1.0)) (i64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:676 -assert_invalid( - () => - instantiate(`(module (func $$type-break-i64-vs-f64 (result i64) - (block (result i64) (br 0 (f64.const 1.0)) (i64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:682 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f32-vs-i32 (result f32) - (block (result f32) (br 0 (i32.const 1)) (f32.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:688 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f32-vs-i64 (result f32) - (block (result f32) (br 0 (i64.const 1)) (f32.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:694 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f32-vs-f64 (result f32) - (block (result f32) (br 0 (f64.const 1.0)) (f32.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:700 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f64-vs-i32 (result f64) - (block (result i64) (br 0 (i32.const 1)) (f64.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:706 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f64-vs-i64 (result f64) - (block (result f64) (br 0 (i64.const 1)) (f64.const 1.0)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:712 -assert_invalid( - () => - instantiate(`(module (func $$type-break-f64-vs-f32 (result f64) - (block (result f64) (br 0 (f32.const 1.0)) (f64.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:719 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-void-vs-i32 (result i32) - (block (result i32) (br 0 (nop)) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:725 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-void-vs-i64 (result i64) - (block (result i64) (br 0 (nop)) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:731 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-void-vs-f32 (result f32) - (block (result f32) (br 0 (nop)) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:737 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-void-vs-f64 (result f64) - (block (result f64) (br 0 (nop)) (br 0 (f64.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:744 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i32-vs-i64 (result i32) - (block (result i32) (br 0 (i64.const 1)) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:750 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i32-vs-f32 (result i32) - (block (result i32) (br 0 (f32.const 1.0)) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:756 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i32-vs-f64 (result i32) - (block (result i32) (br 0 (f64.const 1.0)) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:762 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i64-vs-i32 (result i64) - (block (result i64) (br 0 (i32.const 1)) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:768 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i64-vs-f32 (result i64) - (block (result i64) (br 0 (f32.const 1.0)) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:774 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-i64-vs-f64 (result i64) - (block (result i64) (br 0 (f64.const 1.0)) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:780 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f32-vs-i32 (result f32) - (block (result f32) (br 0 (i32.const 1)) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:786 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f32-vs-i64 (result f32) - (block (result f32) (br 0 (i64.const 1)) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:792 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f32-vs-f64 (result f32) - (block (result f32) (br 0 (f64.const 1.0)) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:798 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f64-vs-i32 (result f64) - (block (result f64) (br 0 (i32.const 1)) (br 0 (f64.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:804 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f64-vs-i64 (result f64) - (block (result f64) (br 0 (i64.const 1)) (br 0 (f64.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:810 -assert_invalid( - () => - instantiate(`(module (func $$type-break-first-f64-vs-f32 (result f64) - (block (result f64) (br 0 (f32.const 1.0)) (br 0 (f64.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:817 -assert_invalid(() => - instantiate(`(module (func $$type-break-nested-i32-vs-void - (block (result i32) (block (result i32) (br 1 (i32.const 1))) (br 0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:823 -assert_invalid(() => - instantiate(`(module (func $$type-break-nested-i64-vs-void - (block (result i64) (block (result i64) (br 1 (i64.const 1))) (br 0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:829 -assert_invalid(() => - instantiate(`(module (func $$type-break-nested-f32-vs-void - (block (result f32) (block (result f32) (br 1 (f32.const 1.0))) (br 0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:835 -assert_invalid(() => - instantiate(`(module (func $$type-break-nested-f64-vs-void - (block (result f64) (block (result f64) (br 1 (f64.const 1.0))) (br 0)) - ))`), `type mismatch`); - -// ./test/core/block.wast:842 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-empty-vs-i32 (result i32) - (block (result i32) (block (br 1)) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:848 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-empty-vs-i64 (result i64) - (block (result i64) (block (br 1)) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:854 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-empty-vs-f32 (result f32) - (block (result f32) (block (br 1)) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:860 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-empty-vs-f64 (result f64) - (block (result f64) (block (br 1)) (br 0 (f64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:867 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-void-vs-i32 (result i32) - (block (result i32) (block (result i32) (br 1 (nop))) (br 0 (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:873 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-void-vs-i64 (result i64) - (block (result i64) (block (result i64) (br 1 (nop))) (br 0 (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:879 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-void-vs-f32 (result f32) - (block (result f32) (block (result f32) (br 1 (nop))) (br 0 (f32.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:885 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-void-vs-f64 (result f64) - (block (result f64) (block (result f64) (br 1 (nop))) (br 0 (f64.const 1.0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:892 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i32-vs-i64 (result i32) - (block (result i32) - (block (result i32) (br 1 (i64.const 1))) (br 0 (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:900 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i32-vs-f32 (result i32) - (block (result i32) - (block (result i32) (br 1 (f32.const 1.0))) (br 0 (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:908 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i32-vs-f64 (result i32) - (block (result i32) - (block (result i32) (br 1 (f64.const 1.0))) (br 0 (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:916 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i64-vs-i32 (result i64) - (block (result i64) - (block (result i64) (br 1 (i32.const 1))) (br 0 (i64.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:924 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i64-vs-f32 (result i64) - (block (result i64) - (block (result i64) (br 1 (f32.const 1.0))) (br 0 (i64.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:932 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-i64-vs-f64 (result i64) - (block (result i64) - (block (result i64) (br 1 (f64.const 1.0))) (br 0 (i64.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:940 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f32-vs-i32 (result f32) - (block (result f32) - (block (result f32) (br 1 (i32.const 1))) (br 0 (f32.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:948 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f32-vs-i64 (result f32) - (block (result f32) - (block (result f32) (br 1 (i64.const 1))) (br 0 (f32.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:956 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f32-vs-f64 (result f32) - (block (result f32) - (block (result f32) (br 1 (f64.const 1.0))) (br 0 (f32.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:964 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f64-vs-i32 (result f64) - (block (result f64) - (block (result f64) (br 1 (i32.const 1))) (br 0 (f64.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:972 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f64-vs-i64 (result f64) - (block (result f64) - (block (result f64) (br 1 (i64.const 1))) (br 0 (f64.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:980 -assert_invalid( - () => - instantiate(`(module (func $$type-break-nested-f64-vs-f32 (result f64) - (block (result f64) - (block (result f64) (br 1 (f32.const 1.0))) (br 0 (f64.const 1.0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:989 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-empty-vs-i32 (result i32) - (i32.ctz (block (br 0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:995 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-empty-vs-i64 (result i64) - (i64.ctz (block (br 0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1001 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-empty-vs-f32 (result f32) - (f32.floor (block (br 0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1007 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-empty-vs-f64 (result f64) - (f64.floor (block (br 0))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1014 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-void-vs-i32 (result i32) - (i32.ctz (block (br 0 (nop)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1020 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-void-vs-i64 (result i64) - (i64.ctz (block (br 0 (nop)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1026 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-void-vs-f32 (result f32) - (f32.floor (block (br 0 (nop)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1032 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-void-vs-f64 (result f64) - (f64.floor (block (br 0 (nop)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1039 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i32-vs-i64 (result i32) - (i64.ctz (block (br 0 (i64.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1045 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i32-vs-f32 (result i32) - (f32.floor (block (br 0 (f32.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1051 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i32-vs-f64 (result i32) - (f64.floor (block (br 0 (f64.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1057 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i64-vs-i32 (result i64) - (i32.ctz (block (br 0 (i32.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1063 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i64-vs-f32 (result i64) - (f32.floor (block (br 0 (f32.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1069 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-i64-vs-f64 (result i64) - (f64.floor (block (br 0 (f64.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1075 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f32-vs-i32 (result f32) - (i32.ctz (block (br 0 (i32.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1081 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f32-vs-i64 (result f32) - (i64.ctz (block (br 0 (i64.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1087 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f32-vs-f64 (result f32) - (f64.floor (block (br 0 (f64.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1093 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f64-vs-i32 (result f64) - (i32.ctz (block (br 0 (i32.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1099 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f64-vs-i64 (result f64) - (i64.ctz (block (br 0 (i64.const 9)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1105 -assert_invalid( - () => - instantiate(`(module (func $$type-break-operand-f64-vs-f32 (result f64) - (f32.floor (block (br 0 (f32.const 9.0)))) - ))`), - `type mismatch`, -); - -// ./test/core/block.wast:1113 -assert_malformed( - () => instantiate(`(func block end $$l) `), - `mismatching label`, -); - -// ./test/core/block.wast:1117 -assert_malformed( - () => instantiate(`(func block $$a end $$l) `), - `mismatching label`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/br.wast.js b/js/src/jit-test/tests/wasm/spec/threads/br.wast.js deleted file mode 100644 index 6b8c10b2c03c..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/br.wast.js +++ /dev/null @@ -1,755 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/br.wast - -// ./test/core/br.wast:3 -let $0 = instantiate(`(module - ;; Auxiliary definition - (func $$dummy) - - (func (export "type-i32") (block (drop (i32.ctz (br 0))))) - (func (export "type-i64") (block (drop (i64.ctz (br 0))))) - (func (export "type-f32") (block (drop (f32.neg (br 0))))) - (func (export "type-f64") (block (drop (f64.neg (br 0))))) - - (func (export "type-i32-value") (result i32) - (block (result i32) (i32.ctz (br 0 (i32.const 1)))) - ) - (func (export "type-i64-value") (result i64) - (block (result i64) (i64.ctz (br 0 (i64.const 2)))) - ) - (func (export "type-f32-value") (result f32) - (block (result f32) (f32.neg (br 0 (f32.const 3)))) - ) - (func (export "type-f64-value") (result f64) - (block (result f64) (f64.neg (br 0 (f64.const 4)))) - ) - - (func (export "as-block-first") - (block (br 0) (call $$dummy)) - ) - (func (export "as-block-mid") - (block (call $$dummy) (br 0) (call $$dummy)) - ) - (func (export "as-block-last") - (block (nop) (call $$dummy) (br 0)) - ) - (func (export "as-block-value") (result i32) - (block (result i32) (nop) (call $$dummy) (br 0 (i32.const 2))) - ) - - (func (export "as-loop-first") (result i32) - (block (result i32) (loop (result i32) (br 1 (i32.const 3)) (i32.const 2))) - ) - (func (export "as-loop-mid") (result i32) - (block (result i32) - (loop (result i32) (call $$dummy) (br 1 (i32.const 4)) (i32.const 2)) - ) - ) - (func (export "as-loop-last") (result i32) - (block (result i32) - (loop (result i32) (nop) (call $$dummy) (br 1 (i32.const 5))) - ) - ) - - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (br 0 (i32.const 9)))) - ) - - (func (export "as-br_if-cond") - (block (br_if 0 (br 0))) - ) - (func (export "as-br_if-value") (result i32) - (block (result i32) - (drop (br_if 0 (br 0 (i32.const 8)) (i32.const 1))) (i32.const 7) - ) - ) - (func (export "as-br_if-value-cond") (result i32) - (block (result i32) - (drop (br_if 0 (i32.const 6) (br 0 (i32.const 9)))) (i32.const 7) - ) - ) - - (func (export "as-br_table-index") - (block (br_table 0 0 0 (br 0))) - ) - (func (export "as-br_table-value") (result i32) - (block (result i32) - (br_table 0 0 0 (br 0 (i32.const 10)) (i32.const 1)) (i32.const 7) - ) - ) - (func (export "as-br_table-value-index") (result i32) - (block (result i32) - (br_table 0 0 (i32.const 6) (br 0 (i32.const 11))) (i32.const 7) - ) - ) - - (func (export "as-return-value") (result i64) - (block (result i64) (return (br 0 (i64.const 7)))) - ) - - (func (export "as-if-cond") (result i32) - (block (result i32) - (if (result i32) (br 0 (i32.const 2)) - (then (i32.const 0)) - (else (i32.const 1)) - ) - ) - ) - (func (export "as-if-then") (param i32 i32) (result i32) - (block (result i32) - (if (result i32) (local.get 0) - (then (br 1 (i32.const 3))) - (else (local.get 1)) - ) - ) - ) - (func (export "as-if-else") (param i32 i32) (result i32) - (block (result i32) - (if (result i32) (local.get 0) - (then (local.get 1)) - (else (br 1 (i32.const 4))) - ) - ) - ) - - (func (export "as-select-first") (param i32 i32) (result i32) - (block (result i32) - (select (br 0 (i32.const 5)) (local.get 0) (local.get 1)) - ) - ) - (func (export "as-select-second") (param i32 i32) (result i32) - (block (result i32) - (select (local.get 0) (br 0 (i32.const 6)) (local.get 1)) - ) - ) - (func (export "as-select-cond") (result i32) - (block (result i32) - (select (i32.const 0) (i32.const 1) (br 0 (i32.const 7))) - ) - ) - - (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) - (func (export "as-call-first") (result i32) - (block (result i32) - (call $$f (br 0 (i32.const 12)) (i32.const 2) (i32.const 3)) - ) - ) - (func (export "as-call-mid") (result i32) - (block (result i32) - (call $$f (i32.const 1) (br 0 (i32.const 13)) (i32.const 3)) - ) - ) - (func (export "as-call-last") (result i32) - (block (result i32) - (call $$f (i32.const 1) (i32.const 2) (br 0 (i32.const 14))) - ) - ) - - (type $$sig (func (param i32 i32 i32) (result i32))) - (table funcref (elem $$f)) - (func (export "as-call_indirect-func") (result i32) - (block (result i32) - (call_indirect (type $$sig) - (br 0 (i32.const 20)) - (i32.const 1) (i32.const 2) (i32.const 3) - ) - ) - ) - (func (export "as-call_indirect-first") (result i32) - (block (result i32) - (call_indirect (type $$sig) - (i32.const 0) - (br 0 (i32.const 21)) (i32.const 2) (i32.const 3) - ) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (block (result i32) - (call_indirect (type $$sig) - (i32.const 0) - (i32.const 1) (br 0 (i32.const 22)) (i32.const 3) - ) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (block (result i32) - (call_indirect (type $$sig) - (i32.const 0) - (i32.const 1) (i32.const 2) (br 0 (i32.const 23)) - ) - ) - ) - - (func (export "as-local.set-value") (result i32) (local f32) - (block (result i32) (local.set 0 (br 0 (i32.const 17))) (i32.const -1)) - ) - (func (export "as-local.tee-value") (result i32) (local i32) - (block (result i32) (local.tee 0 (br 0 (i32.const 1)))) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (result i32) - (block (result i32) (global.set $$a (br 0 (i32.const 1)))) - ) - - (memory 1) - (func (export "as-load-address") (result f32) - (block (result f32) (f32.load (br 0 (f32.const 1.7)))) - ) - (func (export "as-loadN-address") (result i64) - (block (result i64) (i64.load8_s (br 0 (i64.const 30)))) - ) - - (func (export "as-store-address") (result i32) - (block (result i32) - (f64.store (br 0 (i32.const 30)) (f64.const 7)) (i32.const -1) - ) - ) - (func (export "as-store-value") (result i32) - (block (result i32) - (i64.store (i32.const 2) (br 0 (i32.const 31))) (i32.const -1) - ) - ) - - (func (export "as-storeN-address") (result i32) - (block (result i32) - (i32.store8 (br 0 (i32.const 32)) (i32.const 7)) (i32.const -1) - ) - ) - (func (export "as-storeN-value") (result i32) - (block (result i32) - (i64.store16 (i32.const 2) (br 0 (i32.const 33))) (i32.const -1) - ) - ) - - (func (export "as-unary-operand") (result f32) - (block (result f32) (f32.neg (br 0 (f32.const 3.4)))) - ) - - (func (export "as-binary-left") (result i32) - (block (result i32) (i32.add (br 0 (i32.const 3)) (i32.const 10))) - ) - (func (export "as-binary-right") (result i64) - (block (result i64) (i64.sub (i64.const 10) (br 0 (i64.const 45)))) - ) - - (func (export "as-test-operand") (result i32) - (block (result i32) (i32.eqz (br 0 (i32.const 44)))) - ) - - (func (export "as-compare-left") (result i32) - (block (result i32) (f64.le (br 0 (i32.const 43)) (f64.const 10))) - ) - (func (export "as-compare-right") (result i32) - (block (result i32) (f32.ne (f32.const 10) (br 0 (i32.const 42)))) - ) - - (func (export "as-convert-operand") (result i32) - (block (result i32) (i32.wrap_i64 (br 0 (i32.const 41)))) - ) - - (func (export "as-memory.grow-size") (result i32) - (block (result i32) (memory.grow (br 0 (i32.const 40)))) - ) - - (func (export "nested-block-value") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (call $$dummy) - (i32.add (i32.const 4) (br 0 (i32.const 8))) - ) - ) - ) - - (func (export "nested-br-value") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop - (block (result i32) - (drop (i32.const 4)) - (br 0 (br 1 (i32.const 8))) - ) - ) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_if-value") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop - (block (result i32) - (drop (i32.const 4)) - (drop (br_if 0 (br 1 (i32.const 8)) (i32.const 1))) - (i32.const 32) - ) - ) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_if-value-cond") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop (br_if 0 (i32.const 4) (br 0 (i32.const 8)))) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_table-value") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop - (block (result i32) - (drop (i32.const 4)) - (br_table 0 (br 1 (i32.const 8)) (i32.const 1)) - ) - ) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_table-value-index") (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (br_table 0 (i32.const 4) (br 0 (i32.const 8))) - (i32.const 16) - ) - ) - ) -)`); - -// ./test/core/br.wast:334 -assert_return(() => invoke($0, `type-i32`, []), []); - -// ./test/core/br.wast:335 -assert_return(() => invoke($0, `type-i64`, []), []); - -// ./test/core/br.wast:336 -assert_return(() => invoke($0, `type-f32`, []), []); - -// ./test/core/br.wast:337 -assert_return(() => invoke($0, `type-f64`, []), []); - -// ./test/core/br.wast:339 -assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); - -// ./test/core/br.wast:340 -assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); - -// ./test/core/br.wast:341 -assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); - -// ./test/core/br.wast:342 -assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); - -// ./test/core/br.wast:344 -assert_return(() => invoke($0, `as-block-first`, []), []); - -// ./test/core/br.wast:345 -assert_return(() => invoke($0, `as-block-mid`, []), []); - -// ./test/core/br.wast:346 -assert_return(() => invoke($0, `as-block-last`, []), []); - -// ./test/core/br.wast:347 -assert_return(() => invoke($0, `as-block-value`, []), [value("i32", 2)]); - -// ./test/core/br.wast:349 -assert_return(() => invoke($0, `as-loop-first`, []), [value("i32", 3)]); - -// ./test/core/br.wast:350 -assert_return(() => invoke($0, `as-loop-mid`, []), [value("i32", 4)]); - -// ./test/core/br.wast:351 -assert_return(() => invoke($0, `as-loop-last`, []), [value("i32", 5)]); - -// ./test/core/br.wast:353 -assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 9)]); - -// ./test/core/br.wast:355 -assert_return(() => invoke($0, `as-br_if-cond`, []), []); - -// ./test/core/br.wast:356 -assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 8)]); - -// ./test/core/br.wast:357 -assert_return(() => invoke($0, `as-br_if-value-cond`, []), [value("i32", 9)]); - -// ./test/core/br.wast:359 -assert_return(() => invoke($0, `as-br_table-index`, []), []); - -// ./test/core/br.wast:360 -assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 10)]); - -// ./test/core/br.wast:361 -assert_return(() => invoke($0, `as-br_table-value-index`, []), [ - value("i32", 11), -]); - -// ./test/core/br.wast:363 -assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 7n)]); - -// ./test/core/br.wast:365 -assert_return(() => invoke($0, `as-if-cond`, []), [value("i32", 2)]); - -// ./test/core/br.wast:366 -assert_return(() => invoke($0, `as-if-then`, [1, 6]), [value("i32", 3)]); - -// ./test/core/br.wast:367 -assert_return(() => invoke($0, `as-if-then`, [0, 6]), [value("i32", 6)]); - -// ./test/core/br.wast:368 -assert_return(() => invoke($0, `as-if-else`, [0, 6]), [value("i32", 4)]); - -// ./test/core/br.wast:369 -assert_return(() => invoke($0, `as-if-else`, [1, 6]), [value("i32", 6)]); - -// ./test/core/br.wast:371 -assert_return(() => invoke($0, `as-select-first`, [0, 6]), [value("i32", 5)]); - -// ./test/core/br.wast:372 -assert_return(() => invoke($0, `as-select-first`, [1, 6]), [value("i32", 5)]); - -// ./test/core/br.wast:373 -assert_return(() => invoke($0, `as-select-second`, [0, 6]), [value("i32", 6)]); - -// ./test/core/br.wast:374 -assert_return(() => invoke($0, `as-select-second`, [1, 6]), [value("i32", 6)]); - -// ./test/core/br.wast:375 -assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 7)]); - -// ./test/core/br.wast:377 -assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); - -// ./test/core/br.wast:378 -assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); - -// ./test/core/br.wast:379 -assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); - -// ./test/core/br.wast:381 -assert_return(() => invoke($0, `as-call_indirect-func`, []), [ - value("i32", 20), -]); - -// ./test/core/br.wast:382 -assert_return(() => invoke($0, `as-call_indirect-first`, []), [ - value("i32", 21), -]); - -// ./test/core/br.wast:383 -assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 22)]); - -// ./test/core/br.wast:384 -assert_return(() => invoke($0, `as-call_indirect-last`, []), [ - value("i32", 23), -]); - -// ./test/core/br.wast:386 -assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 17)]); - -// ./test/core/br.wast:387 -assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); - -// ./test/core/br.wast:388 -assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); - -// ./test/core/br.wast:390 -assert_return(() => invoke($0, `as-load-address`, []), [value("f32", 1.7)]); - -// ./test/core/br.wast:391 -assert_return(() => invoke($0, `as-loadN-address`, []), [value("i64", 30n)]); - -// ./test/core/br.wast:393 -assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); - -// ./test/core/br.wast:394 -assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); - -// ./test/core/br.wast:395 -assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); - -// ./test/core/br.wast:396 -assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); - -// ./test/core/br.wast:398 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 3.4)]); - -// ./test/core/br.wast:400 -assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 3)]); - -// ./test/core/br.wast:401 -assert_return(() => invoke($0, `as-binary-right`, []), [value("i64", 45n)]); - -// ./test/core/br.wast:403 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 44)]); - -// ./test/core/br.wast:405 -assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 43)]); - -// ./test/core/br.wast:406 -assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 42)]); - -// ./test/core/br.wast:408 -assert_return(() => invoke($0, `as-convert-operand`, []), [value("i32", 41)]); - -// ./test/core/br.wast:410 -assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 40)]); - -// ./test/core/br.wast:412 -assert_return(() => invoke($0, `nested-block-value`, []), [value("i32", 9)]); - -// ./test/core/br.wast:413 -assert_return(() => invoke($0, `nested-br-value`, []), [value("i32", 9)]); - -// ./test/core/br.wast:414 -assert_return(() => invoke($0, `nested-br_if-value`, []), [value("i32", 9)]); - -// ./test/core/br.wast:415 -assert_return(() => invoke($0, `nested-br_if-value-cond`, []), [ - value("i32", 9), -]); - -// ./test/core/br.wast:416 -assert_return(() => invoke($0, `nested-br_table-value`, []), [value("i32", 9)]); - -// ./test/core/br.wast:417 -assert_return(() => invoke($0, `nested-br_table-value-index`, []), [ - value("i32", 9), -]); - -// ./test/core/br.wast:419 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-empty-vs-num (result i32) - (block (result i32) (br 0) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br.wast:426 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-void-vs-num (result i32) - (block (result i32) (br 0 (nop)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br.wast:432 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) - (block (result i32) (i32.const 0) (block (br 1))) - ))`), - `type mismatch`, -); - -// ./test/core/br.wast:438 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-num-vs-num (result i32) - (block (result i32) (br 0 (i64.const 1)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br.wast:445 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-br - (i32.const 0) - (block (result i32) (br 0 (br 0))) (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:454 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-br_if - (i32.const 0) - (block (result i32) (br_if 0 (br 0) (i32.const 1))) (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:463 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-br_table - (i32.const 0) - (block (result i32) (br_table 0 (br 0))) (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:472 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-return - (block (result i32) - (return (br 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:483 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-select - (block (result i32) - (select (br 0) (i32.const 1) (i32.const 2)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:494 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-call - (block (result i32) - (call 1 (br 0)) - ) - (i32.eqz) (drop) - ) - (func (param i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/br.wast:506 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-arg-empty-in-call_indirect - (block (result i32) - (call_indirect (type $$sig) - (br 0) (i32.const 0) - ) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:522 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-local.set - (local i32) - (block (result i32) - (local.set 0 (br 0)) (local.get 0) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:534 -assert_invalid(() => - instantiate(`(module - (func $$type-arg-empty-in-local.tee - (local i32) - (block (result i32) - (local.tee 0 (br 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:546 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-arg-empty-in-global.set - (block (result i32) - (global.set $$x (br 0)) (global.get $$x) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:558 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-arg-empty-in-memory.grow - (block (result i32) - (memory.grow (br 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:570 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-arg-empty-in-load - (block (result i32) - (i32.load (br 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:582 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-arg-empty-in-store - (block (result i32) - (i32.store (br 0) (i32.const 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br.wast:595 -assert_invalid( - () => instantiate(`(module (func $$unbound-label (br 1)))`), - `unknown label`, -); - -// ./test/core/br.wast:599 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-nested-label (block (block (br 5)))))`, - ), - `unknown label`, -); - -// ./test/core/br.wast:603 -assert_invalid( - () => instantiate(`(module (func $$large-label (br 0x10000001)))`), - `unknown label`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/br_if.wast.js b/js/src/jit-test/tests/wasm/spec/threads/br_if.wast.js deleted file mode 100644 index 947f397da6c8..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/br_if.wast.js +++ /dev/null @@ -1,927 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/br_if.wast - -// ./test/core/br_if.wast:3 -let $0 = instantiate(`(module - (func $$dummy) - - (func (export "type-i32") - (block (drop (i32.ctz (br_if 0 (i32.const 0) (i32.const 1))))) - ) - (func (export "type-i64") - (block (drop (i64.ctz (br_if 0 (i64.const 0) (i32.const 1))))) - ) - (func (export "type-f32") - (block (drop (f32.neg (br_if 0 (f32.const 0) (i32.const 1))))) - ) - (func (export "type-f64") - (block (drop (f64.neg (br_if 0 (f64.const 0) (i32.const 1))))) - ) - - (func (export "type-i32-value") (result i32) - (block (result i32) (i32.ctz (br_if 0 (i32.const 1) (i32.const 1)))) - ) - (func (export "type-i64-value") (result i64) - (block (result i64) (i64.ctz (br_if 0 (i64.const 2) (i32.const 1)))) - ) - (func (export "type-f32-value") (result f32) - (block (result f32) (f32.neg (br_if 0 (f32.const 3) (i32.const 1)))) - ) - (func (export "type-f64-value") (result f64) - (block (result f64) (f64.neg (br_if 0 (f64.const 4) (i32.const 1)))) - ) - - (func (export "as-block-first") (param i32) (result i32) - (block (br_if 0 (local.get 0)) (return (i32.const 2))) (i32.const 3) - ) - (func (export "as-block-mid") (param i32) (result i32) - (block (call $$dummy) (br_if 0 (local.get 0)) (return (i32.const 2))) - (i32.const 3) - ) - (func (export "as-block-last") (param i32) - (block (call $$dummy) (call $$dummy) (br_if 0 (local.get 0))) - ) - (func (export "as-block-first-value") (param i32) (result i32) - (block (result i32) - (drop (br_if 0 (i32.const 10) (local.get 0))) (return (i32.const 11)) - ) - ) - (func (export "as-block-mid-value") (param i32) (result i32) - (block (result i32) - (call $$dummy) - (drop (br_if 0 (i32.const 20) (local.get 0))) - (return (i32.const 21)) - ) - ) - (func (export "as-block-last-value") (param i32) (result i32) - (block (result i32) - (call $$dummy) (call $$dummy) (br_if 0 (i32.const 11) (local.get 0)) - ) - ) - - (func (export "as-loop-first") (param i32) (result i32) - (block (loop (br_if 1 (local.get 0)) (return (i32.const 2)))) (i32.const 3) - ) - (func (export "as-loop-mid") (param i32) (result i32) - (block (loop (call $$dummy) (br_if 1 (local.get 0)) (return (i32.const 2)))) - (i32.const 4) - ) - (func (export "as-loop-last") (param i32) - (loop (call $$dummy) (br_if 1 (local.get 0))) - ) - - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (br_if 0 (i32.const 1) (i32.const 2)))) - ) - - (func (export "as-br_if-cond") - (block (br_if 0 (br_if 0 (i32.const 1) (i32.const 1)))) - ) - (func (export "as-br_if-value") (result i32) - (block (result i32) - (drop (br_if 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3))) - (i32.const 4) - ) - ) - (func (export "as-br_if-value-cond") (param i32) (result i32) - (block (result i32) - (drop (br_if 0 (i32.const 2) (br_if 0 (i32.const 1) (local.get 0)))) - (i32.const 4) - ) - ) - - (func (export "as-br_table-index") - (block (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)))) - ) - (func (export "as-br_table-value") (result i32) - (block (result i32) - (br_table 0 0 0 (br_if 0 (i32.const 1) (i32.const 2)) (i32.const 3)) (i32.const 4) - ) - ) - (func (export "as-br_table-value-index") (result i32) - (block (result i32) - (br_table 0 0 (i32.const 2) (br_if 0 (i32.const 1) (i32.const 3))) (i32.const 4) - ) - ) - (func (export "as-return-value") (result i64) - (block (result i64) (return (br_if 0 (i64.const 1) (i32.const 2)))) - ) - - (func (export "as-if-cond") (param i32) (result i32) - (block (result i32) - (if (result i32) - (br_if 0 (i32.const 1) (local.get 0)) - (then (i32.const 2)) - (else (i32.const 3)) - ) - ) - ) - (func (export "as-if-then") (param i32 i32) - (block - (if (local.get 0) (then (br_if 1 (local.get 1))) (else (call $$dummy))) - ) - ) - (func (export "as-if-else") (param i32 i32) - (block - (if (local.get 0) (then (call $$dummy)) (else (br_if 1 (local.get 1)))) - ) - ) - - (func (export "as-select-first") (param i32) (result i32) - (block (result i32) - (select (br_if 0 (i32.const 3) (i32.const 10)) (i32.const 2) (local.get 0)) - ) - ) - (func (export "as-select-second") (param i32) (result i32) - (block (result i32) - (select (i32.const 1) (br_if 0 (i32.const 3) (i32.const 10)) (local.get 0)) - ) - ) - (func (export "as-select-cond") (result i32) - (block (result i32) - (select (i32.const 1) (i32.const 2) (br_if 0 (i32.const 3) (i32.const 10))) - ) - ) - - (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) - (func (export "as-call-first") (result i32) - (block (result i32) - (call $$f - (br_if 0 (i32.const 12) (i32.const 1)) (i32.const 2) (i32.const 3) - ) - ) - ) - (func (export "as-call-mid") (result i32) - (block (result i32) - (call $$f - (i32.const 1) (br_if 0 (i32.const 13) (i32.const 1)) (i32.const 3) - ) - ) - ) - (func (export "as-call-last") (result i32) - (block (result i32) - (call $$f - (i32.const 1) (i32.const 2) (br_if 0 (i32.const 14) (i32.const 1)) - ) - ) - ) - - (func $$func (param i32 i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-func") (result i32) - (block (result i32) - (call_indirect (type $$check) - (br_if 0 (i32.const 4) (i32.const 10)) - (i32.const 1) (i32.const 2) (i32.const 0) - ) - ) - ) - - (func (export "as-call_indirect-first") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 2) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 2) (br_if 0 (i32.const 4) (i32.const 10)) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 2) (i32.const 3) (br_if 0 (i32.const 4) (i32.const 10)) - ) - ) - ) - - (func (export "as-local.set-value") (param i32) (result i32) - (local i32) - (block (result i32) - (local.set 0 (br_if 0 (i32.const 17) (local.get 0))) - (i32.const -1) - ) - ) - (func (export "as-local.tee-value") (param i32) (result i32) - (block (result i32) - (local.tee 0 (br_if 0 (i32.const 1) (local.get 0))) - (return (i32.const -1)) - ) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (param i32) (result i32) - (block (result i32) - (global.set $$a (br_if 0 (i32.const 1) (local.get 0))) - (return (i32.const -1)) - ) - ) - - (memory 1) - (func (export "as-load-address") (result i32) - (block (result i32) (i32.load (br_if 0 (i32.const 1) (i32.const 1)))) - ) - (func (export "as-loadN-address") (result i32) - (block (result i32) (i32.load8_s (br_if 0 (i32.const 30) (i32.const 1)))) - ) - - (func (export "as-store-address") (result i32) - (block (result i32) - (i32.store (br_if 0 (i32.const 30) (i32.const 1)) (i32.const 7)) (i32.const -1) - ) - ) - (func (export "as-store-value") (result i32) - (block (result i32) - (i32.store (i32.const 2) (br_if 0 (i32.const 31) (i32.const 1))) (i32.const -1) - ) - ) - - (func (export "as-storeN-address") (result i32) - (block (result i32) - (i32.store8 (br_if 0 (i32.const 32) (i32.const 1)) (i32.const 7)) (i32.const -1) - ) - ) - (func (export "as-storeN-value") (result i32) - (block (result i32) - (i32.store16 (i32.const 2) (br_if 0 (i32.const 33) (i32.const 1))) (i32.const -1) - ) - ) - - (func (export "as-unary-operand") (result f64) - (block (result f64) (f64.neg (br_if 0 (f64.const 1.0) (i32.const 1)))) - ) - (func (export "as-binary-left") (result i32) - (block (result i32) (i32.add (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) - ) - (func (export "as-binary-right") (result i32) - (block (result i32) (i32.sub (i32.const 10) (br_if 0 (i32.const 1) (i32.const 1)))) - ) - (func (export "as-test-operand") (result i32) - (block (result i32) (i32.eqz (br_if 0 (i32.const 0) (i32.const 1)))) - ) - (func (export "as-compare-left") (result i32) - (block (result i32) (i32.le_u (br_if 0 (i32.const 1) (i32.const 1)) (i32.const 10))) - ) - (func (export "as-compare-right") (result i32) - (block (result i32) (i32.ne (i32.const 10) (br_if 0 (i32.const 1) (i32.const 42)))) - ) - - (func (export "as-memory.grow-size") (result i32) - (block (result i32) (memory.grow (br_if 0 (i32.const 1) (i32.const 1)))) - ) - - (func (export "nested-block-value") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (i32.add - (i32.const 4) - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) - (i32.const 16) - ) - ) - ) - ) - ) - - (func (export "nested-br-value") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (br 0 - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) - ) - ) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_if-value") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop (br_if 0 - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) - ) - (i32.const 1) - )) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_if-value-cond") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (drop (br_if 0 - (i32.const 4) - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) - ) - )) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_table-value") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (br_table 0 - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 4) - ) - (i32.const 1) - ) - (i32.const 16) - ) - ) - ) - - (func (export "nested-br_table-value-index") (param i32) (result i32) - (i32.add - (i32.const 1) - (block (result i32) - (drop (i32.const 2)) - (br_table 0 - (i32.const 4) - (block (result i32) - (drop (br_if 1 (i32.const 8) (local.get 0))) (i32.const 1) - ) - ) - (i32.const 16) - ) - ) - ) - -)`); - -// ./test/core/br_if.wast:372 -assert_return(() => invoke($0, `type-i32`, []), []); - -// ./test/core/br_if.wast:373 -assert_return(() => invoke($0, `type-i64`, []), []); - -// ./test/core/br_if.wast:374 -assert_return(() => invoke($0, `type-f32`, []), []); - -// ./test/core/br_if.wast:375 -assert_return(() => invoke($0, `type-f64`, []), []); - -// ./test/core/br_if.wast:377 -assert_return(() => invoke($0, `type-i32-value`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:378 -assert_return(() => invoke($0, `type-i64-value`, []), [value("i64", 2n)]); - -// ./test/core/br_if.wast:379 -assert_return(() => invoke($0, `type-f32-value`, []), [value("f32", 3)]); - -// ./test/core/br_if.wast:380 -assert_return(() => invoke($0, `type-f64-value`, []), [value("f64", 4)]); - -// ./test/core/br_if.wast:382 -assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:383 -assert_return(() => invoke($0, `as-block-first`, [1]), [value("i32", 3)]); - -// ./test/core/br_if.wast:384 -assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:385 -assert_return(() => invoke($0, `as-block-mid`, [1]), [value("i32", 3)]); - -// ./test/core/br_if.wast:386 -assert_return(() => invoke($0, `as-block-last`, [0]), []); - -// ./test/core/br_if.wast:387 -assert_return(() => invoke($0, `as-block-last`, [1]), []); - -// ./test/core/br_if.wast:389 -assert_return(() => invoke($0, `as-block-first-value`, [0]), [ - value("i32", 11), -]); - -// ./test/core/br_if.wast:390 -assert_return(() => invoke($0, `as-block-first-value`, [1]), [ - value("i32", 10), -]); - -// ./test/core/br_if.wast:391 -assert_return(() => invoke($0, `as-block-mid-value`, [0]), [value("i32", 21)]); - -// ./test/core/br_if.wast:392 -assert_return(() => invoke($0, `as-block-mid-value`, [1]), [value("i32", 20)]); - -// ./test/core/br_if.wast:393 -assert_return(() => invoke($0, `as-block-last-value`, [0]), [value("i32", 11)]); - -// ./test/core/br_if.wast:394 -assert_return(() => invoke($0, `as-block-last-value`, [1]), [value("i32", 11)]); - -// ./test/core/br_if.wast:396 -assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:397 -assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 3)]); - -// ./test/core/br_if.wast:398 -assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:399 -assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 4)]); - -// ./test/core/br_if.wast:400 -assert_return(() => invoke($0, `as-loop-last`, [0]), []); - -// ./test/core/br_if.wast:401 -assert_return(() => invoke($0, `as-loop-last`, [1]), []); - -// ./test/core/br_if.wast:403 -assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:405 -assert_return(() => invoke($0, `as-br_if-cond`, []), []); - -// ./test/core/br_if.wast:406 -assert_return(() => invoke($0, `as-br_if-value`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:407 -assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:408 -assert_return(() => invoke($0, `as-br_if-value-cond`, [1]), [value("i32", 1)]); - -// ./test/core/br_if.wast:410 -assert_return(() => invoke($0, `as-br_table-index`, []), []); - -// ./test/core/br_if.wast:411 -assert_return(() => invoke($0, `as-br_table-value`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:412 -assert_return(() => invoke($0, `as-br_table-value-index`, []), [ - value("i32", 1), -]); - -// ./test/core/br_if.wast:414 -assert_return(() => invoke($0, `as-return-value`, []), [value("i64", 1n)]); - -// ./test/core/br_if.wast:416 -assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 2)]); - -// ./test/core/br_if.wast:417 -assert_return(() => invoke($0, `as-if-cond`, [1]), [value("i32", 1)]); - -// ./test/core/br_if.wast:418 -assert_return(() => invoke($0, `as-if-then`, [0, 0]), []); - -// ./test/core/br_if.wast:419 -assert_return(() => invoke($0, `as-if-then`, [4, 0]), []); - -// ./test/core/br_if.wast:420 -assert_return(() => invoke($0, `as-if-then`, [0, 1]), []); - -// ./test/core/br_if.wast:421 -assert_return(() => invoke($0, `as-if-then`, [4, 1]), []); - -// ./test/core/br_if.wast:422 -assert_return(() => invoke($0, `as-if-else`, [0, 0]), []); - -// ./test/core/br_if.wast:423 -assert_return(() => invoke($0, `as-if-else`, [3, 0]), []); - -// ./test/core/br_if.wast:424 -assert_return(() => invoke($0, `as-if-else`, [0, 1]), []); - -// ./test/core/br_if.wast:425 -assert_return(() => invoke($0, `as-if-else`, [3, 1]), []); - -// ./test/core/br_if.wast:427 -assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 3)]); - -// ./test/core/br_if.wast:428 -assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 3)]); - -// ./test/core/br_if.wast:429 -assert_return(() => invoke($0, `as-select-second`, [0]), [value("i32", 3)]); - -// ./test/core/br_if.wast:430 -assert_return(() => invoke($0, `as-select-second`, [1]), [value("i32", 3)]); - -// ./test/core/br_if.wast:431 -assert_return(() => invoke($0, `as-select-cond`, []), [value("i32", 3)]); - -// ./test/core/br_if.wast:433 -assert_return(() => invoke($0, `as-call-first`, []), [value("i32", 12)]); - -// ./test/core/br_if.wast:434 -assert_return(() => invoke($0, `as-call-mid`, []), [value("i32", 13)]); - -// ./test/core/br_if.wast:435 -assert_return(() => invoke($0, `as-call-last`, []), [value("i32", 14)]); - -// ./test/core/br_if.wast:437 -assert_return(() => invoke($0, `as-call_indirect-func`, []), [value("i32", 4)]); - -// ./test/core/br_if.wast:438 -assert_return(() => invoke($0, `as-call_indirect-first`, []), [ - value("i32", 4), -]); - -// ./test/core/br_if.wast:439 -assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 4)]); - -// ./test/core/br_if.wast:440 -assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 4)]); - -// ./test/core/br_if.wast:442 -assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", -1)]); - -// ./test/core/br_if.wast:443 -assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 17)]); - -// ./test/core/br_if.wast:445 -assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", -1)]); - -// ./test/core/br_if.wast:446 -assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); - -// ./test/core/br_if.wast:448 -assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", -1)]); - -// ./test/core/br_if.wast:449 -assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); - -// ./test/core/br_if.wast:451 -assert_return(() => invoke($0, `as-load-address`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:452 -assert_return(() => invoke($0, `as-loadN-address`, []), [value("i32", 30)]); - -// ./test/core/br_if.wast:454 -assert_return(() => invoke($0, `as-store-address`, []), [value("i32", 30)]); - -// ./test/core/br_if.wast:455 -assert_return(() => invoke($0, `as-store-value`, []), [value("i32", 31)]); - -// ./test/core/br_if.wast:456 -assert_return(() => invoke($0, `as-storeN-address`, []), [value("i32", 32)]); - -// ./test/core/br_if.wast:457 -assert_return(() => invoke($0, `as-storeN-value`, []), [value("i32", 33)]); - -// ./test/core/br_if.wast:459 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("f64", 1)]); - -// ./test/core/br_if.wast:460 -assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:461 -assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:462 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/br_if.wast:463 -assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:464 -assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:465 -assert_return(() => invoke($0, `as-memory.grow-size`, []), [value("i32", 1)]); - -// ./test/core/br_if.wast:467 -assert_return(() => invoke($0, `nested-block-value`, [0]), [value("i32", 21)]); - -// ./test/core/br_if.wast:468 -assert_return(() => invoke($0, `nested-block-value`, [1]), [value("i32", 9)]); - -// ./test/core/br_if.wast:469 -assert_return(() => invoke($0, `nested-br-value`, [0]), [value("i32", 5)]); - -// ./test/core/br_if.wast:470 -assert_return(() => invoke($0, `nested-br-value`, [1]), [value("i32", 9)]); - -// ./test/core/br_if.wast:471 -assert_return(() => invoke($0, `nested-br_if-value`, [0]), [value("i32", 5)]); - -// ./test/core/br_if.wast:472 -assert_return(() => invoke($0, `nested-br_if-value`, [1]), [value("i32", 9)]); - -// ./test/core/br_if.wast:473 -assert_return(() => invoke($0, `nested-br_if-value-cond`, [0]), [ - value("i32", 5), -]); - -// ./test/core/br_if.wast:474 -assert_return(() => invoke($0, `nested-br_if-value-cond`, [1]), [ - value("i32", 9), -]); - -// ./test/core/br_if.wast:475 -assert_return(() => invoke($0, `nested-br_table-value`, [0]), [ - value("i32", 5), -]); - -// ./test/core/br_if.wast:476 -assert_return(() => invoke($0, `nested-br_table-value`, [1]), [ - value("i32", 9), -]); - -// ./test/core/br_if.wast:477 -assert_return(() => invoke($0, `nested-br_table-value-index`, [0]), [ - value("i32", 5), -]); - -// ./test/core/br_if.wast:478 -assert_return(() => invoke($0, `nested-br_table-value-index`, [1]), [ - value("i32", 9), -]); - -// ./test/core/br_if.wast:480 -assert_invalid( - () => - instantiate( - `(module (func $$type-false-i32 (block (i32.ctz (br_if 0 (i32.const 0))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:484 -assert_invalid( - () => - instantiate( - `(module (func $$type-false-i64 (block (i64.ctz (br_if 0 (i32.const 0))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:488 -assert_invalid( - () => - instantiate( - `(module (func $$type-false-f32 (block (f32.neg (br_if 0 (i32.const 0))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:492 -assert_invalid( - () => - instantiate( - `(module (func $$type-false-f64 (block (f64.neg (br_if 0 (i32.const 0))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:497 -assert_invalid( - () => - instantiate( - `(module (func $$type-true-i32 (block (i32.ctz (br_if 0 (i32.const 1))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:501 -assert_invalid( - () => - instantiate( - `(module (func $$type-true-i64 (block (i64.ctz (br_if 0 (i64.const 1))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:505 -assert_invalid( - () => - instantiate( - `(module (func $$type-true-f32 (block (f32.neg (br_if 0 (f32.const 1))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:509 -assert_invalid( - () => - instantiate( - `(module (func $$type-true-f64 (block (f64.neg (br_if 0 (i64.const 1))))))`, - ), - `type mismatch`, -); - -// ./test/core/br_if.wast:514 -assert_invalid( - () => - instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) - (block (result i32) (br_if 0 (i32.const 0)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:520 -assert_invalid( - () => - instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) - (block (result i32) (br_if 0 (i32.const 1)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:526 -assert_invalid(() => - instantiate(`(module (func $$type-false-arg-num-vs-void - (block (br_if 0 (i32.const 0) (i32.const 0))) - ))`), `type mismatch`); - -// ./test/core/br_if.wast:532 -assert_invalid(() => - instantiate(`(module (func $$type-true-arg-num-vs-void - (block (br_if 0 (i32.const 0) (i32.const 1))) - ))`), `type mismatch`); - -// ./test/core/br_if.wast:539 -assert_invalid( - () => - instantiate(`(module (func $$type-false-arg-void-vs-num (result i32) - (block (result i32) (br_if 0 (nop) (i32.const 0)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:545 -assert_invalid( - () => - instantiate(`(module (func $$type-true-arg-void-vs-num (result i32) - (block (result i32) (br_if 0 (nop) (i32.const 1)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:551 -assert_invalid( - () => - instantiate(`(module (func $$type-false-arg-num-vs-num (result i32) - (block (result i32) - (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) - ) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:559 -assert_invalid( - () => - instantiate(`(module (func $$type-true-arg-num-vs-num (result i32) - (block (result i32) - (drop (br_if 0 (i64.const 1) (i32.const 0))) (i32.const 1) - ) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:568 -assert_invalid(() => - instantiate(`(module (func $$type-cond-empty-vs-i32 - (block (br_if 0)) - ))`), `type mismatch`); - -// ./test/core/br_if.wast:574 -assert_invalid(() => - instantiate(`(module (func $$type-cond-void-vs-i32 - (block (br_if 0 (nop))) - ))`), `type mismatch`); - -// ./test/core/br_if.wast:580 -assert_invalid(() => - instantiate(`(module (func $$type-cond-num-vs-i32 - (block (br_if 0 (i64.const 0))) - ))`), `type mismatch`); - -// ./test/core/br_if.wast:586 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-cond-void-vs-i32 (result i32) - (block (result i32) (br_if 0 (i32.const 0) (nop)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:592 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-void-vs-num-nested (result i32) - (block (result i32) (i32.const 0) (block (br_if 1 (i32.const 1)))) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:598 -assert_invalid( - () => - instantiate(`(module (func $$type-arg-cond-num-vs-i32 (result i32) - (block (result i32) (br_if 0 (i32.const 0) (i64.const 0)) (i32.const 1)) - ))`), - `type mismatch`, -); - -// ./test/core/br_if.wast:605 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-cond-empty-in-then - (block - (i32.const 0) (i32.const 0) - (if (result i32) (then (br_if 0))) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br_if.wast:617 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-cond-empty-in-then - (block - (i32.const 0) (i32.const 0) - (if (result i32) (then (br_if 0 (i32.const 1)))) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br_if.wast:629 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-cond-empty-in-return - (block (result i32) - (return (br_if 0)) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br_if.wast:640 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-cond-empty-in-return - (block (result i32) - (return (br_if 0 (i32.const 1))) - ) - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/br_if.wast:653 -assert_invalid( - () => instantiate(`(module (func $$unbound-label (br_if 1 (i32.const 1))))`), - `unknown label`, -); - -// ./test/core/br_if.wast:657 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-nested-label (block (block (br_if 5 (i32.const 1))))))`, - ), - `unknown label`, -); - -// ./test/core/br_if.wast:661 -assert_invalid( - () => - instantiate( - `(module (func $$large-label (br_if 0x10000001 (i32.const 1))))`, - ), - `unknown label`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/break-drop.wast.js b/js/src/jit-test/tests/wasm/spec/threads/break-drop.wast.js deleted file mode 100644 index 9ebfb0b59eff..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/break-drop.wast.js +++ /dev/null @@ -1,32 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/break-drop.wast - -// ./test/core/break-drop.wast:1 -let $0 = instantiate(`(module - (func (export "br") (block (br 0))) - (func (export "br_if") (block (br_if 0 (i32.const 1)))) - (func (export "br_table") (block (br_table 0 (i32.const 0)))) -)`); - -// ./test/core/break-drop.wast:7 -assert_return(() => invoke($0, `br`, []), []); - -// ./test/core/break-drop.wast:8 -assert_return(() => invoke($0, `br_if`, []), []); - -// ./test/core/break-drop.wast:9 -assert_return(() => invoke($0, `br_table`, []), []); diff --git a/js/src/jit-test/tests/wasm/spec/threads/call.wast.js b/js/src/jit-test/tests/wasm/spec/threads/call.wast.js deleted file mode 100644 index a09756ae98a7..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/call.wast.js +++ /dev/null @@ -1,593 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/call.wast - -// ./test/core/call.wast:3 -let $0 = instantiate(`(module - ;; Auxiliary definitions - (func $$const-i32 (result i32) (i32.const 0x132)) - (func $$const-i64 (result i64) (i64.const 0x164)) - (func $$const-f32 (result f32) (f32.const 0xf32)) - (func $$const-f64 (result f64) (f64.const 0xf64)) - - (func $$id-i32 (param i32) (result i32) (local.get 0)) - (func $$id-i64 (param i64) (result i64) (local.get 0)) - (func $$id-f32 (param f32) (result f32) (local.get 0)) - (func $$id-f64 (param f64) (result f64) (local.get 0)) - - (func $$f32-i32 (param f32 i32) (result i32) (local.get 1)) - (func $$i32-i64 (param i32 i64) (result i64) (local.get 1)) - (func $$f64-f32 (param f64 f32) (result f32) (local.get 1)) - (func $$i64-f64 (param i64 f64) (result f64) (local.get 1)) - - ;; Typing - - (func (export "type-i32") (result i32) (call $$const-i32)) - (func (export "type-i64") (result i64) (call $$const-i64)) - (func (export "type-f32") (result f32) (call $$const-f32)) - (func (export "type-f64") (result f64) (call $$const-f64)) - - (func (export "type-first-i32") (result i32) (call $$id-i32 (i32.const 32))) - (func (export "type-first-i64") (result i64) (call $$id-i64 (i64.const 64))) - (func (export "type-first-f32") (result f32) (call $$id-f32 (f32.const 1.32))) - (func (export "type-first-f64") (result f64) (call $$id-f64 (f64.const 1.64))) - - (func (export "type-second-i32") (result i32) - (call $$f32-i32 (f32.const 32.1) (i32.const 32)) - ) - (func (export "type-second-i64") (result i64) - (call $$i32-i64 (i32.const 32) (i64.const 64)) - ) - (func (export "type-second-f32") (result f32) - (call $$f64-f32 (f64.const 64) (f32.const 32)) - ) - (func (export "type-second-f64") (result f64) - (call $$i64-f64 (i64.const 64) (f64.const 64.1)) - ) - - ;; Recursion - - (func $$fac (export "fac") (param i64) (result i64) - (if (result i64) (i64.eqz (local.get 0)) - (then (i64.const 1)) - (else - (i64.mul - (local.get 0) - (call $$fac (i64.sub (local.get 0) (i64.const 1))) - ) - ) - ) - ) - - (func $$fac-acc (export "fac-acc") (param i64 i64) (result i64) - (if (result i64) (i64.eqz (local.get 0)) - (then (local.get 1)) - (else - (call $$fac-acc - (i64.sub (local.get 0) (i64.const 1)) - (i64.mul (local.get 0) (local.get 1)) - ) - ) - ) - ) - - (func $$fib (export "fib") (param i64) (result i64) - (if (result i64) (i64.le_u (local.get 0) (i64.const 1)) - (then (i64.const 1)) - (else - (i64.add - (call $$fib (i64.sub (local.get 0) (i64.const 2))) - (call $$fib (i64.sub (local.get 0) (i64.const 1))) - ) - ) - ) - ) - - (func $$even (export "even") (param i64) (result i32) - (if (result i32) (i64.eqz (local.get 0)) - (then (i32.const 44)) - (else (call $$odd (i64.sub (local.get 0) (i64.const 1)))) - ) - ) - (func $$odd (export "odd") (param i64) (result i32) - (if (result i32) (i64.eqz (local.get 0)) - (then (i32.const 99)) - (else (call $$even (i64.sub (local.get 0) (i64.const 1)))) - ) - ) - - ;; Stack exhaustion - - ;; Implementations are required to have every call consume some abstract - ;; resource towards exhausting some abstract finite limit, such that - ;; infinitely recursive test cases reliably trap in finite time. This is - ;; because otherwise applications could come to depend on it on those - ;; implementations and be incompatible with implementations that don't do - ;; it (or don't do it under the same circumstances). - - (func $$runaway (export "runaway") (call $$runaway)) - - (func $$mutual-runaway1 (export "mutual-runaway") (call $$mutual-runaway2)) - (func $$mutual-runaway2 (call $$mutual-runaway1)) - - ;; As parameter of control constructs and instructions - - (memory 1) - - (func (export "as-select-first") (result i32) - (select (call $$const-i32) (i32.const 2) (i32.const 3)) - ) - (func (export "as-select-mid") (result i32) - (select (i32.const 2) (call $$const-i32) (i32.const 3)) - ) - (func (export "as-select-last") (result i32) - (select (i32.const 2) (i32.const 3) (call $$const-i32)) - ) - - (func (export "as-if-condition") (result i32) - (if (result i32) (call $$const-i32) (then (i32.const 1)) (else (i32.const 2))) - ) - - (func (export "as-br_if-first") (result i32) - (block (result i32) (br_if 0 (call $$const-i32) (i32.const 2))) - ) - (func (export "as-br_if-last") (result i32) - (block (result i32) (br_if 0 (i32.const 2) (call $$const-i32))) - ) - - (func (export "as-br_table-first") (result i32) - (block (result i32) (call $$const-i32) (i32.const 2) (br_table 0 0)) - ) - (func (export "as-br_table-last") (result i32) - (block (result i32) (i32.const 2) (call $$const-i32) (br_table 0 0)) - ) - - (func $$func (param i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-first") (result i32) - (block (result i32) - (call_indirect (type $$check) - (call $$const-i32) (i32.const 2) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 2) (call $$const-i32) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 2) (call $$const-i32) - ) - ) - ) - - (func (export "as-store-first") - (call $$const-i32) (i32.const 1) (i32.store) - ) - (func (export "as-store-last") - (i32.const 10) (call $$const-i32) (i32.store) - ) - - (func (export "as-memory.grow-value") (result i32) - (memory.grow (call $$const-i32)) - ) - (func (export "as-return-value") (result i32) - (call $$const-i32) (return) - ) - (func (export "as-drop-operand") - (call $$const-i32) (drop) - ) - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (call $$const-i32))) - ) - (func (export "as-local.set-value") (result i32) - (local i32) (local.set 0 (call $$const-i32)) (local.get 0) - ) - (func (export "as-local.tee-value") (result i32) - (local i32) (local.tee 0 (call $$const-i32)) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (result i32) - (global.set $$a (call $$const-i32)) - (global.get $$a) - ) - (func (export "as-load-operand") (result i32) - (i32.load (call $$const-i32)) - ) - - (func $$dummy (param i32) (result i32) (local.get 0)) - (func $$du (param f32) (result f32) (local.get 0)) - (func (export "as-unary-operand") (result f32) - (block (result f32) (f32.sqrt (call $$du (f32.const 0x0p+0)))) - ) - - (func (export "as-binary-left") (result i32) - (block (result i32) (i32.add (call $$dummy (i32.const 1)) (i32.const 10))) - ) - (func (export "as-binary-right") (result i32) - (block (result i32) (i32.sub (i32.const 10) (call $$dummy (i32.const 1)))) - ) - - (func (export "as-test-operand") (result i32) - (block (result i32) (i32.eqz (call $$dummy (i32.const 1)))) - ) - - (func (export "as-compare-left") (result i32) - (block (result i32) (i32.le_u (call $$dummy (i32.const 1)) (i32.const 10))) - ) - (func (export "as-compare-right") (result i32) - (block (result i32) (i32.ne (i32.const 10) (call $$dummy (i32.const 1)))) - ) - - (func (export "as-convert-operand") (result i64) - (block (result i64) (i64.extend_i32_s (call $$dummy (i32.const 1)))) - ) - - ;; Test correct argument passing - - (func $$return-from-long-argument-list-helper (param f32 i32 i32 f64 f32 f32 f32 f64 f32 i32 i32 f32 f64 i64 i64 i32 i64 i64 f32 i64 i64 i64 i32 f32 f32 f32 f64 f32 i32 i64 f32 f64 f64 f32 i32 f32 f32 f64 i64 f64 i32 i64 f32 f64 i32 i32 i32 i64 f64 i32 i64 i64 f64 f64 f64 f64 f64 f64 i32 f32 f64 f64 i32 i64 f32 f32 f32 i32 f64 f64 f64 f64 f64 f32 i64 i64 i32 i32 i32 f32 f64 i32 i64 f32 f32 f32 i32 i32 f32 f64 i64 f32 f64 f32 f32 f32 i32 f32 i64 i32) (result i32) - (local.get 99) - ) - - (func (export "return-from-long-argument-list") (param i32) (result i32) - (call $$return-from-long-argument-list-helper (f32.const 0) (i32.const 0) (i32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f64.const 0) (f32.const 0) (i64.const 0) (i64.const 0) (i32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (i32.const 0) (f32.const 0) (f64.const 0) (i64.const 0) (f32.const 0) (f64.const 0) (f32.const 0) (f32.const 0) (f32.const 0) (i32.const 0) (f32.const 0) (i64.const 0) (local.get 0)) - ) -)`); - -// ./test/core/call.wast:240 -assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); - -// ./test/core/call.wast:241 -assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); - -// ./test/core/call.wast:242 -assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); - -// ./test/core/call.wast:243 -assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); - -// ./test/core/call.wast:245 -assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); - -// ./test/core/call.wast:246 -assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); - -// ./test/core/call.wast:247 -assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); - -// ./test/core/call.wast:248 -assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); - -// ./test/core/call.wast:250 -assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); - -// ./test/core/call.wast:251 -assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); - -// ./test/core/call.wast:252 -assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); - -// ./test/core/call.wast:253 -assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); - -// ./test/core/call.wast:255 -assert_return(() => invoke($0, `fac`, [0n]), [value("i64", 1n)]); - -// ./test/core/call.wast:256 -assert_return(() => invoke($0, `fac`, [1n]), [value("i64", 1n)]); - -// ./test/core/call.wast:257 -assert_return(() => invoke($0, `fac`, [5n]), [value("i64", 120n)]); - -// ./test/core/call.wast:258 -assert_return(() => invoke($0, `fac`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/call.wast:259 -assert_return(() => invoke($0, `fac-acc`, [0n, 1n]), [value("i64", 1n)]); - -// ./test/core/call.wast:260 -assert_return(() => invoke($0, `fac-acc`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/call.wast:261 -assert_return(() => invoke($0, `fac-acc`, [5n, 1n]), [value("i64", 120n)]); - -// ./test/core/call.wast:262 -assert_return(() => invoke($0, `fac-acc`, [25n, 1n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/call.wast:267 -assert_return(() => invoke($0, `fib`, [0n]), [value("i64", 1n)]); - -// ./test/core/call.wast:268 -assert_return(() => invoke($0, `fib`, [1n]), [value("i64", 1n)]); - -// ./test/core/call.wast:269 -assert_return(() => invoke($0, `fib`, [2n]), [value("i64", 2n)]); - -// ./test/core/call.wast:270 -assert_return(() => invoke($0, `fib`, [5n]), [value("i64", 8n)]); - -// ./test/core/call.wast:271 -assert_return(() => invoke($0, `fib`, [20n]), [value("i64", 10946n)]); - -// ./test/core/call.wast:273 -assert_return(() => invoke($0, `even`, [0n]), [value("i32", 44)]); - -// ./test/core/call.wast:274 -assert_return(() => invoke($0, `even`, [1n]), [value("i32", 99)]); - -// ./test/core/call.wast:275 -assert_return(() => invoke($0, `even`, [100n]), [value("i32", 44)]); - -// ./test/core/call.wast:276 -assert_return(() => invoke($0, `even`, [77n]), [value("i32", 99)]); - -// ./test/core/call.wast:277 -assert_return(() => invoke($0, `odd`, [0n]), [value("i32", 99)]); - -// ./test/core/call.wast:278 -assert_return(() => invoke($0, `odd`, [1n]), [value("i32", 44)]); - -// ./test/core/call.wast:279 -assert_return(() => invoke($0, `odd`, [200n]), [value("i32", 99)]); - -// ./test/core/call.wast:280 -assert_return(() => invoke($0, `odd`, [77n]), [value("i32", 44)]); - -// ./test/core/call.wast:282 -assert_exhaustion(() => invoke($0, `runaway`, []), `call stack exhausted`); - -// ./test/core/call.wast:283 -assert_exhaustion( - () => invoke($0, `mutual-runaway`, []), - `call stack exhausted`, -); - -// ./test/core/call.wast:285 -assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 306)]); - -// ./test/core/call.wast:286 -assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); - -// ./test/core/call.wast:287 -assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); - -// ./test/core/call.wast:289 -assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 1)]); - -// ./test/core/call.wast:291 -assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 306)]); - -// ./test/core/call.wast:292 -assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); - -// ./test/core/call.wast:294 -assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 306)]); - -// ./test/core/call.wast:295 -assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); - -// ./test/core/call.wast:297 -assert_return(() => invoke($0, `as-call_indirect-first`, []), [ - value("i32", 306), -]); - -// ./test/core/call.wast:298 -assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); - -// ./test/core/call.wast:299 -assert_trap(() => invoke($0, `as-call_indirect-last`, []), `undefined element`); - -// ./test/core/call.wast:301 -assert_return(() => invoke($0, `as-store-first`, []), []); - -// ./test/core/call.wast:302 -assert_return(() => invoke($0, `as-store-last`, []), []); - -// ./test/core/call.wast:304 -assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); - -// ./test/core/call.wast:305 -assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 306)]); - -// ./test/core/call.wast:306 -assert_return(() => invoke($0, `as-drop-operand`, []), []); - -// ./test/core/call.wast:307 -assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 306)]); - -// ./test/core/call.wast:308 -assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 306)]); - -// ./test/core/call.wast:309 -assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 306)]); - -// ./test/core/call.wast:310 -assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 306)]); - -// ./test/core/call.wast:311 -assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); - -// ./test/core/call.wast:313 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 0)]); - -// ./test/core/call.wast:314 -assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 11)]); - -// ./test/core/call.wast:315 -assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 9)]); - -// ./test/core/call.wast:316 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/call.wast:317 -assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); - -// ./test/core/call.wast:318 -assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); - -// ./test/core/call.wast:319 -assert_return(() => invoke($0, `as-convert-operand`, []), [value("i64", 1n)]); - -// ./test/core/call.wast:321 -assert_return(() => invoke($0, `return-from-long-argument-list`, [42]), [ - value("i32", 42), -]); - -// ./test/core/call.wast:325 -assert_invalid(() => - instantiate(`(module - (func $$type-void-vs-num (i32.eqz (call 1))) - (func) - )`), `type mismatch`); - -// ./test/core/call.wast:332 -assert_invalid(() => - instantiate(`(module - (func $$type-num-vs-num (i32.eqz (call 1))) - (func (result i64) (i64.const 1)) - )`), `type mismatch`); - -// ./test/core/call.wast:340 -assert_invalid(() => - instantiate(`(module - (func $$arity-0-vs-1 (call 1)) - (func (param i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:347 -assert_invalid(() => - instantiate(`(module - (func $$arity-0-vs-2 (call 1)) - (func (param f64 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:354 -assert_invalid(() => - instantiate(`(module - (func $$arity-1-vs-0 (call 1 (i32.const 1))) - (func) - )`), `type mismatch`); - -// ./test/core/call.wast:361 -assert_invalid(() => - instantiate(`(module - (func $$arity-2-vs-0 (call 1 (f64.const 2) (i32.const 1))) - (func) - )`), `type mismatch`); - -// ./test/core/call.wast:369 -assert_invalid(() => - instantiate(`(module - (func $$type-first-void-vs-num (call 1 (nop) (i32.const 1))) - (func (param i32 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:376 -assert_invalid(() => - instantiate(`(module - (func $$type-second-void-vs-num (call 1 (i32.const 1) (nop))) - (func (param i32 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:383 -assert_invalid(() => - instantiate(`(module - (func $$type-first-num-vs-num (call 1 (f64.const 1) (i32.const 1))) - (func (param i32 f64)) - )`), `type mismatch`); - -// ./test/core/call.wast:390 -assert_invalid(() => - instantiate(`(module - (func $$type-second-num-vs-num (call 1 (i32.const 1) (f64.const 1))) - (func (param f64 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:398 -assert_invalid(() => - instantiate(`(module - (func $$type-first-empty-in-block - (block (call 1)) - ) - (func (param i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:407 -assert_invalid(() => - instantiate(`(module - (func $$type-second-empty-in-block - (block (call 1 (i32.const 0))) - ) - (func (param i32 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:416 -assert_invalid(() => - instantiate(`(module - (func $$type-first-empty-in-loop - (loop (call 1)) - ) - (func (param i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:425 -assert_invalid(() => - instantiate(`(module - (func $$type-second-empty-in-loop - (loop (call 1 (i32.const 0))) - ) - (func (param i32 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:434 -assert_invalid(() => - instantiate(`(module - (func $$type-first-empty-in-then - (if (i32.const 0) (then (call 1))) - ) - (func (param i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:443 -assert_invalid(() => - instantiate(`(module - (func $$type-second-empty-in-then - (if (i32.const 0) (then (call 1 (i32.const 0)))) - ) - (func (param i32 i32)) - )`), `type mismatch`); - -// ./test/core/call.wast:456 -assert_invalid( - () => instantiate(`(module (func $$unbound-func (call 1)))`), - `unknown function`, -); - -// ./test/core/call.wast:460 -assert_invalid( - () => instantiate(`(module (func $$large-func (call 1012321300)))`), - `unknown function`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/call_indirect.wast.js b/js/src/jit-test/tests/wasm/spec/threads/call_indirect.wast.js deleted file mode 100644 index 2ed733a2c0cd..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/call_indirect.wast.js +++ /dev/null @@ -1,1237 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/call_indirect.wast - -// ./test/core/call_indirect.wast:3 -let $0 = instantiate(`(module - ;; Auxiliary definitions - (type $$proc (func)) - (type $$out-i32 (func (result i32))) - (type $$out-i64 (func (result i64))) - (type $$out-f32 (func (result f32))) - (type $$out-f64 (func (result f64))) - (type $$over-i32 (func (param i32) (result i32))) - (type $$over-i64 (func (param i64) (result i64))) - (type $$over-f32 (func (param f32) (result f32))) - (type $$over-f64 (func (param f64) (result f64))) - (type $$f32-i32 (func (param f32 i32) (result i32))) - (type $$i32-i64 (func (param i32 i64) (result i64))) - (type $$f64-f32 (func (param f64 f32) (result f32))) - (type $$i64-f64 (func (param i64 f64) (result f64))) - (type $$over-i32-duplicate (func (param i32) (result i32))) - (type $$over-i64-duplicate (func (param i64) (result i64))) - (type $$over-f32-duplicate (func (param f32) (result f32))) - (type $$over-f64-duplicate (func (param f64) (result f64))) - - (func $$const-i32 (type $$out-i32) (i32.const 0x132)) - (func $$const-i64 (type $$out-i64) (i64.const 0x164)) - (func $$const-f32 (type $$out-f32) (f32.const 0xf32)) - (func $$const-f64 (type $$out-f64) (f64.const 0xf64)) - - (func $$id-i32 (type $$over-i32) (local.get 0)) - (func $$id-i64 (type $$over-i64) (local.get 0)) - (func $$id-f32 (type $$over-f32) (local.get 0)) - (func $$id-f64 (type $$over-f64) (local.get 0)) - - (func $$i32-i64 (type $$i32-i64) (local.get 1)) - (func $$i64-f64 (type $$i64-f64) (local.get 1)) - (func $$f32-i32 (type $$f32-i32) (local.get 1)) - (func $$f64-f32 (type $$f64-f32) (local.get 1)) - - (func $$over-i32-duplicate (type $$over-i32-duplicate) (local.get 0)) - (func $$over-i64-duplicate (type $$over-i64-duplicate) (local.get 0)) - (func $$over-f32-duplicate (type $$over-f32-duplicate) (local.get 0)) - (func $$over-f64-duplicate (type $$over-f64-duplicate) (local.get 0)) - - (table funcref - (elem - $$const-i32 $$const-i64 $$const-f32 $$const-f64 - $$id-i32 $$id-i64 $$id-f32 $$id-f64 - $$f32-i32 $$i32-i64 $$f64-f32 $$i64-f64 - $$fac-i64 $$fib-i64 $$even $$odd - $$runaway $$mutual-runaway1 $$mutual-runaway2 - $$over-i32-duplicate $$over-i64-duplicate - $$over-f32-duplicate $$over-f64-duplicate - $$fac-i32 $$fac-f32 $$fac-f64 - $$fib-i32 $$fib-f32 $$fib-f64 - ) - ) - - ;; Syntax - - (func - (call_indirect (i32.const 0)) - (call_indirect (param i64) (i64.const 0) (i32.const 0)) - (call_indirect (param i64) (param) (param f64 i32 i64) - (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) - ) - (call_indirect (result) (i32.const 0)) - (drop (i32.eqz (call_indirect (result i32) (i32.const 0)))) - (drop (i32.eqz (call_indirect (result i32) (result) (i32.const 0)))) - (drop (i32.eqz - (call_indirect (param i64) (result i32) (i64.const 0) (i32.const 0)) - )) - (drop (i32.eqz - (call_indirect - (param) (param i64) (param) (param f64 i32 i64) (param) (param) - (result) (result i32) (result) (result) - (i64.const 0) (f64.const 0) (i32.const 0) (i64.const 0) (i32.const 0) - ) - )) - (drop (i64.eqz - (call_indirect (type $$over-i64) (param i64) (result i64) - (i64.const 0) (i32.const 0) - ) - )) - ) - - ;; Typing - - (func (export "type-i32") (result i32) - (call_indirect (type $$out-i32) (i32.const 0)) - ) - (func (export "type-i64") (result i64) - (call_indirect (type $$out-i64) (i32.const 1)) - ) - (func (export "type-f32") (result f32) - (call_indirect (type $$out-f32) (i32.const 2)) - ) - (func (export "type-f64") (result f64) - (call_indirect (type $$out-f64) (i32.const 3)) - ) - - (func (export "type-index") (result i64) - (call_indirect (type $$over-i64) (i64.const 100) (i32.const 5)) - ) - - (func (export "type-first-i32") (result i32) - (call_indirect (type $$over-i32) (i32.const 32) (i32.const 4)) - ) - (func (export "type-first-i64") (result i64) - (call_indirect (type $$over-i64) (i64.const 64) (i32.const 5)) - ) - (func (export "type-first-f32") (result f32) - (call_indirect (type $$over-f32) (f32.const 1.32) (i32.const 6)) - ) - (func (export "type-first-f64") (result f64) - (call_indirect (type $$over-f64) (f64.const 1.64) (i32.const 7)) - ) - - (func (export "type-second-i32") (result i32) - (call_indirect (type $$f32-i32) (f32.const 32.1) (i32.const 32) (i32.const 8)) - ) - (func (export "type-second-i64") (result i64) - (call_indirect (type $$i32-i64) (i32.const 32) (i64.const 64) (i32.const 9)) - ) - (func (export "type-second-f32") (result f32) - (call_indirect (type $$f64-f32) (f64.const 64) (f32.const 32) (i32.const 10)) - ) - (func (export "type-second-f64") (result f64) - (call_indirect (type $$i64-f64) (i64.const 64) (f64.const 64.1) (i32.const 11)) - ) - - ;; Dispatch - - (func (export "dispatch") (param i32 i64) (result i64) - (call_indirect (type $$over-i64) (local.get 1) (local.get 0)) - ) - - (func (export "dispatch-structural-i64") (param i32) (result i64) - (call_indirect (type $$over-i64-duplicate) (i64.const 9) (local.get 0)) - ) - (func (export "dispatch-structural-i32") (param i32) (result i32) - (call_indirect (type $$over-i32-duplicate) (i32.const 9) (local.get 0)) - ) - (func (export "dispatch-structural-f32") (param i32) (result f32) - (call_indirect (type $$over-f32-duplicate) (f32.const 9.0) (local.get 0)) - ) - (func (export "dispatch-structural-f64") (param i32) (result f64) - (call_indirect (type $$over-f64-duplicate) (f64.const 9.0) (local.get 0)) - ) - - ;; Recursion - - (func $$fac-i64 (export "fac-i64") (type $$over-i64) - (if (result i64) (i64.eqz (local.get 0)) - (then (i64.const 1)) - (else - (i64.mul - (local.get 0) - (call_indirect (type $$over-i64) - (i64.sub (local.get 0) (i64.const 1)) - (i32.const 12) - ) - ) - ) - ) - ) - - (func $$fib-i64 (export "fib-i64") (type $$over-i64) - (if (result i64) (i64.le_u (local.get 0) (i64.const 1)) - (then (i64.const 1)) - (else - (i64.add - (call_indirect (type $$over-i64) - (i64.sub (local.get 0) (i64.const 2)) - (i32.const 13) - ) - (call_indirect (type $$over-i64) - (i64.sub (local.get 0) (i64.const 1)) - (i32.const 13) - ) - ) - ) - ) - ) - - (func $$fac-i32 (export "fac-i32") (type $$over-i32) - (if (result i32) (i32.eqz (local.get 0)) - (then (i32.const 1)) - (else - (i32.mul - (local.get 0) - (call_indirect (type $$over-i32) - (i32.sub (local.get 0) (i32.const 1)) - (i32.const 23) - ) - ) - ) - ) - ) - - (func $$fac-f32 (export "fac-f32") (type $$over-f32) - (if (result f32) (f32.eq (local.get 0) (f32.const 0.0)) - (then (f32.const 1.0)) - (else - (f32.mul - (local.get 0) - (call_indirect (type $$over-f32) - (f32.sub (local.get 0) (f32.const 1.0)) - (i32.const 24) - ) - ) - ) - ) - ) - - (func $$fac-f64 (export "fac-f64") (type $$over-f64) - (if (result f64) (f64.eq (local.get 0) (f64.const 0.0)) - (then (f64.const 1.0)) - (else - (f64.mul - (local.get 0) - (call_indirect (type $$over-f64) - (f64.sub (local.get 0) (f64.const 1.0)) - (i32.const 25) - ) - ) - ) - ) - ) - - (func $$fib-i32 (export "fib-i32") (type $$over-i32) - (if (result i32) (i32.le_u (local.get 0) (i32.const 1)) - (then (i32.const 1)) - (else - (i32.add - (call_indirect (type $$over-i32) - (i32.sub (local.get 0) (i32.const 2)) - (i32.const 26) - ) - (call_indirect (type $$over-i32) - (i32.sub (local.get 0) (i32.const 1)) - (i32.const 26) - ) - ) - ) - ) - ) - - (func $$fib-f32 (export "fib-f32") (type $$over-f32) - (if (result f32) (f32.le (local.get 0) (f32.const 1.0)) - (then (f32.const 1.0)) - (else - (f32.add - (call_indirect (type $$over-f32) - (f32.sub (local.get 0) (f32.const 2.0)) - (i32.const 27) - ) - (call_indirect (type $$over-f32) - (f32.sub (local.get 0) (f32.const 1.0)) - (i32.const 27) - ) - ) - ) - ) - ) - - (func $$fib-f64 (export "fib-f64") (type $$over-f64) - (if (result f64) (f64.le (local.get 0) (f64.const 1.0)) - (then (f64.const 1.0)) - (else - (f64.add - (call_indirect (type $$over-f64) - (f64.sub (local.get 0) (f64.const 2.0)) - (i32.const 28) - ) - (call_indirect (type $$over-f64) - (f64.sub (local.get 0) (f64.const 1.0)) - (i32.const 28) - ) - ) - ) - ) - ) - - (func $$even (export "even") (param i32) (result i32) - (if (result i32) (i32.eqz (local.get 0)) - (then (i32.const 44)) - (else - (call_indirect (type $$over-i32) - (i32.sub (local.get 0) (i32.const 1)) - (i32.const 15) - ) - ) - ) - ) - (func $$odd (export "odd") (param i32) (result i32) - (if (result i32) (i32.eqz (local.get 0)) - (then (i32.const 99)) - (else - (call_indirect (type $$over-i32) - (i32.sub (local.get 0) (i32.const 1)) - (i32.const 14) - ) - ) - ) - ) - - ;; Stack exhaustion - - ;; Implementations are required to have every call consume some abstract - ;; resource towards exhausting some abstract finite limit, such that - ;; infinitely recursive test cases reliably trap in finite time. This is - ;; because otherwise applications could come to depend on it on those - ;; implementations and be incompatible with implementations that don't do - ;; it (or don't do it under the same circumstances). - - (func $$runaway (export "runaway") (call_indirect (type $$proc) (i32.const 16))) - - (func $$mutual-runaway1 (export "mutual-runaway") (call_indirect (type $$proc) (i32.const 18))) - (func $$mutual-runaway2 (call_indirect (type $$proc) (i32.const 17))) - - ;; As parameter of control constructs and instructions - - (memory 1) - - (func (export "as-select-first") (result i32) - (select (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-select-mid") (result i32) - (select (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 3)) - ) - (func (export "as-select-last") (result i32) - (select (i32.const 2) (i32.const 3) (call_indirect (type $$out-i32) (i32.const 0))) - ) - - (func (export "as-if-condition") (result i32) - (if (result i32) (call_indirect (type $$out-i32) (i32.const 0)) (then (i32.const 1)) (else (i32.const 2))) - ) - - (func (export "as-br_if-first") (result i64) - (block (result i64) (br_if 0 (call_indirect (type $$out-i64) (i32.const 1)) (i32.const 2))) - ) - (func (export "as-br_if-last") (result i32) - (block (result i32) (br_if 0 (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)))) - ) - - (func (export "as-br_table-first") (result f32) - (block (result f32) (call_indirect (type $$out-f32) (i32.const 2)) (i32.const 2) (br_table 0 0)) - ) - (func (export "as-br_table-last") (result i32) - (block (result i32) (i32.const 2) (call_indirect (type $$out-i32) (i32.const 0)) (br_table 0 0)) - ) - - (func (export "as-store-first") - (call_indirect (type $$out-i32) (i32.const 0)) (i32.const 1) (i32.store) - ) - (func (export "as-store-last") - (i32.const 10) (call_indirect (type $$out-f64) (i32.const 3)) (f64.store) - ) - - (func (export "as-memory.grow-value") (result i32) - (memory.grow (call_indirect (type $$out-i32) (i32.const 0))) - ) - (func (export "as-return-value") (result i32) - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) (return) - ) - (func (export "as-drop-operand") - (call_indirect (type $$over-i64) (i64.const 1) (i32.const 5)) (drop) - ) - (func (export "as-br-value") (result f32) - (block (result f32) (br 0 (call_indirect (type $$over-f32) (f32.const 1) (i32.const 6)))) - ) - (func (export "as-local.set-value") (result f64) - (local f64) (local.set 0 (call_indirect (type $$over-f64) (f64.const 1) (i32.const 7))) (local.get 0) - ) - (func (export "as-local.tee-value") (result f64) - (local f64) (local.tee 0 (call_indirect (type $$over-f64) (f64.const 1) (i32.const 7))) - ) - (global $$a (mut f64) (f64.const 10.0)) - (func (export "as-global.set-value") (result f64) - (global.set $$a (call_indirect (type $$over-f64) (f64.const 1.0) (i32.const 7))) - (global.get $$a) - ) - - (func (export "as-load-operand") (result i32) - (i32.load (call_indirect (type $$out-i32) (i32.const 0))) - ) - - (func (export "as-unary-operand") (result f32) - (block (result f32) - (f32.sqrt - (call_indirect (type $$over-f32) (f32.const 0x0p+0) (i32.const 6)) - ) - ) - ) - - (func (export "as-binary-left") (result i32) - (block (result i32) - (i32.add - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - (i32.const 10) - ) - ) - ) - (func (export "as-binary-right") (result i32) - (block (result i32) - (i32.sub - (i32.const 10) - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - ) - ) - ) - - (func (export "as-test-operand") (result i32) - (block (result i32) - (i32.eqz - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - ) - ) - ) - - (func (export "as-compare-left") (result i32) - (block (result i32) - (i32.le_u - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - (i32.const 10) - ) - ) - ) - (func (export "as-compare-right") (result i32) - (block (result i32) - (i32.ne - (i32.const 10) - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - ) - ) - ) - - (func (export "as-convert-operand") (result i64) - (block (result i64) - (i64.extend_i32_s - (call_indirect (type $$over-i32) (i32.const 1) (i32.const 4)) - ) - ) - ) - -)`); - -// ./test/core/call_indirect.wast:447 -assert_return(() => invoke($0, `type-i32`, []), [value("i32", 306)]); - -// ./test/core/call_indirect.wast:448 -assert_return(() => invoke($0, `type-i64`, []), [value("i64", 356n)]); - -// ./test/core/call_indirect.wast:449 -assert_return(() => invoke($0, `type-f32`, []), [value("f32", 3890)]); - -// ./test/core/call_indirect.wast:450 -assert_return(() => invoke($0, `type-f64`, []), [value("f64", 3940)]); - -// ./test/core/call_indirect.wast:452 -assert_return(() => invoke($0, `type-index`, []), [value("i64", 100n)]); - -// ./test/core/call_indirect.wast:454 -assert_return(() => invoke($0, `type-first-i32`, []), [value("i32", 32)]); - -// ./test/core/call_indirect.wast:455 -assert_return(() => invoke($0, `type-first-i64`, []), [value("i64", 64n)]); - -// ./test/core/call_indirect.wast:456 -assert_return(() => invoke($0, `type-first-f32`, []), [value("f32", 1.32)]); - -// ./test/core/call_indirect.wast:457 -assert_return(() => invoke($0, `type-first-f64`, []), [value("f64", 1.64)]); - -// ./test/core/call_indirect.wast:459 -assert_return(() => invoke($0, `type-second-i32`, []), [value("i32", 32)]); - -// ./test/core/call_indirect.wast:460 -assert_return(() => invoke($0, `type-second-i64`, []), [value("i64", 64n)]); - -// ./test/core/call_indirect.wast:461 -assert_return(() => invoke($0, `type-second-f32`, []), [value("f32", 32)]); - -// ./test/core/call_indirect.wast:462 -assert_return(() => invoke($0, `type-second-f64`, []), [value("f64", 64.1)]); - -// ./test/core/call_indirect.wast:464 -assert_return(() => invoke($0, `dispatch`, [5, 2n]), [value("i64", 2n)]); - -// ./test/core/call_indirect.wast:465 -assert_return(() => invoke($0, `dispatch`, [5, 5n]), [value("i64", 5n)]); - -// ./test/core/call_indirect.wast:466 -assert_return(() => invoke($0, `dispatch`, [12, 5n]), [value("i64", 120n)]); - -// ./test/core/call_indirect.wast:467 -assert_return(() => invoke($0, `dispatch`, [13, 5n]), [value("i64", 8n)]); - -// ./test/core/call_indirect.wast:468 -assert_return(() => invoke($0, `dispatch`, [20, 2n]), [value("i64", 2n)]); - -// ./test/core/call_indirect.wast:469 -assert_trap( - () => invoke($0, `dispatch`, [0, 2n]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:470 -assert_trap( - () => invoke($0, `dispatch`, [15, 2n]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:471 -assert_trap(() => invoke($0, `dispatch`, [29, 2n]), `undefined element`); - -// ./test/core/call_indirect.wast:472 -assert_trap(() => invoke($0, `dispatch`, [-1, 2n]), `undefined element`); - -// ./test/core/call_indirect.wast:473 -assert_trap( - () => invoke($0, `dispatch`, [1213432423, 2n]), - `undefined element`, -); - -// ./test/core/call_indirect.wast:475 -assert_return(() => invoke($0, `dispatch-structural-i64`, [5]), [ - value("i64", 9n), -]); - -// ./test/core/call_indirect.wast:476 -assert_return(() => invoke($0, `dispatch-structural-i64`, [12]), [ - value("i64", 362880n), -]); - -// ./test/core/call_indirect.wast:477 -assert_return(() => invoke($0, `dispatch-structural-i64`, [13]), [ - value("i64", 55n), -]); - -// ./test/core/call_indirect.wast:478 -assert_return(() => invoke($0, `dispatch-structural-i64`, [20]), [ - value("i64", 9n), -]); - -// ./test/core/call_indirect.wast:479 -assert_trap( - () => invoke($0, `dispatch-structural-i64`, [11]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:480 -assert_trap( - () => invoke($0, `dispatch-structural-i64`, [22]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:482 -assert_return(() => invoke($0, `dispatch-structural-i32`, [4]), [ - value("i32", 9), -]); - -// ./test/core/call_indirect.wast:483 -assert_return(() => invoke($0, `dispatch-structural-i32`, [23]), [ - value("i32", 362880), -]); - -// ./test/core/call_indirect.wast:484 -assert_return(() => invoke($0, `dispatch-structural-i32`, [26]), [ - value("i32", 55), -]); - -// ./test/core/call_indirect.wast:485 -assert_return(() => invoke($0, `dispatch-structural-i32`, [19]), [ - value("i32", 9), -]); - -// ./test/core/call_indirect.wast:486 -assert_trap( - () => invoke($0, `dispatch-structural-i32`, [9]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:487 -assert_trap( - () => invoke($0, `dispatch-structural-i32`, [21]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:489 -assert_return(() => invoke($0, `dispatch-structural-f32`, [6]), [ - value("f32", 9), -]); - -// ./test/core/call_indirect.wast:490 -assert_return(() => invoke($0, `dispatch-structural-f32`, [24]), [ - value("f32", 362880), -]); - -// ./test/core/call_indirect.wast:491 -assert_return(() => invoke($0, `dispatch-structural-f32`, [27]), [ - value("f32", 55), -]); - -// ./test/core/call_indirect.wast:492 -assert_return(() => invoke($0, `dispatch-structural-f32`, [21]), [ - value("f32", 9), -]); - -// ./test/core/call_indirect.wast:493 -assert_trap( - () => invoke($0, `dispatch-structural-f32`, [8]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:494 -assert_trap( - () => invoke($0, `dispatch-structural-f32`, [19]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:496 -assert_return(() => invoke($0, `dispatch-structural-f64`, [7]), [ - value("f64", 9), -]); - -// ./test/core/call_indirect.wast:497 -assert_return(() => invoke($0, `dispatch-structural-f64`, [25]), [ - value("f64", 362880), -]); - -// ./test/core/call_indirect.wast:498 -assert_return(() => invoke($0, `dispatch-structural-f64`, [28]), [ - value("f64", 55), -]); - -// ./test/core/call_indirect.wast:499 -assert_return(() => invoke($0, `dispatch-structural-f64`, [22]), [ - value("f64", 9), -]); - -// ./test/core/call_indirect.wast:500 -assert_trap( - () => invoke($0, `dispatch-structural-f64`, [10]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:501 -assert_trap( - () => invoke($0, `dispatch-structural-f64`, [18]), - `indirect call type mismatch`, -); - -// ./test/core/call_indirect.wast:503 -assert_return(() => invoke($0, `fac-i64`, [0n]), [value("i64", 1n)]); - -// ./test/core/call_indirect.wast:504 -assert_return(() => invoke($0, `fac-i64`, [1n]), [value("i64", 1n)]); - -// ./test/core/call_indirect.wast:505 -assert_return(() => invoke($0, `fac-i64`, [5n]), [value("i64", 120n)]); - -// ./test/core/call_indirect.wast:506 -assert_return(() => invoke($0, `fac-i64`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/call_indirect.wast:508 -assert_return(() => invoke($0, `fac-i32`, [0]), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:509 -assert_return(() => invoke($0, `fac-i32`, [1]), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:510 -assert_return(() => invoke($0, `fac-i32`, [5]), [value("i32", 120)]); - -// ./test/core/call_indirect.wast:511 -assert_return(() => invoke($0, `fac-i32`, [10]), [value("i32", 3628800)]); - -// ./test/core/call_indirect.wast:513 -assert_return(() => invoke($0, `fac-f32`, [value("f32", 0)]), [ - value("f32", 1), -]); - -// ./test/core/call_indirect.wast:514 -assert_return(() => invoke($0, `fac-f32`, [value("f32", 1)]), [ - value("f32", 1), -]); - -// ./test/core/call_indirect.wast:515 -assert_return(() => invoke($0, `fac-f32`, [value("f32", 5)]), [ - value("f32", 120), -]); - -// ./test/core/call_indirect.wast:516 -assert_return(() => invoke($0, `fac-f32`, [value("f32", 10)]), [ - value("f32", 3628800), -]); - -// ./test/core/call_indirect.wast:518 -assert_return(() => invoke($0, `fac-f64`, [value("f64", 0)]), [ - value("f64", 1), -]); - -// ./test/core/call_indirect.wast:519 -assert_return(() => invoke($0, `fac-f64`, [value("f64", 1)]), [ - value("f64", 1), -]); - -// ./test/core/call_indirect.wast:520 -assert_return(() => invoke($0, `fac-f64`, [value("f64", 5)]), [ - value("f64", 120), -]); - -// ./test/core/call_indirect.wast:521 -assert_return(() => invoke($0, `fac-f64`, [value("f64", 10)]), [ - value("f64", 3628800), -]); - -// ./test/core/call_indirect.wast:523 -assert_return(() => invoke($0, `fib-i64`, [0n]), [value("i64", 1n)]); - -// ./test/core/call_indirect.wast:524 -assert_return(() => invoke($0, `fib-i64`, [1n]), [value("i64", 1n)]); - -// ./test/core/call_indirect.wast:525 -assert_return(() => invoke($0, `fib-i64`, [2n]), [value("i64", 2n)]); - -// ./test/core/call_indirect.wast:526 -assert_return(() => invoke($0, `fib-i64`, [5n]), [value("i64", 8n)]); - -// ./test/core/call_indirect.wast:527 -assert_return(() => invoke($0, `fib-i64`, [20n]), [value("i64", 10946n)]); - -// ./test/core/call_indirect.wast:529 -assert_return(() => invoke($0, `fib-i32`, [0]), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:530 -assert_return(() => invoke($0, `fib-i32`, [1]), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:531 -assert_return(() => invoke($0, `fib-i32`, [2]), [value("i32", 2)]); - -// ./test/core/call_indirect.wast:532 -assert_return(() => invoke($0, `fib-i32`, [5]), [value("i32", 8)]); - -// ./test/core/call_indirect.wast:533 -assert_return(() => invoke($0, `fib-i32`, [20]), [value("i32", 10946)]); - -// ./test/core/call_indirect.wast:535 -assert_return(() => invoke($0, `fib-f32`, [value("f32", 0)]), [ - value("f32", 1), -]); - -// ./test/core/call_indirect.wast:536 -assert_return(() => invoke($0, `fib-f32`, [value("f32", 1)]), [ - value("f32", 1), -]); - -// ./test/core/call_indirect.wast:537 -assert_return(() => invoke($0, `fib-f32`, [value("f32", 2)]), [ - value("f32", 2), -]); - -// ./test/core/call_indirect.wast:538 -assert_return(() => invoke($0, `fib-f32`, [value("f32", 5)]), [ - value("f32", 8), -]); - -// ./test/core/call_indirect.wast:539 -assert_return(() => invoke($0, `fib-f32`, [value("f32", 20)]), [ - value("f32", 10946), -]); - -// ./test/core/call_indirect.wast:541 -assert_return(() => invoke($0, `fib-f64`, [value("f64", 0)]), [ - value("f64", 1), -]); - -// ./test/core/call_indirect.wast:542 -assert_return(() => invoke($0, `fib-f64`, [value("f64", 1)]), [ - value("f64", 1), -]); - -// ./test/core/call_indirect.wast:543 -assert_return(() => invoke($0, `fib-f64`, [value("f64", 2)]), [ - value("f64", 2), -]); - -// ./test/core/call_indirect.wast:544 -assert_return(() => invoke($0, `fib-f64`, [value("f64", 5)]), [ - value("f64", 8), -]); - -// ./test/core/call_indirect.wast:545 -assert_return(() => invoke($0, `fib-f64`, [value("f64", 20)]), [ - value("f64", 10946), -]); - -// ./test/core/call_indirect.wast:547 -assert_return(() => invoke($0, `even`, [0]), [value("i32", 44)]); - -// ./test/core/call_indirect.wast:548 -assert_return(() => invoke($0, `even`, [1]), [value("i32", 99)]); - -// ./test/core/call_indirect.wast:549 -assert_return(() => invoke($0, `even`, [100]), [value("i32", 44)]); - -// ./test/core/call_indirect.wast:550 -assert_return(() => invoke($0, `even`, [77]), [value("i32", 99)]); - -// ./test/core/call_indirect.wast:551 -assert_return(() => invoke($0, `odd`, [0]), [value("i32", 99)]); - -// ./test/core/call_indirect.wast:552 -assert_return(() => invoke($0, `odd`, [1]), [value("i32", 44)]); - -// ./test/core/call_indirect.wast:553 -assert_return(() => invoke($0, `odd`, [200]), [value("i32", 99)]); - -// ./test/core/call_indirect.wast:554 -assert_return(() => invoke($0, `odd`, [77]), [value("i32", 44)]); - -// ./test/core/call_indirect.wast:556 -assert_exhaustion(() => invoke($0, `runaway`, []), `call stack exhausted`); - -// ./test/core/call_indirect.wast:557 -assert_exhaustion( - () => invoke($0, `mutual-runaway`, []), - `call stack exhausted`, -); - -// ./test/core/call_indirect.wast:559 -assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 306)]); - -// ./test/core/call_indirect.wast:560 -assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); - -// ./test/core/call_indirect.wast:561 -assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); - -// ./test/core/call_indirect.wast:563 -assert_return(() => invoke($0, `as-if-condition`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:565 -assert_return(() => invoke($0, `as-br_if-first`, []), [value("i64", 356n)]); - -// ./test/core/call_indirect.wast:566 -assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); - -// ./test/core/call_indirect.wast:568 -assert_return(() => invoke($0, `as-br_table-first`, []), [value("f32", 3890)]); - -// ./test/core/call_indirect.wast:569 -assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); - -// ./test/core/call_indirect.wast:571 -assert_return(() => invoke($0, `as-store-first`, []), []); - -// ./test/core/call_indirect.wast:572 -assert_return(() => invoke($0, `as-store-last`, []), []); - -// ./test/core/call_indirect.wast:574 -assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:575 -assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:576 -assert_return(() => invoke($0, `as-drop-operand`, []), []); - -// ./test/core/call_indirect.wast:577 -assert_return(() => invoke($0, `as-br-value`, []), [value("f32", 1)]); - -// ./test/core/call_indirect.wast:578 -assert_return(() => invoke($0, `as-local.set-value`, []), [value("f64", 1)]); - -// ./test/core/call_indirect.wast:579 -assert_return(() => invoke($0, `as-local.tee-value`, []), [value("f64", 1)]); - -// ./test/core/call_indirect.wast:580 -assert_return(() => invoke($0, `as-global.set-value`, []), [value("f64", 1)]); - -// ./test/core/call_indirect.wast:581 -assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:583 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("f32", 0)]); - -// ./test/core/call_indirect.wast:584 -assert_return(() => invoke($0, `as-binary-left`, []), [value("i32", 11)]); - -// ./test/core/call_indirect.wast:585 -assert_return(() => invoke($0, `as-binary-right`, []), [value("i32", 9)]); - -// ./test/core/call_indirect.wast:586 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/call_indirect.wast:587 -assert_return(() => invoke($0, `as-compare-left`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:588 -assert_return(() => invoke($0, `as-compare-right`, []), [value("i32", 1)]); - -// ./test/core/call_indirect.wast:589 -assert_return(() => invoke($0, `as-convert-operand`, []), [value("i64", 1n)]); - -// ./test/core/call_indirect.wast:593 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (param i32) (i32.const 0) (i32.const 0) ) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:605 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (param i32) (type $$sig) (result i32) (i32.const 0) (i32.const 0) ) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:617 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (param i32) (result i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:629 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (result i32) (type $$sig) (param i32) (i32.const 0) (i32.const 0) ) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:641 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (result i32) (param i32) (type $$sig) (i32.const 0) (i32.const 0) ) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:653 -assert_malformed( - () => - instantiate( - `(table 0 funcref) (func (result i32) (call_indirect (result i32) (param i32) (i32.const 0) (i32.const 0)) ) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:663 -assert_malformed( - () => - instantiate( - `(table 0 funcref) (func (call_indirect (param $$x i32) (i32.const 0) (i32.const 0))) `, - ), - `unexpected token`, -); - -// ./test/core/call_indirect.wast:670 -assert_malformed( - () => - instantiate( - `(type $$sig (func)) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (i32.const 0)) ) `, - ), - `inline function type`, -); - -// ./test/core/call_indirect.wast:680 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (result i32) (i32.const 0)) ) `, - ), - `inline function type`, -); - -// ./test/core/call_indirect.wast:690 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32) (result i32))) (table 0 funcref) (func (call_indirect (type $$sig) (param i32) (i32.const 0) (i32.const 0)) ) `, - ), - `inline function type`, -); - -// ./test/core/call_indirect.wast:700 -assert_malformed( - () => - instantiate( - `(type $$sig (func (param i32 i32) (result i32))) (table 0 funcref) (func (result i32) (call_indirect (type $$sig) (param i32) (result i32) (i32.const 0) (i32.const 0) ) ) `, - ), - `inline function type`, -); - -// ./test/core/call_indirect.wast:715 -assert_invalid(() => - instantiate(`(module - (type (func)) - (func $$no-table (call_indirect (type 0) (i32.const 0))) - )`), `unknown table`); - -// ./test/core/call_indirect.wast:723 -assert_invalid(() => - instantiate(`(module - (type (func)) - (table 0 funcref) - (func $$type-void-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0)))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:731 -assert_invalid(() => - instantiate(`(module - (type (func (result i64))) - (table 0 funcref) - (func $$type-num-vs-num (i32.eqz (call_indirect (type 0) (i32.const 0)))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:740 -assert_invalid(() => - instantiate(`(module - (type (func (param i32))) - (table 0 funcref) - (func $$arity-0-vs-1 (call_indirect (type 0) (i32.const 0))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:748 -assert_invalid(() => - instantiate(`(module - (type (func (param f64 i32))) - (table 0 funcref) - (func $$arity-0-vs-2 (call_indirect (type 0) (i32.const 0))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:756 -assert_invalid(() => - instantiate(`(module - (type (func)) - (table 0 funcref) - (func $$arity-1-vs-0 (call_indirect (type 0) (i32.const 1) (i32.const 0))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:764 -assert_invalid(() => - instantiate(`(module - (type (func)) - (table 0 funcref) - (func $$arity-2-vs-0 - (call_indirect (type 0) (f64.const 2) (i32.const 1) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:775 -assert_invalid(() => - instantiate(`(module - (type (func (param i32))) - (table 0 funcref) - (func $$type-func-void-vs-i32 (call_indirect (type 0) (i32.const 1) (nop))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:783 -assert_invalid(() => - instantiate(`(module - (type (func (param i32))) - (table 0 funcref) - (func $$type-func-num-vs-i32 (call_indirect (type 0) (i32.const 0) (i64.const 1))) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:792 -assert_invalid(() => - instantiate(`(module - (type (func (param i32 i32))) - (table 0 funcref) - (func $$type-first-void-vs-num - (call_indirect (type 0) (nop) (i32.const 1) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:802 -assert_invalid(() => - instantiate(`(module - (type (func (param i32 i32))) - (table 0 funcref) - (func $$type-second-void-vs-num - (call_indirect (type 0) (i32.const 1) (nop) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:812 -assert_invalid(() => - instantiate(`(module - (type (func (param i32 f64))) - (table 0 funcref) - (func $$type-first-num-vs-num - (call_indirect (type 0) (f64.const 1) (i32.const 1) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:822 -assert_invalid(() => - instantiate(`(module - (type (func (param f64 i32))) - (table 0 funcref) - (func $$type-second-num-vs-num - (call_indirect (type 0) (i32.const 1) (f64.const 1) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:833 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32)) - (type $$sig (func (param i32))) - (table funcref (elem $$f)) - (func $$type-first-empty-in-block - (block - (call_indirect (type $$sig) (i32.const 0)) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:846 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32 i32)) - (type $$sig (func (param i32 i32))) - (table funcref (elem $$f)) - (func $$type-second-empty-in-block - (block - (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:859 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32)) - (type $$sig (func (param i32))) - (table funcref (elem $$f)) - (func $$type-first-empty-in-loop - (loop - (call_indirect (type $$sig) (i32.const 0)) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:872 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32 i32)) - (type $$sig (func (param i32 i32))) - (table funcref (elem $$f)) - (func $$type-second-empty-in-loop - (loop - (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:885 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32)) - (type $$sig (func (param i32))) - (table funcref (elem $$f)) - (func $$type-first-empty-in-then - (i32.const 0) (i32.const 0) - (if - (then - (call_indirect (type $$sig) (i32.const 0)) - ) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:901 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32 i32)) - (type $$sig (func (param i32 i32))) - (table funcref (elem $$f)) - (func $$type-second-empty-in-then - (i32.const 0) (i32.const 0) - (if - (then - (call_indirect (type $$sig) (i32.const 0) (i32.const 0)) - ) - ) - ) - )`), `type mismatch`); - -// ./test/core/call_indirect.wast:921 -assert_invalid(() => - instantiate(`(module - (table 0 funcref) - (func $$unbound-type (call_indirect (type 1) (i32.const 0))) - )`), `unknown type`); - -// ./test/core/call_indirect.wast:928 -assert_invalid(() => - instantiate(`(module - (table 0 funcref) - (func $$large-type (call_indirect (type 1012321300) (i32.const 0))) - )`), `unknown type`); - -// ./test/core/call_indirect.wast:939 -assert_invalid( - () => instantiate(`(module (table funcref (elem 0 0)))`), - `unknown function`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/const.wast.js b/js/src/jit-test/tests/wasm/spec/threads/const.wast.js deleted file mode 100644 index 7f2a5249e767..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/const.wast.js +++ /dev/null @@ -1,4078 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/const.wast - -// ./test/core/const.wast:5 -let $0 = instantiate(`(module (func (i32.const 0_123_456_789) drop))`); - -// ./test/core/const.wast:6 -let $1 = instantiate(`(module (func (i32.const 0x0_9acf_fBDF) drop))`); - -// ./test/core/const.wast:7 -assert_malformed( - () => instantiate(`(func (i32.const) drop) `), - `unexpected token`, -); - -// ./test/core/const.wast:11 -assert_malformed( - () => instantiate(`(func (i32.const 0x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:15 -assert_malformed( - () => instantiate(`(func (i32.const 1x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:19 -assert_malformed( - () => instantiate(`(func (i32.const 0xg) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:24 -let $2 = instantiate(`(module (func (i64.const 0_123_456_789) drop))`); - -// ./test/core/const.wast:25 -let $3 = instantiate(`(module (func (i64.const 0x0125_6789_ADEF_bcef) drop))`); - -// ./test/core/const.wast:26 -assert_malformed( - () => instantiate(`(func (i64.const) drop) `), - `unexpected token`, -); - -// ./test/core/const.wast:30 -assert_malformed( - () => instantiate(`(func (i64.const 0x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:34 -assert_malformed( - () => instantiate(`(func (i64.const 1x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:38 -assert_malformed( - () => instantiate(`(func (i64.const 0xg) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:43 -let $4 = instantiate(`(module (func (f32.const 0123456789) drop))`); - -// ./test/core/const.wast:44 -let $5 = instantiate(`(module (func (f32.const 0123456789e019) drop))`); - -// ./test/core/const.wast:45 -let $6 = instantiate(`(module (func (f32.const 0123456789e+019) drop))`); - -// ./test/core/const.wast:46 -let $7 = instantiate(`(module (func (f32.const 0123456789e-019) drop))`); - -// ./test/core/const.wast:47 -let $8 = instantiate(`(module (func (f32.const 0123456789.) drop))`); - -// ./test/core/const.wast:48 -let $9 = instantiate(`(module (func (f32.const 0123456789.e019) drop))`); - -// ./test/core/const.wast:49 -let $10 = instantiate(`(module (func (f32.const 0123456789.e+019) drop))`); - -// ./test/core/const.wast:50 -let $11 = instantiate(`(module (func (f32.const 0123456789.e-019) drop))`); - -// ./test/core/const.wast:51 -let $12 = instantiate(`(module (func (f32.const 0123456789.0123456789) drop))`); - -// ./test/core/const.wast:52 -let $13 = instantiate( - `(module (func (f32.const 0123456789.0123456789e019) drop))`, -); - -// ./test/core/const.wast:53 -let $14 = instantiate( - `(module (func (f32.const 0123456789.0123456789e+019) drop))`, -); - -// ./test/core/const.wast:54 -let $15 = instantiate( - `(module (func (f32.const 0123456789.0123456789e-019) drop))`, -); - -// ./test/core/const.wast:55 -let $16 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF) drop))`); - -// ./test/core/const.wast:56 -let $17 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEFp019) drop))`, -); - -// ./test/core/const.wast:57 -let $18 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEFp+019) drop))`, -); - -// ./test/core/const.wast:58 -let $19 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEFp-019) drop))`, -); - -// ./test/core/const.wast:59 -let $20 = instantiate(`(module (func (f32.const 0x0123456789ABCDEF.) drop))`); - -// ./test/core/const.wast:60 -let $21 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.p019) drop))`, -); - -// ./test/core/const.wast:61 -let $22 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.p+019) drop))`, -); - -// ./test/core/const.wast:62 -let $23 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.p-019) drop))`, -); - -// ./test/core/const.wast:63 -let $24 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.019aF) drop))`, -); - -// ./test/core/const.wast:64 -let $25 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.019aFp019) drop))`, -); - -// ./test/core/const.wast:65 -let $26 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.019aFp+019) drop))`, -); - -// ./test/core/const.wast:66 -let $27 = instantiate( - `(module (func (f32.const 0x0123456789ABCDEF.019aFp-019) drop))`, -); - -// ./test/core/const.wast:67 -assert_malformed( - () => instantiate(`(func (f32.const) drop) `), - `unexpected token`, -); - -// ./test/core/const.wast:71 -assert_malformed( - () => instantiate(`(func (f32.const .0) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:75 -assert_malformed( - () => instantiate(`(func (f32.const .0e0) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:79 -assert_malformed( - () => instantiate(`(func (f32.const 0e) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:83 -assert_malformed( - () => instantiate(`(func (f32.const 0e+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:87 -assert_malformed( - () => instantiate(`(func (f32.const 0.0e) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:91 -assert_malformed( - () => instantiate(`(func (f32.const 0.0e-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:95 -assert_malformed( - () => instantiate(`(func (f32.const 0x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:99 -assert_malformed( - () => instantiate(`(func (f32.const 1x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:103 -assert_malformed( - () => instantiate(`(func (f32.const 0xg) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:107 -assert_malformed( - () => instantiate(`(func (f32.const 0x.) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:111 -assert_malformed( - () => instantiate(`(func (f32.const 0x0.g) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:115 -assert_malformed( - () => instantiate(`(func (f32.const 0x0p) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:119 -assert_malformed( - () => instantiate(`(func (f32.const 0x0p+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:123 -assert_malformed( - () => instantiate(`(func (f32.const 0x0p-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:127 -assert_malformed( - () => instantiate(`(func (f32.const 0x0.0p) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:131 -assert_malformed( - () => instantiate(`(func (f32.const 0x0.0p+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:135 -assert_malformed( - () => instantiate(`(func (f32.const 0x0.0p-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:139 -assert_malformed( - () => instantiate(`(func (f32.const 0x0pA) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:145 -let $28 = instantiate(`(module (func (f64.const 0123456789) drop))`); - -// ./test/core/const.wast:146 -let $29 = instantiate(`(module (func (f64.const 0123456789e019) drop))`); - -// ./test/core/const.wast:147 -let $30 = instantiate(`(module (func (f64.const 0123456789e+019) drop))`); - -// ./test/core/const.wast:148 -let $31 = instantiate(`(module (func (f64.const 0123456789e-019) drop))`); - -// ./test/core/const.wast:149 -let $32 = instantiate(`(module (func (f64.const 0123456789.) drop))`); - -// ./test/core/const.wast:150 -let $33 = instantiate(`(module (func (f64.const 0123456789.e019) drop))`); - -// ./test/core/const.wast:151 -let $34 = instantiate(`(module (func (f64.const 0123456789.e+019) drop))`); - -// ./test/core/const.wast:152 -let $35 = instantiate(`(module (func (f64.const 0123456789.e-019) drop))`); - -// ./test/core/const.wast:153 -let $36 = instantiate(`(module (func (f64.const 0123456789.0123456789) drop))`); - -// ./test/core/const.wast:154 -let $37 = instantiate( - `(module (func (f64.const 0123456789.0123456789e019) drop))`, -); - -// ./test/core/const.wast:155 -let $38 = instantiate( - `(module (func (f64.const 0123456789.0123456789e+019) drop))`, -); - -// ./test/core/const.wast:156 -let $39 = instantiate( - `(module (func (f64.const 0123456789.0123456789e-019) drop))`, -); - -// ./test/core/const.wast:157 -let $40 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef) drop))`, -); - -// ./test/core/const.wast:158 -let $41 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdefp019) drop))`, -); - -// ./test/core/const.wast:159 -let $42 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdefp+019) drop))`, -); - -// ./test/core/const.wast:160 -let $43 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdefp-019) drop))`, -); - -// ./test/core/const.wast:161 -let $44 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.) drop))`, -); - -// ./test/core/const.wast:162 -let $45 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.p019) drop))`, -); - -// ./test/core/const.wast:163 -let $46 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.p+019) drop))`, -); - -// ./test/core/const.wast:164 -let $47 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.p-019) drop))`, -); - -// ./test/core/const.wast:165 -let $48 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdef) drop))`, -); - -// ./test/core/const.wast:166 -let $49 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp019) drop))`, -); - -// ./test/core/const.wast:167 -let $50 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp+019) drop))`, -); - -// ./test/core/const.wast:168 -let $51 = instantiate( - `(module (func (f64.const 0x0123456789ABCDEFabcdef.0123456789ABCDEFabcdefp-019) drop))`, -); - -// ./test/core/const.wast:169 -assert_malformed( - () => instantiate(`(func (f64.const) drop) `), - `unexpected token`, -); - -// ./test/core/const.wast:173 -assert_malformed( - () => instantiate(`(func (f64.const .0) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:177 -assert_malformed( - () => instantiate(`(func (f64.const .0e0) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:181 -assert_malformed( - () => instantiate(`(func (f64.const 0e) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:185 -assert_malformed( - () => instantiate(`(func (f64.const 0e+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:189 -assert_malformed( - () => instantiate(`(func (f64.const 0.0e) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:193 -assert_malformed( - () => instantiate(`(func (f64.const 0.0e-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:197 -assert_malformed( - () => instantiate(`(func (f64.const 0x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:201 -assert_malformed( - () => instantiate(`(func (f64.const 1x) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:205 -assert_malformed( - () => instantiate(`(func (f64.const 0xg) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:209 -assert_malformed( - () => instantiate(`(func (f64.const 0x.) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:213 -assert_malformed( - () => instantiate(`(func (f64.const 0x0.g) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:217 -assert_malformed( - () => instantiate(`(func (f64.const 0x0p) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:221 -assert_malformed( - () => instantiate(`(func (f64.const 0x0p+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:225 -assert_malformed( - () => instantiate(`(func (f64.const 0x0p-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:229 -assert_malformed( - () => instantiate(`(func (f64.const 0x0.0p) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:233 -assert_malformed( - () => instantiate(`(func (f64.const 0x0.0p+) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:237 -assert_malformed( - () => instantiate(`(func (f64.const 0x0.0p-) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:241 -assert_malformed( - () => instantiate(`(func (f64.const 0x0pA) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:249 -let $52 = instantiate(`(module (func (i32.const 0xffffffff) drop))`); - -// ./test/core/const.wast:250 -let $53 = instantiate(`(module (func (i32.const -0x80000000) drop))`); - -// ./test/core/const.wast:251 -assert_malformed( - () => instantiate(`(func (i32.const 0x100000000) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:255 -assert_malformed( - () => instantiate(`(func (i32.const -0x80000001) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:260 -let $54 = instantiate(`(module (func (i32.const 4294967295) drop))`); - -// ./test/core/const.wast:261 -let $55 = instantiate(`(module (func (i32.const -2147483648) drop))`); - -// ./test/core/const.wast:262 -assert_malformed( - () => instantiate(`(func (i32.const 4294967296) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:266 -assert_malformed( - () => instantiate(`(func (i32.const -2147483649) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:271 -let $56 = instantiate(`(module (func (i64.const 0xffffffffffffffff) drop))`); - -// ./test/core/const.wast:272 -let $57 = instantiate(`(module (func (i64.const -0x8000000000000000) drop))`); - -// ./test/core/const.wast:273 -assert_malformed( - () => instantiate(`(func (i64.const 0x10000000000000000) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:277 -assert_malformed( - () => instantiate(`(func (i64.const -0x8000000000000001) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:282 -let $58 = instantiate(`(module (func (i64.const 18446744073709551615) drop))`); - -// ./test/core/const.wast:283 -let $59 = instantiate(`(module (func (i64.const -9223372036854775808) drop))`); - -// ./test/core/const.wast:284 -assert_malformed( - () => instantiate(`(func (i64.const 18446744073709551616) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:288 -assert_malformed( - () => instantiate(`(func (i64.const -9223372036854775809) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:293 -let $60 = instantiate(`(module (func (f32.const 0x1p127) drop))`); - -// ./test/core/const.wast:294 -let $61 = instantiate(`(module (func (f32.const -0x1p127) drop))`); - -// ./test/core/const.wast:295 -let $62 = instantiate(`(module (func (f32.const 0x1.fffffep127) drop))`); - -// ./test/core/const.wast:296 -let $63 = instantiate(`(module (func (f32.const -0x1.fffffep127) drop))`); - -// ./test/core/const.wast:297 -let $64 = instantiate(`(module (func (f32.const 0x1.fffffe7p127) drop))`); - -// ./test/core/const.wast:298 -let $65 = instantiate(`(module (func (f32.const -0x1.fffffe7p127) drop))`); - -// ./test/core/const.wast:299 -let $66 = instantiate( - `(module (func (f32.const 0x1.fffffefffffff8000000p127) drop))`, -); - -// ./test/core/const.wast:300 -let $67 = instantiate( - `(module (func (f32.const -0x1.fffffefffffff8000000p127) drop))`, -); - -// ./test/core/const.wast:301 -let $68 = instantiate( - `(module (func (f32.const 0x1.fffffefffffffffffffp127) drop))`, -); - -// ./test/core/const.wast:302 -let $69 = instantiate( - `(module (func (f32.const -0x1.fffffefffffffffffffp127) drop))`, -); - -// ./test/core/const.wast:303 -assert_malformed( - () => instantiate(`(func (f32.const 0x1p128) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:307 -assert_malformed( - () => instantiate(`(func (f32.const -0x1p128) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:311 -assert_malformed( - () => instantiate(`(func (f32.const 0x1.ffffffp127) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:315 -assert_malformed( - () => instantiate(`(func (f32.const -0x1.ffffffp127) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:320 -let $70 = instantiate(`(module (func (f32.const 1e38) drop))`); - -// ./test/core/const.wast:321 -let $71 = instantiate(`(module (func (f32.const -1e38) drop))`); - -// ./test/core/const.wast:322 -assert_malformed( - () => instantiate(`(func (f32.const 1e39) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:326 -assert_malformed( - () => instantiate(`(func (f32.const -1e39) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:331 -let $72 = instantiate( - `(module (func (f32.const 340282356779733623858607532500980858880) drop))`, -); - -// ./test/core/const.wast:332 -let $73 = instantiate( - `(module (func (f32.const -340282356779733623858607532500980858880) drop))`, -); - -// ./test/core/const.wast:333 -assert_malformed( - () => - instantiate( - `(func (f32.const 340282356779733661637539395458142568448) drop) `, - ), - `constant out of range`, -); - -// ./test/core/const.wast:337 -assert_malformed( - () => - instantiate( - `(func (f32.const -340282356779733661637539395458142568448) drop) `, - ), - `constant out of range`, -); - -// ./test/core/const.wast:342 -let $74 = instantiate(`(module (func (f64.const 0x1p1023) drop))`); - -// ./test/core/const.wast:343 -let $75 = instantiate(`(module (func (f64.const -0x1p1023) drop))`); - -// ./test/core/const.wast:344 -let $76 = instantiate( - `(module (func (f64.const 0x1.fffffffffffffp1023) drop))`, -); - -// ./test/core/const.wast:345 -let $77 = instantiate( - `(module (func (f64.const -0x1.fffffffffffffp1023) drop))`, -); - -// ./test/core/const.wast:346 -let $78 = instantiate( - `(module (func (f64.const 0x1.fffffffffffff7p1023) drop))`, -); - -// ./test/core/const.wast:347 -let $79 = instantiate( - `(module (func (f64.const -0x1.fffffffffffff7p1023) drop))`, -); - -// ./test/core/const.wast:348 -let $80 = instantiate( - `(module (func (f64.const 0x1.fffffffffffff7ffffffp1023) drop))`, -); - -// ./test/core/const.wast:349 -let $81 = instantiate( - `(module (func (f64.const -0x1.fffffffffffff7ffffffp1023) drop))`, -); - -// ./test/core/const.wast:350 -assert_malformed( - () => instantiate(`(func (f64.const 0x1p1024) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:354 -assert_malformed( - () => instantiate(`(func (f64.const -0x1p1024) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:358 -assert_malformed( - () => instantiate(`(func (f64.const 0x1.fffffffffffff8p1023) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:362 -assert_malformed( - () => instantiate(`(func (f64.const -0x1.fffffffffffff8p1023) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:367 -let $82 = instantiate(`(module (func (f64.const 1e308) drop))`); - -// ./test/core/const.wast:368 -let $83 = instantiate(`(module (func (f64.const -1e308) drop))`); - -// ./test/core/const.wast:369 -assert_malformed( - () => instantiate(`(func (f64.const 1e309) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:373 -assert_malformed( - () => instantiate(`(func (f64.const -1e309) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:378 -let $84 = instantiate( - `(module (func (f64.const 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`, -); - -// ./test/core/const.wast:379 -let $85 = instantiate( - `(module (func (f64.const -179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368) drop))`, -); - -// ./test/core/const.wast:380 -assert_malformed( - () => - instantiate( - `(func (f64.const 269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `, - ), - `constant out of range`, -); - -// ./test/core/const.wast:384 -assert_malformed( - () => - instantiate( - `(func (f64.const -269653970229347356221791135597556535197105851288767494898376215204735891170042808140884337949150317257310688430271573696351481990334196274152701320055306275479074865864826923114368235135583993416113802762682700913456874855354834422248712838998185022412196739306217084753107265771378949821875606039276187287552) drop) `, - ), - `constant out of range`, -); - -// ./test/core/const.wast:389 -let $86 = instantiate(`(module (func (f32.const nan:0x1) drop))`); - -// ./test/core/const.wast:390 -let $87 = instantiate(`(module (func (f64.const nan:0x1) drop))`); - -// ./test/core/const.wast:391 -let $88 = instantiate(`(module (func (f32.const nan:0x7f_ffff) drop))`); - -// ./test/core/const.wast:392 -let $89 = instantiate( - `(module (func (f64.const nan:0xf_ffff_ffff_ffff) drop))`, -); - -// ./test/core/const.wast:394 -assert_malformed( - () => instantiate(`(func (f32.const nan:1) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:398 -assert_malformed( - () => instantiate(`(func (f64.const nan:1) drop) `), - `unknown operator`, -); - -// ./test/core/const.wast:403 -assert_malformed( - () => instantiate(`(func (f32.const nan:0x0) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:407 -assert_malformed( - () => instantiate(`(func (f64.const nan:0x0) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:412 -assert_malformed( - () => instantiate(`(func (f32.const nan:0x80_0000) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:416 -assert_malformed( - () => instantiate(`(func (f64.const nan:0x10_0000_0000_0000) drop) `), - `constant out of range`, -); - -// ./test/core/const.wast:425 -let $90 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p-50)))`, -); - -// ./test/core/const.wast:426 -assert_return(() => invoke($90, `f`, []), [ - value("f32", 0.0000000000000008881784), -]); - -// ./test/core/const.wast:427 -let $91 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p-50)))`, -); - -// ./test/core/const.wast:428 -assert_return(() => invoke($91, `f`, []), [ - value("f32", -0.0000000000000008881784), -]); - -// ./test/core/const.wast:429 -let $92 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p-50)))`, -); - -// ./test/core/const.wast:430 -assert_return(() => invoke($92, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:431 -let $93 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p-50)))`, -); - -// ./test/core/const.wast:432 -assert_return(() => invoke($93, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:433 -let $94 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp-50)))`, -); - -// ./test/core/const.wast:434 -assert_return(() => invoke($94, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:435 -let $95 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp-50)))`, -); - -// ./test/core/const.wast:436 -assert_return(() => invoke($95, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:437 -let $96 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p-50)))`, -); - -// ./test/core/const.wast:438 -assert_return(() => invoke($96, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:439 -let $97 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p-50)))`, -); - -// ./test/core/const.wast:440 -assert_return(() => invoke($97, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:441 -let $98 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p-50)))`, -); - -// ./test/core/const.wast:442 -assert_return(() => invoke($98, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:443 -let $99 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p-50)))`, -); - -// ./test/core/const.wast:444 -assert_return(() => invoke($99, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:445 -let $100 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp-50)))`, -); - -// ./test/core/const.wast:446 -assert_return(() => invoke($100, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:447 -let $101 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp-50)))`, -); - -// ./test/core/const.wast:448 -assert_return(() => invoke($101, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:449 -let $102 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p-50)))`, -); - -// ./test/core/const.wast:450 -assert_return(() => invoke($102, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:451 -let $103 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p-50)))`, -); - -// ./test/core/const.wast:452 -assert_return(() => invoke($103, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:453 -let $104 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p-50)))`, -); - -// ./test/core/const.wast:454 -assert_return(() => invoke($104, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:455 -let $105 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p-50)))`, -); - -// ./test/core/const.wast:456 -assert_return(() => invoke($105, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:457 -let $106 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp-50)))`, -); - -// ./test/core/const.wast:458 -assert_return(() => invoke($106, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:459 -let $107 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp-50)))`, -); - -// ./test/core/const.wast:460 -assert_return(() => invoke($107, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:461 -let $108 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p-50)))`, -); - -// ./test/core/const.wast:462 -assert_return(() => invoke($108, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:463 -let $109 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p-50)))`, -); - -// ./test/core/const.wast:464 -assert_return(() => invoke($109, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:465 -let $110 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p-50)))`, -); - -// ./test/core/const.wast:466 -assert_return(() => invoke($110, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:467 -let $111 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p-50)))`, -); - -// ./test/core/const.wast:468 -assert_return(() => invoke($111, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:469 -let $112 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp-50)))`, -); - -// ./test/core/const.wast:470 -assert_return(() => invoke($112, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:471 -let $113 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp-50)))`, -); - -// ./test/core/const.wast:472 -assert_return(() => invoke($113, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:473 -let $114 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p-50)))`, -); - -// ./test/core/const.wast:474 -assert_return(() => invoke($114, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:475 -let $115 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p-50)))`, -); - -// ./test/core/const.wast:476 -assert_return(() => invoke($115, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:477 -let $116 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p-50)))`, -); - -// ./test/core/const.wast:478 -assert_return(() => invoke($116, `f`, []), [ - value("f32", 0.0000000000000008881787), -]); - -// ./test/core/const.wast:479 -let $117 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p-50)))`, -); - -// ./test/core/const.wast:480 -assert_return(() => invoke($117, `f`, []), [ - value("f32", -0.0000000000000008881787), -]); - -// ./test/core/const.wast:482 -let $118 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.004000000p-64)))`, -); - -// ./test/core/const.wast:483 -assert_return(() => invoke($118, `f`, []), [ - value("f32", 0.0000000000000008881784), -]); - -// ./test/core/const.wast:484 -let $119 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.004000000p-64)))`, -); - -// ./test/core/const.wast:485 -assert_return(() => invoke($119, `f`, []), [ - value("f32", -0.0000000000000008881784), -]); - -// ./test/core/const.wast:486 -let $120 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.004000001p-64)))`, -); - -// ./test/core/const.wast:487 -assert_return(() => invoke($120, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:488 -let $121 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.004000001p-64)))`, -); - -// ./test/core/const.wast:489 -assert_return(() => invoke($121, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:490 -let $122 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.007ffffffp-64)))`, -); - -// ./test/core/const.wast:491 -assert_return(() => invoke($122, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:492 -let $123 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.007ffffffp-64)))`, -); - -// ./test/core/const.wast:493 -assert_return(() => invoke($123, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:494 -let $124 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.008000000p-64)))`, -); - -// ./test/core/const.wast:495 -assert_return(() => invoke($124, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:496 -let $125 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.008000000p-64)))`, -); - -// ./test/core/const.wast:497 -assert_return(() => invoke($125, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:498 -let $126 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.008000001p-64)))`, -); - -// ./test/core/const.wast:499 -assert_return(() => invoke($126, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:500 -let $127 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.008000001p-64)))`, -); - -// ./test/core/const.wast:501 -assert_return(() => invoke($127, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:502 -let $128 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.00bffffffp-64)))`, -); - -// ./test/core/const.wast:503 -assert_return(() => invoke($128, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:504 -let $129 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.00bffffffp-64)))`, -); - -// ./test/core/const.wast:505 -assert_return(() => invoke($129, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:506 -let $130 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.00c000000p-64)))`, -); - -// ./test/core/const.wast:507 -assert_return(() => invoke($130, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:508 -let $131 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.00c000000p-64)))`, -); - -// ./test/core/const.wast:509 -assert_return(() => invoke($131, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:510 -let $132 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.00c000001p-64)))`, -); - -// ./test/core/const.wast:511 -assert_return(() => invoke($132, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:512 -let $133 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.00c000001p-64)))`, -); - -// ./test/core/const.wast:513 -assert_return(() => invoke($133, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:514 -let $134 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.00fffffffp-64)))`, -); - -// ./test/core/const.wast:515 -assert_return(() => invoke($134, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:516 -let $135 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.00fffffffp-64)))`, -); - -// ./test/core/const.wast:517 -assert_return(() => invoke($135, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:518 -let $136 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.010000001p-64)))`, -); - -// ./test/core/const.wast:519 -assert_return(() => invoke($136, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:520 -let $137 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.010000001p-64)))`, -); - -// ./test/core/const.wast:521 -assert_return(() => invoke($137, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:522 -let $138 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.013ffffffp-64)))`, -); - -// ./test/core/const.wast:523 -assert_return(() => invoke($138, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:524 -let $139 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.013ffffffp-64)))`, -); - -// ./test/core/const.wast:525 -assert_return(() => invoke($139, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:526 -let $140 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000.014000001p-64)))`, -); - -// ./test/core/const.wast:527 -assert_return(() => invoke($140, `f`, []), [ - value("f32", 0.0000000000000008881787), -]); - -// ./test/core/const.wast:528 -let $141 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000.014000001p-64)))`, -); - -// ./test/core/const.wast:529 -assert_return(() => invoke($141, `f`, []), [ - value("f32", -0.0000000000000008881787), -]); - -// ./test/core/const.wast:531 -let $142 = instantiate( - `(module (func (export "f") (result f32) (f32.const +8.8817847263968443573e-16)))`, -); - -// ./test/core/const.wast:532 -assert_return(() => invoke($142, `f`, []), [ - value("f32", 0.0000000000000008881784), -]); - -// ./test/core/const.wast:533 -let $143 = instantiate( - `(module (func (export "f") (result f32) (f32.const -8.8817847263968443573e-16)))`, -); - -// ./test/core/const.wast:534 -assert_return(() => invoke($143, `f`, []), [ - value("f32", -0.0000000000000008881784), -]); - -// ./test/core/const.wast:535 -let $144 = instantiate( - `(module (func (export "f") (result f32) (f32.const +8.8817847263968443574e-16)))`, -); - -// ./test/core/const.wast:536 -assert_return(() => invoke($144, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:537 -let $145 = instantiate( - `(module (func (export "f") (result f32) (f32.const -8.8817847263968443574e-16)))`, -); - -// ./test/core/const.wast:538 -assert_return(() => invoke($145, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:539 -let $146 = instantiate( - `(module (func (export "f") (result f32) (f32.const +8.8817857851880284252e-16)))`, -); - -// ./test/core/const.wast:540 -assert_return(() => invoke($146, `f`, []), [ - value("f32", 0.0000000000000008881785), -]); - -// ./test/core/const.wast:541 -let $147 = instantiate( - `(module (func (export "f") (result f32) (f32.const -8.8817857851880284252e-16)))`, -); - -// ./test/core/const.wast:542 -assert_return(() => invoke($147, `f`, []), [ - value("f32", -0.0000000000000008881785), -]); - -// ./test/core/const.wast:543 -let $148 = instantiate( - `(module (func (export "f") (result f32) (f32.const +8.8817857851880284253e-16)))`, -); - -// ./test/core/const.wast:544 -assert_return(() => invoke($148, `f`, []), [ - value("f32", 0.0000000000000008881786), -]); - -// ./test/core/const.wast:545 -let $149 = instantiate( - `(module (func (export "f") (result f32) (f32.const -8.8817857851880284253e-16)))`, -); - -// ./test/core/const.wast:546 -assert_return(() => invoke($149, `f`, []), [ - value("f32", -0.0000000000000008881786), -]); - -// ./test/core/const.wast:549 -let $150 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000100000000000p+50)))`, -); - -// ./test/core/const.wast:550 -assert_return(() => invoke($150, `f`, []), [value("f32", 1125899900000000)]); - -// ./test/core/const.wast:551 -let $151 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000100000000000p+50)))`, -); - -// ./test/core/const.wast:552 -assert_return(() => invoke($151, `f`, []), [value("f32", -1125899900000000)]); - -// ./test/core/const.wast:553 -let $152 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000100000000001p+50)))`, -); - -// ./test/core/const.wast:554 -assert_return(() => invoke($152, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:555 -let $153 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000100000000001p+50)))`, -); - -// ./test/core/const.wast:556 -assert_return(() => invoke($153, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:557 -let $154 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000001fffffffffffp+50)))`, -); - -// ./test/core/const.wast:558 -assert_return(() => invoke($154, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:559 -let $155 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000001fffffffffffp+50)))`, -); - -// ./test/core/const.wast:560 -assert_return(() => invoke($155, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:561 -let $156 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000200000000000p+50)))`, -); - -// ./test/core/const.wast:562 -assert_return(() => invoke($156, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:563 -let $157 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000200000000000p+50)))`, -); - -// ./test/core/const.wast:564 -assert_return(() => invoke($157, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:565 -let $158 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000200000000001p+50)))`, -); - -// ./test/core/const.wast:566 -assert_return(() => invoke($158, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:567 -let $159 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000200000000001p+50)))`, -); - -// ./test/core/const.wast:568 -assert_return(() => invoke($159, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:569 -let $160 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000002fffffffffffp+50)))`, -); - -// ./test/core/const.wast:570 -assert_return(() => invoke($160, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:571 -let $161 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000002fffffffffffp+50)))`, -); - -// ./test/core/const.wast:572 -assert_return(() => invoke($161, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:573 -let $162 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000300000000000p+50)))`, -); - -// ./test/core/const.wast:574 -assert_return(() => invoke($162, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:575 -let $163 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000300000000000p+50)))`, -); - -// ./test/core/const.wast:576 -assert_return(() => invoke($163, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:577 -let $164 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000300000000001p+50)))`, -); - -// ./test/core/const.wast:578 -assert_return(() => invoke($164, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:579 -let $165 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000300000000001p+50)))`, -); - -// ./test/core/const.wast:580 -assert_return(() => invoke($165, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:581 -let $166 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000003fffffffffffp+50)))`, -); - -// ./test/core/const.wast:582 -assert_return(() => invoke($166, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:583 -let $167 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000003fffffffffffp+50)))`, -); - -// ./test/core/const.wast:584 -assert_return(() => invoke($167, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:585 -let $168 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000400000000000p+50)))`, -); - -// ./test/core/const.wast:586 -assert_return(() => invoke($168, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:587 -let $169 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000400000000000p+50)))`, -); - -// ./test/core/const.wast:588 -assert_return(() => invoke($169, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:589 -let $170 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000400000000001p+50)))`, -); - -// ./test/core/const.wast:590 -assert_return(() => invoke($170, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:591 -let $171 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000400000000001p+50)))`, -); - -// ./test/core/const.wast:592 -assert_return(() => invoke($171, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:593 -let $172 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.000004fffffffffffp+50)))`, -); - -// ./test/core/const.wast:594 -assert_return(() => invoke($172, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:595 -let $173 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.000004fffffffffffp+50)))`, -); - -// ./test/core/const.wast:596 -assert_return(() => invoke($173, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:597 -let $174 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000500000000000p+50)))`, -); - -// ./test/core/const.wast:598 -assert_return(() => invoke($174, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:599 -let $175 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000500000000000p+50)))`, -); - -// ./test/core/const.wast:600 -assert_return(() => invoke($175, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:601 -let $176 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.00000500000000001p+50)))`, -); - -// ./test/core/const.wast:602 -assert_return(() => invoke($176, `f`, []), [value("f32", 1125900300000000)]); - -// ./test/core/const.wast:603 -let $177 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.00000500000000001p+50)))`, -); - -// ./test/core/const.wast:604 -assert_return(() => invoke($177, `f`, []), [value("f32", -1125900300000000)]); - -// ./test/core/const.wast:606 -let $178 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000004000000)))`, -); - -// ./test/core/const.wast:607 -assert_return(() => invoke($178, `f`, []), [value("f32", 1125899900000000)]); - -// ./test/core/const.wast:608 -let $179 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000004000000)))`, -); - -// ./test/core/const.wast:609 -assert_return(() => invoke($179, `f`, []), [value("f32", -1125899900000000)]); - -// ./test/core/const.wast:610 -let $180 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000004000001)))`, -); - -// ./test/core/const.wast:611 -assert_return(() => invoke($180, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:612 -let $181 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000004000001)))`, -); - -// ./test/core/const.wast:613 -assert_return(() => invoke($181, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:614 -let $182 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000007ffffff)))`, -); - -// ./test/core/const.wast:615 -assert_return(() => invoke($182, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:616 -let $183 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000007ffffff)))`, -); - -// ./test/core/const.wast:617 -assert_return(() => invoke($183, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:618 -let $184 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000008000000)))`, -); - -// ./test/core/const.wast:619 -assert_return(() => invoke($184, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:620 -let $185 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000008000000)))`, -); - -// ./test/core/const.wast:621 -assert_return(() => invoke($185, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:622 -let $186 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x4000008000001)))`, -); - -// ./test/core/const.wast:623 -assert_return(() => invoke($186, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:624 -let $187 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x4000008000001)))`, -); - -// ./test/core/const.wast:625 -assert_return(() => invoke($187, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:626 -let $188 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x400000bffffff)))`, -); - -// ./test/core/const.wast:627 -assert_return(() => invoke($188, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:628 -let $189 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x400000bffffff)))`, -); - -// ./test/core/const.wast:629 -assert_return(() => invoke($189, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:630 -let $190 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x400000c000000)))`, -); - -// ./test/core/const.wast:631 -assert_return(() => invoke($190, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:632 -let $191 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x400000c000000)))`, -); - -// ./test/core/const.wast:633 -assert_return(() => invoke($191, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:635 -let $192 = instantiate( - `(module (func (export "f") (result f32) (f32.const +1125899973951488)))`, -); - -// ./test/core/const.wast:636 -assert_return(() => invoke($192, `f`, []), [value("f32", 1125899900000000)]); - -// ./test/core/const.wast:637 -let $193 = instantiate( - `(module (func (export "f") (result f32) (f32.const -1125899973951488)))`, -); - -// ./test/core/const.wast:638 -assert_return(() => invoke($193, `f`, []), [value("f32", -1125899900000000)]); - -// ./test/core/const.wast:639 -let $194 = instantiate( - `(module (func (export "f") (result f32) (f32.const +1125899973951489)))`, -); - -// ./test/core/const.wast:640 -assert_return(() => invoke($194, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:641 -let $195 = instantiate( - `(module (func (export "f") (result f32) (f32.const -1125899973951489)))`, -); - -// ./test/core/const.wast:642 -assert_return(() => invoke($195, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:643 -let $196 = instantiate( - `(module (func (export "f") (result f32) (f32.const +1125900108169215)))`, -); - -// ./test/core/const.wast:644 -assert_return(() => invoke($196, `f`, []), [value("f32", 1125900000000000)]); - -// ./test/core/const.wast:645 -let $197 = instantiate( - `(module (func (export "f") (result f32) (f32.const -1125900108169215)))`, -); - -// ./test/core/const.wast:646 -assert_return(() => invoke($197, `f`, []), [value("f32", -1125900000000000)]); - -// ./test/core/const.wast:647 -let $198 = instantiate( - `(module (func (export "f") (result f32) (f32.const +1125900108169216)))`, -); - -// ./test/core/const.wast:648 -assert_return(() => invoke($198, `f`, []), [value("f32", 1125900200000000)]); - -// ./test/core/const.wast:649 -let $199 = instantiate( - `(module (func (export "f") (result f32) (f32.const -1125900108169216)))`, -); - -// ./test/core/const.wast:650 -assert_return(() => invoke($199, `f`, []), [value("f32", -1125900200000000)]); - -// ./test/core/const.wast:653 -let $200 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000100000000000p-126)))`, -); - -// ./test/core/const.wast:654 -assert_return(() => invoke($200, `f`, []), [value("f32", 0)]); - -// ./test/core/const.wast:655 -let $201 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000100000000000p-126)))`, -); - -// ./test/core/const.wast:656 -assert_return(() => invoke($201, `f`, []), [value("f32", -0)]); - -// ./test/core/const.wast:657 -let $202 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000100000000001p-126)))`, -); - -// ./test/core/const.wast:658 -assert_return(() => invoke($202, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:659 -let $203 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000100000000001p-126)))`, -); - -// ./test/core/const.wast:660 -assert_return(() => invoke($203, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:661 -let $204 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.000001fffffffffffp-126)))`, -); - -// ./test/core/const.wast:662 -assert_return(() => invoke($204, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:663 -let $205 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.000001fffffffffffp-126)))`, -); - -// ./test/core/const.wast:664 -assert_return(() => invoke($205, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:665 -let $206 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000200000000000p-126)))`, -); - -// ./test/core/const.wast:666 -assert_return(() => invoke($206, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:667 -let $207 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000200000000000p-126)))`, -); - -// ./test/core/const.wast:668 -assert_return(() => invoke($207, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:669 -let $208 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000200000000001p-126)))`, -); - -// ./test/core/const.wast:670 -assert_return(() => invoke($208, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:671 -let $209 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000200000000001p-126)))`, -); - -// ./test/core/const.wast:672 -assert_return(() => invoke($209, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:673 -let $210 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.000002fffffffffffp-126)))`, -); - -// ./test/core/const.wast:674 -assert_return(() => invoke($210, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:675 -let $211 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.000002fffffffffffp-126)))`, -); - -// ./test/core/const.wast:676 -assert_return(() => invoke($211, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/const.wast:677 -let $212 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000300000000000p-126)))`, -); - -// ./test/core/const.wast:678 -assert_return(() => invoke($212, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:679 -let $213 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000300000000000p-126)))`, -); - -// ./test/core/const.wast:680 -assert_return(() => invoke($213, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:681 -let $214 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000300000000001p-126)))`, -); - -// ./test/core/const.wast:682 -assert_return(() => invoke($214, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:683 -let $215 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000300000000001p-126)))`, -); - -// ./test/core/const.wast:684 -assert_return(() => invoke($215, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:685 -let $216 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.000003fffffffffffp-126)))`, -); - -// ./test/core/const.wast:686 -assert_return(() => invoke($216, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:687 -let $217 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.000003fffffffffffp-126)))`, -); - -// ./test/core/const.wast:688 -assert_return(() => invoke($217, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:689 -let $218 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000400000000000p-126)))`, -); - -// ./test/core/const.wast:690 -assert_return(() => invoke($218, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:691 -let $219 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000400000000000p-126)))`, -); - -// ./test/core/const.wast:692 -assert_return(() => invoke($219, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:693 -let $220 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000400000000001p-126)))`, -); - -// ./test/core/const.wast:694 -assert_return(() => invoke($220, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:695 -let $221 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000400000000001p-126)))`, -); - -// ./test/core/const.wast:696 -assert_return(() => invoke($221, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:697 -let $222 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.000004fffffffffffp-126)))`, -); - -// ./test/core/const.wast:698 -assert_return(() => invoke($222, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:699 -let $223 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.000004fffffffffffp-126)))`, -); - -// ./test/core/const.wast:700 -assert_return(() => invoke($223, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:701 -let $224 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000500000000000p-126)))`, -); - -// ./test/core/const.wast:702 -assert_return(() => invoke($224, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:703 -let $225 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000500000000000p-126)))`, -); - -// ./test/core/const.wast:704 -assert_return(() => invoke($225, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000003), -]); - -// ./test/core/const.wast:705 -let $226 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x0.00000500000000001p-126)))`, -); - -// ./test/core/const.wast:706 -assert_return(() => invoke($226, `f`, []), [ - value("f32", 0.000000000000000000000000000000000000000000004), -]); - -// ./test/core/const.wast:707 -let $227 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x0.00000500000000001p-126)))`, -); - -// ./test/core/const.wast:708 -assert_return(() => invoke($227, `f`, []), [ - value("f32", -0.000000000000000000000000000000000000000000004), -]); - -// ./test/core/const.wast:711 -let $228 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.fffffe8p127)))`, -); - -// ./test/core/const.wast:712 -assert_return(() => invoke($228, `f`, []), [ - value("f32", 340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:713 -let $229 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.fffffe8p127)))`, -); - -// ./test/core/const.wast:714 -assert_return(() => invoke($229, `f`, []), [ - value("f32", -340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:715 -let $230 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffff8p127)))`, -); - -// ./test/core/const.wast:716 -assert_return(() => invoke($230, `f`, []), [ - value("f32", 340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:717 -let $231 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffff8p127)))`, -); - -// ./test/core/const.wast:718 -assert_return(() => invoke($231, `f`, []), [ - value("f32", -340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:719 -let $232 = instantiate( - `(module (func (export "f") (result f32) (f32.const +0x1.fffffefffffffffffp127)))`, -); - -// ./test/core/const.wast:720 -assert_return(() => invoke($232, `f`, []), [ - value("f32", 340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:721 -let $233 = instantiate( - `(module (func (export "f") (result f32) (f32.const -0x1.fffffefffffffffffp127)))`, -); - -// ./test/core/const.wast:722 -assert_return(() => invoke($233, `f`, []), [ - value("f32", -340282350000000000000000000000000000000), -]); - -// ./test/core/const.wast:725 -let $234 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p-600)))`, -); - -// ./test/core/const.wast:726 -assert_return(() => invoke($234, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884, - ), -]); - -// ./test/core/const.wast:727 -let $235 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p-600)))`, -); - -// ./test/core/const.wast:728 -assert_return(() => invoke($235, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884, - ), -]); - -// ./test/core/const.wast:729 -let $236 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p-600)))`, -); - -// ./test/core/const.wast:730 -assert_return(() => invoke($236, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:731 -let $237 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p-600)))`, -); - -// ./test/core/const.wast:732 -assert_return(() => invoke($237, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:733 -let $238 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp-600)))`, -); - -// ./test/core/const.wast:734 -assert_return(() => invoke($238, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:735 -let $239 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp-600)))`, -); - -// ./test/core/const.wast:736 -assert_return(() => invoke($239, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:737 -let $240 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p-600)))`, -); - -// ./test/core/const.wast:738 -assert_return(() => invoke($240, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:739 -let $241 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p-600)))`, -); - -// ./test/core/const.wast:740 -assert_return(() => invoke($241, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:741 -let $242 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p-600)))`, -); - -// ./test/core/const.wast:742 -assert_return(() => invoke($242, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:743 -let $243 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p-600)))`, -); - -// ./test/core/const.wast:744 -assert_return(() => invoke($243, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:745 -let $244 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp-600)))`, -); - -// ./test/core/const.wast:746 -assert_return(() => invoke($244, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:747 -let $245 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp-600)))`, -); - -// ./test/core/const.wast:748 -assert_return(() => invoke($245, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:749 -let $246 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p-600)))`, -); - -// ./test/core/const.wast:750 -assert_return(() => invoke($246, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:751 -let $247 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p-600)))`, -); - -// ./test/core/const.wast:752 -assert_return(() => invoke($247, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:753 -let $248 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p-600)))`, -); - -// ./test/core/const.wast:754 -assert_return(() => invoke($248, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:755 -let $249 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p-600)))`, -); - -// ./test/core/const.wast:756 -assert_return(() => invoke($249, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:757 -let $250 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp-600)))`, -); - -// ./test/core/const.wast:758 -assert_return(() => invoke($250, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:759 -let $251 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp-600)))`, -); - -// ./test/core/const.wast:760 -assert_return(() => invoke($251, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:761 -let $252 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p-600)))`, -); - -// ./test/core/const.wast:762 -assert_return(() => invoke($252, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:763 -let $253 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p-600)))`, -); - -// ./test/core/const.wast:764 -assert_return(() => invoke($253, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:765 -let $254 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p-600)))`, -); - -// ./test/core/const.wast:766 -assert_return(() => invoke($254, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:767 -let $255 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p-600)))`, -); - -// ./test/core/const.wast:768 -assert_return(() => invoke($255, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:769 -let $256 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp-600)))`, -); - -// ./test/core/const.wast:770 -assert_return(() => invoke($256, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:771 -let $257 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp-600)))`, -); - -// ./test/core/const.wast:772 -assert_return(() => invoke($257, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:773 -let $258 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-600)))`, -); - -// ./test/core/const.wast:774 -assert_return(() => invoke($258, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857, - ), -]); - -// ./test/core/const.wast:775 -let $259 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-600)))`, -); - -// ./test/core/const.wast:776 -assert_return(() => invoke($259, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857, - ), -]); - -// ./test/core/const.wast:778 -let $260 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000000p-627)))`, -); - -// ./test/core/const.wast:779 -assert_return(() => invoke($260, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884, - ), -]); - -// ./test/core/const.wast:780 -let $261 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000000p-627)))`, -); - -// ./test/core/const.wast:781 -assert_return(() => invoke($261, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102884, - ), -]); - -// ./test/core/const.wast:782 -let $262 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000400000000001p-627)))`, -); - -// ./test/core/const.wast:783 -assert_return(() => invoke($262, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:784 -let $263 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000400000000001p-627)))`, -); - -// ./test/core/const.wast:785 -assert_return(() => invoke($263, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:786 -let $264 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.0000007fffffffffffp-627)))`, -); - -// ./test/core/const.wast:787 -assert_return(() => invoke($264, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:788 -let $265 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.0000007fffffffffffp-627)))`, -); - -// ./test/core/const.wast:789 -assert_return(() => invoke($265, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:790 -let $266 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000000p-627)))`, -); - -// ./test/core/const.wast:791 -assert_return(() => invoke($266, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:792 -let $267 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000000p-627)))`, -); - -// ./test/core/const.wast:793 -assert_return(() => invoke($267, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:794 -let $268 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000800000000001p-627)))`, -); - -// ./test/core/const.wast:795 -assert_return(() => invoke($268, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:796 -let $269 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000800000000001p-627)))`, -); - -// ./test/core/const.wast:797 -assert_return(() => invoke($269, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:798 -let $270 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000bfffffffffffp-627)))`, -); - -// ./test/core/const.wast:799 -assert_return(() => invoke($270, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:800 -let $271 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000bfffffffffffp-627)))`, -); - -// ./test/core/const.wast:801 -assert_return(() => invoke($271, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028847, - ), -]); - -// ./test/core/const.wast:802 -let $272 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000000p-627)))`, -); - -// ./test/core/const.wast:803 -assert_return(() => invoke($272, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:804 -let $273 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000000p-627)))`, -); - -// ./test/core/const.wast:805 -assert_return(() => invoke($273, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:806 -let $274 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000c00000000001p-627)))`, -); - -// ./test/core/const.wast:807 -assert_return(() => invoke($274, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:808 -let $275 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000c00000000001p-627)))`, -); - -// ./test/core/const.wast:809 -assert_return(() => invoke($275, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:810 -let $276 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000000ffffffffffffp-627)))`, -); - -// ./test/core/const.wast:811 -assert_return(() => invoke($276, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:812 -let $277 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000000ffffffffffffp-627)))`, -); - -// ./test/core/const.wast:813 -assert_return(() => invoke($277, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:814 -let $278 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000000p-627)))`, -); - -// ./test/core/const.wast:815 -assert_return(() => invoke($278, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:816 -let $279 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000000p-627)))`, -); - -// ./test/core/const.wast:817 -assert_return(() => invoke($279, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:818 -let $280 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000001000000000001p-627)))`, -); - -// ./test/core/const.wast:819 -assert_return(() => invoke($280, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:820 -let $281 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000001000000000001p-627)))`, -); - -// ./test/core/const.wast:821 -assert_return(() => invoke($281, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:822 -let $282 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.0000013fffffffffffp-627)))`, -); - -// ./test/core/const.wast:823 -assert_return(() => invoke($282, `f`, []), [ - value( - "f64", - 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:824 -let $283 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.0000013fffffffffffp-627)))`, -); - -// ./test/core/const.wast:825 -assert_return(() => invoke($283, `f`, []), [ - value( - "f64", - -0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002409919865102885, - ), -]); - -// ./test/core/const.wast:826 -let $284 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x8000000.000001400000000001p-627)))`, -); - -// ./test/core/const.wast:827 -assert_return(() => invoke($284, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857, - ), -]); - -// ./test/core/const.wast:828 -let $285 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x8000000.000001400000000001p-627)))`, -); - -// ./test/core/const.wast:829 -assert_return(() => invoke($285, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024099198651028857, - ), -]); - -// ./test/core/const.wast:831 -let $286 = instantiate( - `(module (func (export "f") (result f64) (f64.const +5.3575430359313371995e+300)))`, -); - -// ./test/core/const.wast:832 -assert_return(() => invoke($286, `f`, []), [ - value( - "f64", - 5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:833 -let $287 = instantiate( - `(module (func (export "f") (result f64) (f64.const -5.3575430359313371995e+300)))`, -); - -// ./test/core/const.wast:834 -assert_return(() => invoke($287, `f`, []), [ - value( - "f64", - -5357543035931337000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:835 -let $288 = instantiate( - `(module (func (export "f") (result f64) (f64.const +5.3575430359313371996e+300)))`, -); - -// ./test/core/const.wast:836 -assert_return(() => invoke($288, `f`, []), [ - value( - "f64", - 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:837 -let $289 = instantiate( - `(module (func (export "f") (result f64) (f64.const -5.3575430359313371996e+300)))`, -); - -// ./test/core/const.wast:838 -assert_return(() => invoke($289, `f`, []), [ - value( - "f64", - -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:839 -let $290 = instantiate( - `(module (func (export "f") (result f64) (f64.const +5.3575430359313383891e+300)))`, -); - -// ./test/core/const.wast:840 -assert_return(() => invoke($290, `f`, []), [ - value( - "f64", - 5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:841 -let $291 = instantiate( - `(module (func (export "f") (result f64) (f64.const -5.3575430359313383891e+300)))`, -); - -// ./test/core/const.wast:842 -assert_return(() => invoke($291, `f`, []), [ - value( - "f64", - -5357543035931338000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:843 -let $292 = instantiate( - `(module (func (export "f") (result f64) (f64.const +5.3575430359313383892e+300)))`, -); - -// ./test/core/const.wast:844 -assert_return(() => invoke($292, `f`, []), [ - value( - "f64", - 5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:845 -let $293 = instantiate( - `(module (func (export "f") (result f64) (f64.const -5.3575430359313383892e+300)))`, -); - -// ./test/core/const.wast:846 -assert_return(() => invoke($293, `f`, []), [ - value( - "f64", - -5357543035931339000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:849 -let $294 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000000p+600)))`, -); - -// ./test/core/const.wast:850 -assert_return(() => invoke($294, `f`, []), [ - value( - "f64", - 4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:851 -let $295 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000000p+600)))`, -); - -// ./test/core/const.wast:852 -assert_return(() => invoke($295, `f`, []), [ - value( - "f64", - -4149515568880993000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:853 -let $296 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000080000000001p+600)))`, -); - -// ./test/core/const.wast:854 -assert_return(() => invoke($296, `f`, []), [ - value( - "f64", - 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:855 -let $297 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000080000000001p+600)))`, -); - -// ./test/core/const.wast:856 -assert_return(() => invoke($297, `f`, []), [ - value( - "f64", - -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:857 -let $298 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.0000000000000fffffffffffp+600)))`, -); - -// ./test/core/const.wast:858 -assert_return(() => invoke($298, `f`, []), [ - value( - "f64", - 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:859 -let $299 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.0000000000000fffffffffffp+600)))`, -); - -// ./test/core/const.wast:860 -assert_return(() => invoke($299, `f`, []), [ - value( - "f64", - -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:861 -let $300 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000000p+600)))`, -); - -// ./test/core/const.wast:862 -assert_return(() => invoke($300, `f`, []), [ - value( - "f64", - 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:863 -let $301 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000000p+600)))`, -); - -// ./test/core/const.wast:864 -assert_return(() => invoke($301, `f`, []), [ - value( - "f64", - -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:865 -let $302 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000100000000001p+600)))`, -); - -// ./test/core/const.wast:866 -assert_return(() => invoke($302, `f`, []), [ - value( - "f64", - 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:867 -let $303 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000100000000001p+600)))`, -); - -// ./test/core/const.wast:868 -assert_return(() => invoke($303, `f`, []), [ - value( - "f64", - -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:869 -let $304 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.00000000000017ffffffffffp+600)))`, -); - -// ./test/core/const.wast:870 -assert_return(() => invoke($304, `f`, []), [ - value( - "f64", - 4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:871 -let $305 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.00000000000017ffffffffffp+600)))`, -); - -// ./test/core/const.wast:872 -assert_return(() => invoke($305, `f`, []), [ - value( - "f64", - -4149515568880994000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:873 -let $306 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000000p+600)))`, -); - -// ./test/core/const.wast:874 -assert_return(() => invoke($306, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:875 -let $307 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000000p+600)))`, -); - -// ./test/core/const.wast:876 -assert_return(() => invoke($307, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:877 -let $308 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000180000000001p+600)))`, -); - -// ./test/core/const.wast:878 -assert_return(() => invoke($308, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:879 -let $309 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000180000000001p+600)))`, -); - -// ./test/core/const.wast:880 -assert_return(() => invoke($309, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:881 -let $310 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.0000000000001fffffffffffp+600)))`, -); - -// ./test/core/const.wast:882 -assert_return(() => invoke($310, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:883 -let $311 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.0000000000001fffffffffffp+600)))`, -); - -// ./test/core/const.wast:884 -assert_return(() => invoke($311, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:885 -let $312 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000000p+600)))`, -); - -// ./test/core/const.wast:886 -assert_return(() => invoke($312, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:887 -let $313 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000000p+600)))`, -); - -// ./test/core/const.wast:888 -assert_return(() => invoke($313, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:889 -let $314 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000200000000001p+600)))`, -); - -// ./test/core/const.wast:890 -assert_return(() => invoke($314, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:891 -let $315 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000200000000001p+600)))`, -); - -// ./test/core/const.wast:892 -assert_return(() => invoke($315, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:893 -let $316 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.00000000000027ffffffffffp+600)))`, -); - -// ./test/core/const.wast:894 -assert_return(() => invoke($316, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:895 -let $317 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.00000000000027ffffffffffp+600)))`, -); - -// ./test/core/const.wast:896 -assert_return(() => invoke($317, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:897 -let $318 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000000p+600)))`, -); - -// ./test/core/const.wast:898 -assert_return(() => invoke($318, `f`, []), [ - value( - "f64", - 4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:899 -let $319 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000000p+600)))`, -); - -// ./test/core/const.wast:900 -assert_return(() => invoke($319, `f`, []), [ - value( - "f64", - -4149515568880995000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:901 -let $320 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p+600)))`, -); - -// ./test/core/const.wast:902 -assert_return(() => invoke($320, `f`, []), [ - value( - "f64", - 4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:903 -let $321 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p+600)))`, -); - -// ./test/core/const.wast:904 -assert_return(() => invoke($321, `f`, []), [ - value( - "f64", - -4149515568880996000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:906 -let $322 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000000)))`, -); - -// ./test/core/const.wast:907 -assert_return(() => invoke($322, `f`, []), [ - value("f64", 158456325028528680000000000000), -]); - -// ./test/core/const.wast:908 -let $323 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000000)))`, -); - -// ./test/core/const.wast:909 -assert_return(() => invoke($323, `f`, []), [ - value("f64", -158456325028528680000000000000), -]); - -// ./test/core/const.wast:910 -let $324 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000100000000001)))`, -); - -// ./test/core/const.wast:911 -assert_return(() => invoke($324, `f`, []), [ - value("f64", 158456325028528700000000000000), -]); - -// ./test/core/const.wast:912 -let $325 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000100000000001)))`, -); - -// ./test/core/const.wast:913 -assert_return(() => invoke($325, `f`, []), [ - value("f64", -158456325028528700000000000000), -]); - -// ./test/core/const.wast:914 -let $326 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x20000000000001fffffffffff)))`, -); - -// ./test/core/const.wast:915 -assert_return(() => invoke($326, `f`, []), [ - value("f64", 158456325028528700000000000000), -]); - -// ./test/core/const.wast:916 -let $327 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x20000000000001fffffffffff)))`, -); - -// ./test/core/const.wast:917 -assert_return(() => invoke($327, `f`, []), [ - value("f64", -158456325028528700000000000000), -]); - -// ./test/core/const.wast:918 -let $328 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000000)))`, -); - -// ./test/core/const.wast:919 -assert_return(() => invoke($328, `f`, []), [ - value("f64", 158456325028528700000000000000), -]); - -// ./test/core/const.wast:920 -let $329 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000000)))`, -); - -// ./test/core/const.wast:921 -assert_return(() => invoke($329, `f`, []), [ - value("f64", -158456325028528700000000000000), -]); - -// ./test/core/const.wast:922 -let $330 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000200000000001)))`, -); - -// ./test/core/const.wast:923 -assert_return(() => invoke($330, `f`, []), [ - value("f64", 158456325028528700000000000000), -]); - -// ./test/core/const.wast:924 -let $331 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000200000000001)))`, -); - -// ./test/core/const.wast:925 -assert_return(() => invoke($331, `f`, []), [ - value("f64", -158456325028528700000000000000), -]); - -// ./test/core/const.wast:926 -let $332 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x20000000000002fffffffffff)))`, -); - -// ./test/core/const.wast:927 -assert_return(() => invoke($332, `f`, []), [ - value("f64", 158456325028528700000000000000), -]); - -// ./test/core/const.wast:928 -let $333 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x20000000000002fffffffffff)))`, -); - -// ./test/core/const.wast:929 -assert_return(() => invoke($333, `f`, []), [ - value("f64", -158456325028528700000000000000), -]); - -// ./test/core/const.wast:930 -let $334 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000000)))`, -); - -// ./test/core/const.wast:931 -assert_return(() => invoke($334, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:932 -let $335 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000000)))`, -); - -// ./test/core/const.wast:933 -assert_return(() => invoke($335, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:934 -let $336 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000300000000001)))`, -); - -// ./test/core/const.wast:935 -assert_return(() => invoke($336, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:936 -let $337 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000300000000001)))`, -); - -// ./test/core/const.wast:937 -assert_return(() => invoke($337, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:938 -let $338 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x20000000000003fffffffffff)))`, -); - -// ./test/core/const.wast:939 -assert_return(() => invoke($338, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:940 -let $339 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x20000000000003fffffffffff)))`, -); - -// ./test/core/const.wast:941 -assert_return(() => invoke($339, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:942 -let $340 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000000)))`, -); - -// ./test/core/const.wast:943 -assert_return(() => invoke($340, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:944 -let $341 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000000)))`, -); - -// ./test/core/const.wast:945 -assert_return(() => invoke($341, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:946 -let $342 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000400000000001)))`, -); - -// ./test/core/const.wast:947 -assert_return(() => invoke($342, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:948 -let $343 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000400000000001)))`, -); - -// ./test/core/const.wast:949 -assert_return(() => invoke($343, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:950 -let $344 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x20000000000004fffffffffff)))`, -); - -// ./test/core/const.wast:951 -assert_return(() => invoke($344, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:952 -let $345 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x20000000000004fffffffffff)))`, -); - -// ./test/core/const.wast:953 -assert_return(() => invoke($345, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:954 -let $346 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000000)))`, -); - -// ./test/core/const.wast:955 -assert_return(() => invoke($346, `f`, []), [ - value("f64", 158456325028528750000000000000), -]); - -// ./test/core/const.wast:956 -let $347 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000000)))`, -); - -// ./test/core/const.wast:957 -assert_return(() => invoke($347, `f`, []), [ - value("f64", -158456325028528750000000000000), -]); - -// ./test/core/const.wast:958 -let $348 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x2000000000000500000000001)))`, -); - -// ./test/core/const.wast:959 -assert_return(() => invoke($348, `f`, []), [ - value("f64", 158456325028528780000000000000), -]); - -// ./test/core/const.wast:960 -let $349 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x2000000000000500000000001)))`, -); - -// ./test/core/const.wast:961 -assert_return(() => invoke($349, `f`, []), [ - value("f64", -158456325028528780000000000000), -]); - -// ./test/core/const.wast:963 -let $350 = instantiate( - `(module (func (export "f") (result f64) (f64.const +1152921504606847104)))`, -); - -// ./test/core/const.wast:964 -assert_return(() => invoke($350, `f`, []), [value("f64", 1152921504606847000)]); - -// ./test/core/const.wast:965 -let $351 = instantiate( - `(module (func (export "f") (result f64) (f64.const -1152921504606847104)))`, -); - -// ./test/core/const.wast:966 -assert_return(() => invoke($351, `f`, []), [ - value("f64", -1152921504606847000), -]); - -// ./test/core/const.wast:967 -let $352 = instantiate( - `(module (func (export "f") (result f64) (f64.const +1152921504606847105)))`, -); - -// ./test/core/const.wast:968 -assert_return(() => invoke($352, `f`, []), [value("f64", 1152921504606847200)]); - -// ./test/core/const.wast:969 -let $353 = instantiate( - `(module (func (export "f") (result f64) (f64.const -1152921504606847105)))`, -); - -// ./test/core/const.wast:970 -assert_return(() => invoke($353, `f`, []), [ - value("f64", -1152921504606847200), -]); - -// ./test/core/const.wast:971 -let $354 = instantiate( - `(module (func (export "f") (result f64) (f64.const +1152921504606847359)))`, -); - -// ./test/core/const.wast:972 -assert_return(() => invoke($354, `f`, []), [value("f64", 1152921504606847200)]); - -// ./test/core/const.wast:973 -let $355 = instantiate( - `(module (func (export "f") (result f64) (f64.const -1152921504606847359)))`, -); - -// ./test/core/const.wast:974 -assert_return(() => invoke($355, `f`, []), [ - value("f64", -1152921504606847200), -]); - -// ./test/core/const.wast:975 -let $356 = instantiate( - `(module (func (export "f") (result f64) (f64.const +1152921504606847360)))`, -); - -// ./test/core/const.wast:976 -assert_return(() => invoke($356, `f`, []), [value("f64", 1152921504606847500)]); - -// ./test/core/const.wast:977 -let $357 = instantiate( - `(module (func (export "f") (result f64) (f64.const -1152921504606847360)))`, -); - -// ./test/core/const.wast:978 -assert_return(() => invoke($357, `f`, []), [ - value("f64", -1152921504606847500), -]); - -// ./test/core/const.wast:981 -let $358 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000000p-1022)))`, -); - -// ./test/core/const.wast:982 -assert_return(() => invoke($358, `f`, []), [value("f64", 0)]); - -// ./test/core/const.wast:983 -let $359 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000000p-1022)))`, -); - -// ./test/core/const.wast:984 -assert_return(() => invoke($359, `f`, []), [value("f64", -0)]); - -// ./test/core/const.wast:985 -let $360 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000080000000001p-1022)))`, -); - -// ./test/core/const.wast:986 -assert_return(() => invoke($360, `f`, []), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:987 -let $361 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000080000000001p-1022)))`, -); - -// ./test/core/const.wast:988 -assert_return(() => invoke($361, `f`, []), [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:989 -let $362 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.0000000000000fffffffffffp-1022)))`, -); - -// ./test/core/const.wast:990 -assert_return(() => invoke($362, `f`, []), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:991 -let $363 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.0000000000000fffffffffffp-1022)))`, -); - -// ./test/core/const.wast:992 -assert_return(() => invoke($363, `f`, []), [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:993 -let $364 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000000p-1022)))`, -); - -// ./test/core/const.wast:994 -assert_return(() => invoke($364, `f`, []), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:995 -let $365 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000000p-1022)))`, -); - -// ./test/core/const.wast:996 -assert_return(() => invoke($365, `f`, []), [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:997 -let $366 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000100000000001p-1022)))`, -); - -// ./test/core/const.wast:998 -assert_return(() => invoke($366, `f`, []), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:999 -let $367 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000100000000001p-1022)))`, -); - -// ./test/core/const.wast:1000 -assert_return(() => invoke($367, `f`, []), [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:1001 -let $368 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.00000000000017ffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1002 -assert_return(() => invoke($368, `f`, []), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:1003 -let $369 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.00000000000017ffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1004 -assert_return(() => invoke($369, `f`, []), [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/const.wast:1005 -let $370 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000000p-1022)))`, -); - -// ./test/core/const.wast:1006 -assert_return(() => invoke($370, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1007 -let $371 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000000p-1022)))`, -); - -// ./test/core/const.wast:1008 -assert_return(() => invoke($371, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1009 -let $372 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000180000000001p-1022)))`, -); - -// ./test/core/const.wast:1010 -assert_return(() => invoke($372, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1011 -let $373 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000180000000001p-1022)))`, -); - -// ./test/core/const.wast:1012 -assert_return(() => invoke($373, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1013 -let $374 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.0000000000001fffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1014 -assert_return(() => invoke($374, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1015 -let $375 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.0000000000001fffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1016 -assert_return(() => invoke($375, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1017 -let $376 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000000p-1022)))`, -); - -// ./test/core/const.wast:1018 -assert_return(() => invoke($376, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1019 -let $377 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000000p-1022)))`, -); - -// ./test/core/const.wast:1020 -assert_return(() => invoke($377, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1021 -let $378 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000200000000001p-1022)))`, -); - -// ./test/core/const.wast:1022 -assert_return(() => invoke($378, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1023 -let $379 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000200000000001p-1022)))`, -); - -// ./test/core/const.wast:1024 -assert_return(() => invoke($379, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1025 -let $380 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.00000000000027ffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1026 -assert_return(() => invoke($380, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1027 -let $381 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.00000000000027ffffffffffp-1022)))`, -); - -// ./test/core/const.wast:1028 -assert_return(() => invoke($381, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1029 -let $382 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x0.000000000000280000000000p-1022)))`, -); - -// ./test/core/const.wast:1030 -assert_return(() => invoke($382, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1031 -let $383 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x0.000000000000280000000000p-1022)))`, -); - -// ./test/core/const.wast:1032 -assert_return(() => invoke($383, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001, - ), -]); - -// ./test/core/const.wast:1033 -let $384 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.000000000000280000000001p-1022)))`, -); - -// ./test/core/const.wast:1034 -assert_return(() => invoke($384, `f`, []), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203, - ), -]); - -// ./test/core/const.wast:1035 -let $385 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.000000000000280000000001p-1022)))`, -); - -// ./test/core/const.wast:1036 -assert_return(() => invoke($385, `f`, []), [ - value( - "f64", - -0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002225073858507203, - ), -]); - -// ./test/core/const.wast:1039 -let $386 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff4p1023)))`, -); - -// ./test/core/const.wast:1040 -assert_return(() => invoke($386, `f`, []), [ - value( - "f64", - 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:1041 -let $387 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff4p1023)))`, -); - -// ./test/core/const.wast:1042 -assert_return(() => invoke($387, `f`, []), [ - value( - "f64", - -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:1043 -let $388 = instantiate( - `(module (func (export "f") (result f64) (f64.const +0x1.fffffffffffff7ffffffp1023)))`, -); - -// ./test/core/const.wast:1044 -assert_return(() => invoke($388, `f`, []), [ - value( - "f64", - 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); - -// ./test/core/const.wast:1045 -let $389 = instantiate( - `(module (func (export "f") (result f64) (f64.const -0x1.fffffffffffff7ffffffp1023)))`, -); - -// ./test/core/const.wast:1046 -assert_return(() => invoke($389, `f`, []), [ - value( - "f64", - -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), -]); diff --git a/js/src/jit-test/tests/wasm/spec/threads/conversions.wast.js b/js/src/jit-test/tests/wasm/spec/threads/conversions.wast.js deleted file mode 100644 index dca22a5c50c7..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/conversions.wast.js +++ /dev/null @@ -1,2762 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/conversions.wast - -// ./test/core/conversions.wast:1 -let $0 = instantiate(`(module - (func (export "i64.extend_i32_s") (param $$x i32) (result i64) (i64.extend_i32_s (local.get $$x))) - (func (export "i64.extend_i32_u") (param $$x i32) (result i64) (i64.extend_i32_u (local.get $$x))) - (func (export "i32.wrap_i64") (param $$x i64) (result i32) (i32.wrap_i64 (local.get $$x))) - (func (export "i32.trunc_f32_s") (param $$x f32) (result i32) (i32.trunc_f32_s (local.get $$x))) - (func (export "i32.trunc_f32_u") (param $$x f32) (result i32) (i32.trunc_f32_u (local.get $$x))) - (func (export "i32.trunc_f64_s") (param $$x f64) (result i32) (i32.trunc_f64_s (local.get $$x))) - (func (export "i32.trunc_f64_u") (param $$x f64) (result i32) (i32.trunc_f64_u (local.get $$x))) - (func (export "i64.trunc_f32_s") (param $$x f32) (result i64) (i64.trunc_f32_s (local.get $$x))) - (func (export "i64.trunc_f32_u") (param $$x f32) (result i64) (i64.trunc_f32_u (local.get $$x))) - (func (export "i64.trunc_f64_s") (param $$x f64) (result i64) (i64.trunc_f64_s (local.get $$x))) - (func (export "i64.trunc_f64_u") (param $$x f64) (result i64) (i64.trunc_f64_u (local.get $$x))) - (func (export "f32.convert_i32_s") (param $$x i32) (result f32) (f32.convert_i32_s (local.get $$x))) - (func (export "f32.convert_i64_s") (param $$x i64) (result f32) (f32.convert_i64_s (local.get $$x))) - (func (export "f64.convert_i32_s") (param $$x i32) (result f64) (f64.convert_i32_s (local.get $$x))) - (func (export "f64.convert_i64_s") (param $$x i64) (result f64) (f64.convert_i64_s (local.get $$x))) - (func (export "f32.convert_i32_u") (param $$x i32) (result f32) (f32.convert_i32_u (local.get $$x))) - (func (export "f32.convert_i64_u") (param $$x i64) (result f32) (f32.convert_i64_u (local.get $$x))) - (func (export "f64.convert_i32_u") (param $$x i32) (result f64) (f64.convert_i32_u (local.get $$x))) - (func (export "f64.convert_i64_u") (param $$x i64) (result f64) (f64.convert_i64_u (local.get $$x))) - (func (export "f64.promote_f32") (param $$x f32) (result f64) (f64.promote_f32 (local.get $$x))) - (func (export "f32.demote_f64") (param $$x f64) (result f32) (f32.demote_f64 (local.get $$x))) - (func (export "f32.reinterpret_i32") (param $$x i32) (result f32) (f32.reinterpret_i32 (local.get $$x))) - (func (export "f64.reinterpret_i64") (param $$x i64) (result f64) (f64.reinterpret_i64 (local.get $$x))) - (func (export "i32.reinterpret_f32") (param $$x f32) (result i32) (i32.reinterpret_f32 (local.get $$x))) - (func (export "i64.reinterpret_f64") (param $$x f64) (result i64) (i64.reinterpret_f64 (local.get $$x))) -)`); - -// ./test/core/conversions.wast:29 -assert_return(() => invoke($0, `i64.extend_i32_s`, [0]), [value("i64", 0n)]); - -// ./test/core/conversions.wast:30 -assert_return(() => invoke($0, `i64.extend_i32_s`, [10000]), [ - value("i64", 10000n), -]); - -// ./test/core/conversions.wast:31 -assert_return(() => invoke($0, `i64.extend_i32_s`, [-10000]), [ - value("i64", -10000n), -]); - -// ./test/core/conversions.wast:32 -assert_return(() => invoke($0, `i64.extend_i32_s`, [-1]), [value("i64", -1n)]); - -// ./test/core/conversions.wast:33 -assert_return(() => invoke($0, `i64.extend_i32_s`, [2147483647]), [ - value("i64", 2147483647n), -]); - -// ./test/core/conversions.wast:34 -assert_return(() => invoke($0, `i64.extend_i32_s`, [-2147483648]), [ - value("i64", -2147483648n), -]); - -// ./test/core/conversions.wast:36 -assert_return(() => invoke($0, `i64.extend_i32_u`, [0]), [value("i64", 0n)]); - -// ./test/core/conversions.wast:37 -assert_return(() => invoke($0, `i64.extend_i32_u`, [10000]), [ - value("i64", 10000n), -]); - -// ./test/core/conversions.wast:38 -assert_return(() => invoke($0, `i64.extend_i32_u`, [-10000]), [ - value("i64", 4294957296n), -]); - -// ./test/core/conversions.wast:39 -assert_return(() => invoke($0, `i64.extend_i32_u`, [-1]), [ - value("i64", 4294967295n), -]); - -// ./test/core/conversions.wast:40 -assert_return(() => invoke($0, `i64.extend_i32_u`, [2147483647]), [ - value("i64", 2147483647n), -]); - -// ./test/core/conversions.wast:41 -assert_return(() => invoke($0, `i64.extend_i32_u`, [-2147483648]), [ - value("i64", 2147483648n), -]); - -// ./test/core/conversions.wast:43 -assert_return(() => invoke($0, `i32.wrap_i64`, [-1n]), [value("i32", -1)]); - -// ./test/core/conversions.wast:44 -assert_return(() => invoke($0, `i32.wrap_i64`, [-100000n]), [ - value("i32", -100000), -]); - -// ./test/core/conversions.wast:45 -assert_return(() => invoke($0, `i32.wrap_i64`, [2147483648n]), [ - value("i32", -2147483648), -]); - -// ./test/core/conversions.wast:46 -assert_return(() => invoke($0, `i32.wrap_i64`, [-2147483649n]), [ - value("i32", 2147483647), -]); - -// ./test/core/conversions.wast:47 -assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967296n]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:48 -assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967297n]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:49 -assert_return(() => invoke($0, `i32.wrap_i64`, [-4294967295n]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:50 -assert_return(() => invoke($0, `i32.wrap_i64`, [0n]), [value("i32", 0)]); - -// ./test/core/conversions.wast:51 -assert_return(() => invoke($0, `i32.wrap_i64`, [1311768467463790320n]), [ - value("i32", -1698898192), -]); - -// ./test/core/conversions.wast:52 -assert_return(() => invoke($0, `i32.wrap_i64`, [4294967295n]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:53 -assert_return(() => invoke($0, `i32.wrap_i64`, [4294967296n]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:54 -assert_return(() => invoke($0, `i32.wrap_i64`, [4294967297n]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:56 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:57 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:58 -assert_return( - () => - invoke($0, `i32.trunc_f32_s`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:59 -assert_return( - () => - invoke($0, `i32.trunc_f32_s`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:60 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:61 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1.1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:62 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 1.5)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:63 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:64 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.1)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:65 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.5)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:66 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -1.9)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:67 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", -2)]), [ - value("i32", -2), -]); - -// ./test/core/conversions.wast:68 -assert_return(() => invoke($0, `i32.trunc_f32_s`, [value("f32", 2147483500)]), [ - value("i32", 2147483520), -]); - -// ./test/core/conversions.wast:69 -assert_return( - () => invoke($0, `i32.trunc_f32_s`, [value("f32", -2147483600)]), - [value("i32", -2147483648)], -); - -// ./test/core/conversions.wast:70 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [value("f32", 2147483600)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:71 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [value("f32", -2147484000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:72 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [value("f32", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:73 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [value("f32", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:74 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:75 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:76 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:77 -assert_trap( - () => invoke($0, `i32.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:79 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:80 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:81 -assert_return( - () => - invoke($0, `i32.trunc_f32_u`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:82 -assert_return( - () => - invoke($0, `i32.trunc_f32_u`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:83 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:84 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:85 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.5)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:86 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 1.9)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:87 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 2)]), [ - value("i32", 2), -]); - -// ./test/core/conversions.wast:88 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 2147483600)]), [ - value("i32", -2147483648), -]); - -// ./test/core/conversions.wast:89 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", 4294967000)]), [ - value("i32", -256), -]); - -// ./test/core/conversions.wast:90 -assert_return(() => invoke($0, `i32.trunc_f32_u`, [value("f32", -0.9)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:91 -assert_return( - () => invoke($0, `i32.trunc_f32_u`, [value("f32", -0.99999994)]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:92 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [value("f32", 4294967300)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:93 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [value("f32", -1)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:94 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [value("f32", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:95 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [value("f32", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:96 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:97 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:98 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:99 -assert_trap( - () => invoke($0, `i32.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:101 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:102 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:103 -assert_return( - () => - invoke($0, `i32.trunc_f64_s`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:104 -assert_return( - () => - invoke($0, `i32.trunc_f64_s`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:105 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:106 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1.1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:107 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 1.5)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:108 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:109 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.1)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:110 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.5)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:111 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -1.9)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:112 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", -2)]), [ - value("i32", -2), -]); - -// ./test/core/conversions.wast:113 -assert_return(() => invoke($0, `i32.trunc_f64_s`, [value("f64", 2147483647)]), [ - value("i32", 2147483647), -]); - -// ./test/core/conversions.wast:114 -assert_return( - () => invoke($0, `i32.trunc_f64_s`, [value("f64", -2147483648)]), - [value("i32", -2147483648)], -); - -// ./test/core/conversions.wast:115 -assert_trap( - () => invoke($0, `i32.trunc_f64_s`, [value("f64", 2147483648)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:116 -assert_trap( - () => invoke($0, `i32.trunc_f64_s`, [value("f64", -2147483649)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:117 -assert_trap( - () => invoke($0, `i32.trunc_f64_s`, [value("f64", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:118 -assert_trap( - () => invoke($0, `i32.trunc_f64_s`, [value("f64", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:119 -assert_trap( - () => - invoke($0, `i32.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:120 -assert_trap( - () => - invoke($0, `i32.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:121 -assert_trap( - () => - invoke($0, `i32.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:122 -assert_trap( - () => - invoke($0, `i32.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:124 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:125 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:126 -assert_return( - () => - invoke($0, `i32.trunc_f64_u`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:127 -assert_return( - () => - invoke($0, `i32.trunc_f64_u`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:128 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:129 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.1)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:130 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.5)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:131 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 1.9)]), [ - value("i32", 1), -]); - -// ./test/core/conversions.wast:132 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 2)]), [ - value("i32", 2), -]); - -// ./test/core/conversions.wast:133 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 2147483648)]), [ - value("i32", -2147483648), -]); - -// ./test/core/conversions.wast:134 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 4294967295)]), [ - value("i32", -1), -]); - -// ./test/core/conversions.wast:135 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", -0.9)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:136 -assert_return( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", -0.9999999999999999)]), - [value("i32", 0)], -); - -// ./test/core/conversions.wast:137 -assert_return(() => invoke($0, `i32.trunc_f64_u`, [value("f64", 100000000)]), [ - value("i32", 100000000), -]); - -// ./test/core/conversions.wast:138 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", 4294967296)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:139 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", -1)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:140 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", 10000000000000000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:141 -assert_trap( - () => - invoke($0, `i32.trunc_f64_u`, [ - value("f64", 1000000000000000000000000000000), - ]), - `integer overflow`, -); - -// ./test/core/conversions.wast:142 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", 9223372036854776000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:143 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:144 -assert_trap( - () => invoke($0, `i32.trunc_f64_u`, [value("f64", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:145 -assert_trap( - () => - invoke($0, `i32.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:146 -assert_trap( - () => - invoke($0, `i32.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:147 -assert_trap( - () => - invoke($0, `i32.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:148 -assert_trap( - () => - invoke($0, `i32.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:150 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:151 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:152 -assert_return( - () => - invoke($0, `i64.trunc_f32_s`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:153 -assert_return( - () => - invoke($0, `i64.trunc_f32_s`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:154 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:155 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1.1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:156 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 1.5)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:157 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:158 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.1)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:159 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.5)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:160 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -1.9)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:161 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", -2)]), [ - value("i64", -2n), -]); - -// ./test/core/conversions.wast:162 -assert_return(() => invoke($0, `i64.trunc_f32_s`, [value("f32", 4294967300)]), [ - value("i64", 4294967296n), -]); - -// ./test/core/conversions.wast:163 -assert_return( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", -4294967300)]), - [value("i64", -4294967296n)], -); - -// ./test/core/conversions.wast:164 -assert_return( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", 9223371500000000000)]), - [value("i64", 9223371487098961920n)], -); - -// ./test/core/conversions.wast:165 -assert_return( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", -9223372000000000000)]), - [value("i64", -9223372036854775808n)], -); - -// ./test/core/conversions.wast:166 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", 9223372000000000000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:167 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", -9223373000000000000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:168 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:169 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [value("f32", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:170 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:171 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:172 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:173 -assert_trap( - () => invoke($0, `i64.trunc_f32_s`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:175 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:176 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:177 -assert_return( - () => - invoke($0, `i64.trunc_f32_u`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:178 -assert_return( - () => - invoke($0, `i64.trunc_f32_u`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:179 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:180 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1.1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:181 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 1.5)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:182 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", 4294967300)]), [ - value("i64", 4294967296n), -]); - -// ./test/core/conversions.wast:183 -assert_return( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", 18446743000000000000)]), - [value("i64", -1099511627776n)], -); - -// ./test/core/conversions.wast:184 -assert_return(() => invoke($0, `i64.trunc_f32_u`, [value("f32", -0.9)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:185 -assert_return( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", -0.99999994)]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:186 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", 18446744000000000000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:187 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", -1)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:188 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:189 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [value("f32", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:190 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:191 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:192 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:193 -assert_trap( - () => invoke($0, `i64.trunc_f32_u`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:195 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:196 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:197 -assert_return( - () => - invoke($0, `i64.trunc_f64_s`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:198 -assert_return( - () => - invoke($0, `i64.trunc_f64_s`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:199 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:200 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1.1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:201 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 1.5)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:202 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:203 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.1)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:204 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.5)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:205 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -1.9)]), [ - value("i64", -1n), -]); - -// ./test/core/conversions.wast:206 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", -2)]), [ - value("i64", -2n), -]); - -// ./test/core/conversions.wast:207 -assert_return(() => invoke($0, `i64.trunc_f64_s`, [value("f64", 4294967296)]), [ - value("i64", 4294967296n), -]); - -// ./test/core/conversions.wast:208 -assert_return( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", -4294967296)]), - [value("i64", -4294967296n)], -); - -// ./test/core/conversions.wast:209 -assert_return( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", 9223372036854775000)]), - [value("i64", 9223372036854774784n)], -); - -// ./test/core/conversions.wast:210 -assert_return( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", -9223372036854776000)]), - [value("i64", -9223372036854775808n)], -); - -// ./test/core/conversions.wast:211 -assert_trap( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", 9223372036854776000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:212 -assert_trap( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", -9223372036854778000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:213 -assert_trap( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:214 -assert_trap( - () => invoke($0, `i64.trunc_f64_s`, [value("f64", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:215 -assert_trap( - () => - invoke($0, `i64.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:216 -assert_trap( - () => - invoke($0, `i64.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:217 -assert_trap( - () => - invoke($0, `i64.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:218 -assert_trap( - () => - invoke($0, `i64.trunc_f64_s`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:220 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:221 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:222 -assert_return( - () => - invoke($0, `i64.trunc_f64_u`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:223 -assert_return( - () => - invoke($0, `i64.trunc_f64_u`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:224 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:225 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1.1)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:226 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 1.5)]), [ - value("i64", 1n), -]); - -// ./test/core/conversions.wast:227 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 4294967295)]), [ - value("i64", 4294967295n), -]); - -// ./test/core/conversions.wast:228 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 4294967296)]), [ - value("i64", 4294967296n), -]); - -// ./test/core/conversions.wast:229 -assert_return( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", 18446744073709550000)]), - [value("i64", -2048n)], -); - -// ./test/core/conversions.wast:230 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", -0.9)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:231 -assert_return( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", -0.9999999999999999)]), - [value("i64", 0n)], -); - -// ./test/core/conversions.wast:232 -assert_return(() => invoke($0, `i64.trunc_f64_u`, [value("f64", 100000000)]), [ - value("i64", 100000000n), -]); - -// ./test/core/conversions.wast:233 -assert_return( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", 10000000000000000)]), - [value("i64", 10000000000000000n)], -); - -// ./test/core/conversions.wast:234 -assert_return( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", 9223372036854776000)]), - [value("i64", -9223372036854775808n)], -); - -// ./test/core/conversions.wast:235 -assert_trap( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", 18446744073709552000)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:236 -assert_trap( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", -1)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:237 -assert_trap( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:238 -assert_trap( - () => invoke($0, `i64.trunc_f64_u`, [value("f64", -Infinity)]), - `integer overflow`, -); - -// ./test/core/conversions.wast:239 -assert_trap( - () => - invoke($0, `i64.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:240 -assert_trap( - () => - invoke($0, `i64.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:241 -assert_trap( - () => - invoke($0, `i64.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:242 -assert_trap( - () => - invoke($0, `i64.trunc_f64_u`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - `invalid conversion to integer`, -); - -// ./test/core/conversions.wast:244 -assert_return(() => invoke($0, `f32.convert_i32_s`, [1]), [value("f32", 1)]); - -// ./test/core/conversions.wast:245 -assert_return(() => invoke($0, `f32.convert_i32_s`, [-1]), [value("f32", -1)]); - -// ./test/core/conversions.wast:246 -assert_return(() => invoke($0, `f32.convert_i32_s`, [0]), [value("f32", 0)]); - -// ./test/core/conversions.wast:247 -assert_return(() => invoke($0, `f32.convert_i32_s`, [2147483647]), [ - value("f32", 2147483600), -]); - -// ./test/core/conversions.wast:248 -assert_return(() => invoke($0, `f32.convert_i32_s`, [-2147483648]), [ - value("f32", -2147483600), -]); - -// ./test/core/conversions.wast:249 -assert_return(() => invoke($0, `f32.convert_i32_s`, [1234567890]), [ - value("f32", 1234568000), -]); - -// ./test/core/conversions.wast:251 -assert_return(() => invoke($0, `f32.convert_i32_s`, [16777217]), [ - value("f32", 16777216), -]); - -// ./test/core/conversions.wast:252 -assert_return(() => invoke($0, `f32.convert_i32_s`, [-16777217]), [ - value("f32", -16777216), -]); - -// ./test/core/conversions.wast:253 -assert_return(() => invoke($0, `f32.convert_i32_s`, [16777219]), [ - value("f32", 16777220), -]); - -// ./test/core/conversions.wast:254 -assert_return(() => invoke($0, `f32.convert_i32_s`, [-16777219]), [ - value("f32", -16777220), -]); - -// ./test/core/conversions.wast:256 -assert_return(() => invoke($0, `f32.convert_i64_s`, [1n]), [value("f32", 1)]); - -// ./test/core/conversions.wast:257 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-1n]), [value("f32", -1)]); - -// ./test/core/conversions.wast:258 -assert_return(() => invoke($0, `f32.convert_i64_s`, [0n]), [value("f32", 0)]); - -// ./test/core/conversions.wast:259 -assert_return(() => invoke($0, `f32.convert_i64_s`, [9223372036854775807n]), [ - value("f32", 9223372000000000000), -]); - -// ./test/core/conversions.wast:260 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-9223372036854775808n]), [ - value("f32", -9223372000000000000), -]); - -// ./test/core/conversions.wast:261 -assert_return(() => invoke($0, `f32.convert_i64_s`, [314159265358979n]), [ - value("f32", 314159280000000), -]); - -// ./test/core/conversions.wast:263 -assert_return(() => invoke($0, `f32.convert_i64_s`, [16777217n]), [ - value("f32", 16777216), -]); - -// ./test/core/conversions.wast:264 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-16777217n]), [ - value("f32", -16777216), -]); - -// ./test/core/conversions.wast:265 -assert_return(() => invoke($0, `f32.convert_i64_s`, [16777219n]), [ - value("f32", 16777220), -]); - -// ./test/core/conversions.wast:266 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-16777219n]), [ - value("f32", -16777220), -]); - -// ./test/core/conversions.wast:268 -assert_return(() => invoke($0, `f32.convert_i64_s`, [9223371212221054977n]), [ - value("f32", 9223371500000000000), -]); - -// ./test/core/conversions.wast:269 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-9223371761976868863n]), [ - value("f32", -9223371500000000000), -]); - -// ./test/core/conversions.wast:270 -assert_return(() => invoke($0, `f32.convert_i64_s`, [9007199791611905n]), [ - value("f32", 9007200000000000), -]); - -// ./test/core/conversions.wast:271 -assert_return(() => invoke($0, `f32.convert_i64_s`, [-9007199791611905n]), [ - value("f32", -9007200000000000), -]); - -// ./test/core/conversions.wast:273 -assert_return(() => invoke($0, `f64.convert_i32_s`, [1]), [value("f64", 1)]); - -// ./test/core/conversions.wast:274 -assert_return(() => invoke($0, `f64.convert_i32_s`, [-1]), [value("f64", -1)]); - -// ./test/core/conversions.wast:275 -assert_return(() => invoke($0, `f64.convert_i32_s`, [0]), [value("f64", 0)]); - -// ./test/core/conversions.wast:276 -assert_return(() => invoke($0, `f64.convert_i32_s`, [2147483647]), [ - value("f64", 2147483647), -]); - -// ./test/core/conversions.wast:277 -assert_return(() => invoke($0, `f64.convert_i32_s`, [-2147483648]), [ - value("f64", -2147483648), -]); - -// ./test/core/conversions.wast:278 -assert_return(() => invoke($0, `f64.convert_i32_s`, [987654321]), [ - value("f64", 987654321), -]); - -// ./test/core/conversions.wast:280 -assert_return(() => invoke($0, `f64.convert_i64_s`, [1n]), [value("f64", 1)]); - -// ./test/core/conversions.wast:281 -assert_return(() => invoke($0, `f64.convert_i64_s`, [-1n]), [value("f64", -1)]); - -// ./test/core/conversions.wast:282 -assert_return(() => invoke($0, `f64.convert_i64_s`, [0n]), [value("f64", 0)]); - -// ./test/core/conversions.wast:283 -assert_return(() => invoke($0, `f64.convert_i64_s`, [9223372036854775807n]), [ - value("f64", 9223372036854776000), -]); - -// ./test/core/conversions.wast:284 -assert_return(() => invoke($0, `f64.convert_i64_s`, [-9223372036854775808n]), [ - value("f64", -9223372036854776000), -]); - -// ./test/core/conversions.wast:285 -assert_return(() => invoke($0, `f64.convert_i64_s`, [4669201609102990n]), [ - value("f64", 4669201609102990), -]); - -// ./test/core/conversions.wast:287 -assert_return(() => invoke($0, `f64.convert_i64_s`, [9007199254740993n]), [ - value("f64", 9007199254740992), -]); - -// ./test/core/conversions.wast:288 -assert_return(() => invoke($0, `f64.convert_i64_s`, [-9007199254740993n]), [ - value("f64", -9007199254740992), -]); - -// ./test/core/conversions.wast:289 -assert_return(() => invoke($0, `f64.convert_i64_s`, [9007199254740995n]), [ - value("f64", 9007199254740996), -]); - -// ./test/core/conversions.wast:290 -assert_return(() => invoke($0, `f64.convert_i64_s`, [-9007199254740995n]), [ - value("f64", -9007199254740996), -]); - -// ./test/core/conversions.wast:292 -assert_return(() => invoke($0, `f32.convert_i32_u`, [1]), [value("f32", 1)]); - -// ./test/core/conversions.wast:293 -assert_return(() => invoke($0, `f32.convert_i32_u`, [0]), [value("f32", 0)]); - -// ./test/core/conversions.wast:294 -assert_return(() => invoke($0, `f32.convert_i32_u`, [2147483647]), [ - value("f32", 2147483600), -]); - -// ./test/core/conversions.wast:295 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483648]), [ - value("f32", 2147483600), -]); - -// ./test/core/conversions.wast:296 -assert_return(() => invoke($0, `f32.convert_i32_u`, [305419896]), [ - value("f32", 305419900), -]); - -// ./test/core/conversions.wast:297 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-1]), [ - value("f32", 4294967300), -]); - -// ./test/core/conversions.wast:298 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483520]), [ - value("f32", 2147483600), -]); - -// ./test/core/conversions.wast:299 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483519]), [ - value("f32", 2147484000), -]); - -// ./test/core/conversions.wast:300 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-2147483518]), [ - value("f32", 2147484000), -]); - -// ./test/core/conversions.wast:301 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-384]), [ - value("f32", 4294966800), -]); - -// ./test/core/conversions.wast:302 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-383]), [ - value("f32", 4294967000), -]); - -// ./test/core/conversions.wast:303 -assert_return(() => invoke($0, `f32.convert_i32_u`, [-382]), [ - value("f32", 4294967000), -]); - -// ./test/core/conversions.wast:305 -assert_return(() => invoke($0, `f32.convert_i32_u`, [16777217]), [ - value("f32", 16777216), -]); - -// ./test/core/conversions.wast:306 -assert_return(() => invoke($0, `f32.convert_i32_u`, [16777219]), [ - value("f32", 16777220), -]); - -// ./test/core/conversions.wast:308 -assert_return(() => invoke($0, `f32.convert_i64_u`, [1n]), [value("f32", 1)]); - -// ./test/core/conversions.wast:309 -assert_return(() => invoke($0, `f32.convert_i64_u`, [0n]), [value("f32", 0)]); - -// ./test/core/conversions.wast:310 -assert_return(() => invoke($0, `f32.convert_i64_u`, [9223372036854775807n]), [ - value("f32", 9223372000000000000), -]); - -// ./test/core/conversions.wast:311 -assert_return(() => invoke($0, `f32.convert_i64_u`, [-9223372036854775808n]), [ - value("f32", 9223372000000000000), -]); - -// ./test/core/conversions.wast:312 -assert_return(() => invoke($0, `f32.convert_i64_u`, [-1n]), [ - value("f32", 18446744000000000000), -]); - -// ./test/core/conversions.wast:314 -assert_return(() => invoke($0, `f32.convert_i64_u`, [16777217n]), [ - value("f32", 16777216), -]); - -// ./test/core/conversions.wast:315 -assert_return(() => invoke($0, `f32.convert_i64_u`, [16777219n]), [ - value("f32", 16777220), -]); - -// ./test/core/conversions.wast:317 -assert_return(() => invoke($0, `f32.convert_i64_u`, [9007199791611905n]), [ - value("f32", 9007200000000000), -]); - -// ./test/core/conversions.wast:318 -assert_return(() => invoke($0, `f32.convert_i64_u`, [9223371761976868863n]), [ - value("f32", 9223371500000000000), -]); - -// ./test/core/conversions.wast:319 -assert_return(() => invoke($0, `f32.convert_i64_u`, [-9223371487098961919n]), [ - value("f32", 9223373000000000000), -]); - -// ./test/core/conversions.wast:320 -assert_return(() => invoke($0, `f32.convert_i64_u`, [-1649267441663n]), [ - value("f32", 18446743000000000000), -]); - -// ./test/core/conversions.wast:322 -assert_return(() => invoke($0, `f64.convert_i32_u`, [1]), [value("f64", 1)]); - -// ./test/core/conversions.wast:323 -assert_return(() => invoke($0, `f64.convert_i32_u`, [0]), [value("f64", 0)]); - -// ./test/core/conversions.wast:324 -assert_return(() => invoke($0, `f64.convert_i32_u`, [2147483647]), [ - value("f64", 2147483647), -]); - -// ./test/core/conversions.wast:325 -assert_return(() => invoke($0, `f64.convert_i32_u`, [-2147483648]), [ - value("f64", 2147483648), -]); - -// ./test/core/conversions.wast:326 -assert_return(() => invoke($0, `f64.convert_i32_u`, [-1]), [ - value("f64", 4294967295), -]); - -// ./test/core/conversions.wast:328 -assert_return(() => invoke($0, `f64.convert_i64_u`, [1n]), [value("f64", 1)]); - -// ./test/core/conversions.wast:329 -assert_return(() => invoke($0, `f64.convert_i64_u`, [0n]), [value("f64", 0)]); - -// ./test/core/conversions.wast:330 -assert_return(() => invoke($0, `f64.convert_i64_u`, [9223372036854775807n]), [ - value("f64", 9223372036854776000), -]); - -// ./test/core/conversions.wast:331 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-9223372036854775808n]), [ - value("f64", 9223372036854776000), -]); - -// ./test/core/conversions.wast:332 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-1n]), [ - value("f64", 18446744073709552000), -]); - -// ./test/core/conversions.wast:333 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-9223372036854774784n]), [ - value("f64", 9223372036854776000), -]); - -// ./test/core/conversions.wast:334 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-9223372036854774783n]), [ - value("f64", 9223372036854778000), -]); - -// ./test/core/conversions.wast:335 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-9223372036854774782n]), [ - value("f64", 9223372036854778000), -]); - -// ./test/core/conversions.wast:336 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-3072n]), [ - value("f64", 18446744073709548000), -]); - -// ./test/core/conversions.wast:337 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-3071n]), [ - value("f64", 18446744073709550000), -]); - -// ./test/core/conversions.wast:338 -assert_return(() => invoke($0, `f64.convert_i64_u`, [-3070n]), [ - value("f64", 18446744073709550000), -]); - -// ./test/core/conversions.wast:340 -assert_return(() => invoke($0, `f64.convert_i64_u`, [9007199254740993n]), [ - value("f64", 9007199254740992), -]); - -// ./test/core/conversions.wast:341 -assert_return(() => invoke($0, `f64.convert_i64_u`, [9007199254740995n]), [ - value("f64", 9007199254740996), -]); - -// ./test/core/conversions.wast:343 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", 0)]), [ - value("f64", 0), -]); - -// ./test/core/conversions.wast:344 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -0)]), [ - value("f64", -0), -]); - -// ./test/core/conversions.wast:345 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value( - "f64", - 0.000000000000000000000000000000000000000000001401298464324817, - )], -); - -// ./test/core/conversions.wast:346 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value( - "f64", - -0.000000000000000000000000000000000000000000001401298464324817, - )], -); - -// ./test/core/conversions.wast:347 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", 1)]), [ - value("f64", 1), -]); - -// ./test/core/conversions.wast:348 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -1)]), [ - value("f64", -1), -]); - -// ./test/core/conversions.wast:349 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", -340282350000000000000000000000000000000), - ]), - [value("f64", -340282346638528860000000000000000000000)], -); - -// ./test/core/conversions.wast:350 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", 340282350000000000000000000000000000000), - ]), - [value("f64", 340282346638528860000000000000000000000)], -); - -// ./test/core/conversions.wast:352 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", 0.0000000000000000000000000000000000015046328), - ]), - [value("f64", 0.000000000000000000000000000000000001504632769052528)], -); - -// ./test/core/conversions.wast:354 -assert_return( - () => - invoke($0, `f64.promote_f32`, [ - value("f32", 66382537000000000000000000000000000000), - ]), - [value("f64", 66382536710104395000000000000000000000)], -); - -// ./test/core/conversions.wast:355 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", Infinity)]), [ - value("f64", Infinity), -]); - -// ./test/core/conversions.wast:356 -assert_return(() => invoke($0, `f64.promote_f32`, [value("f32", -Infinity)]), [ - value("f64", -Infinity), -]); - -// ./test/core/conversions.wast:357 -assert_return( - () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - [`canonical_nan`], -); - -// ./test/core/conversions.wast:358 -assert_return( - () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - [`arithmetic_nan`], -); - -// ./test/core/conversions.wast:359 -assert_return( - () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - [`canonical_nan`], -); - -// ./test/core/conversions.wast:360 -assert_return( - () => invoke($0, `f64.promote_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - [`arithmetic_nan`], -); - -// ./test/core/conversions.wast:362 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 0)]), [ - value("f32", 0), -]); - -// ./test/core/conversions.wast:363 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -0)]), [ - value("f32", -0), -]); - -// ./test/core/conversions.wast:364 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("f32", 0)], -); - -// ./test/core/conversions.wast:365 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("f32", -0)], -); - -// ./test/core/conversions.wast:366 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 1)]), [ - value("f32", 1), -]); - -// ./test/core/conversions.wast:367 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -1)]), [ - value("f32", -1), -]); - -// ./test/core/conversions.wast:368 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 0.000000000000000000000000000000000000011754942807573643), - ]), - [value("f32", 0.000000000000000000000000000000000000011754944)], -); - -// ./test/core/conversions.wast:369 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -0.000000000000000000000000000000000000011754942807573643), - ]), - [value("f32", -0.000000000000000000000000000000000000011754944)], -); - -// ./test/core/conversions.wast:370 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 0.000000000000000000000000000000000000011754942807573642), - ]), - [value("f32", 0.000000000000000000000000000000000000011754942)], -); - -// ./test/core/conversions.wast:371 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -0.000000000000000000000000000000000000011754942807573642), - ]), - [value("f32", -0.000000000000000000000000000000000000011754942)], -); - -// ./test/core/conversions.wast:372 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000001401298464324817, - ), - ]), - [value("f32", 0.000000000000000000000000000000000000000000001)], -); - -// ./test/core/conversions.wast:373 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000001401298464324817, - ), - ]), - [value("f32", -0.000000000000000000000000000000000000000000001)], -); - -// ./test/core/conversions.wast:374 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 340282336497324060000000000000000000000), - ]), - [value("f32", 340282330000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:375 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -340282336497324060000000000000000000000), - ]), - [value("f32", -340282330000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:376 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 340282336497324100000000000000000000000), - ]), - [value("f32", 340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:377 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -340282336497324100000000000000000000000), - ]), - [value("f32", -340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:378 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 340282346638528860000000000000000000000), - ]), - [value("f32", 340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:379 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -340282346638528860000000000000000000000), - ]), - [value("f32", -340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:380 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 340282356779733620000000000000000000000), - ]), - [value("f32", 340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:381 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -340282356779733620000000000000000000000), - ]), - [value("f32", -340282350000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:382 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 340282356779733660000000000000000000000), - ]), - [value("f32", Infinity)], -); - -// ./test/core/conversions.wast:383 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -340282356779733660000000000000000000000), - ]), - [value("f32", -Infinity)], -); - -// ./test/core/conversions.wast:384 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 0.000000000000000000000000000000000001504632769052528), - ]), - [value("f32", 0.0000000000000000000000000000000000015046328)], -); - -// ./test/core/conversions.wast:385 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 66382536710104395000000000000000000000), - ]), - [value("f32", 66382537000000000000000000000000000000)], -); - -// ./test/core/conversions.wast:386 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", Infinity)]), [ - value("f32", Infinity), -]); - -// ./test/core/conversions.wast:387 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", -Infinity)]), [ - value("f32", -Infinity), -]); - -// ./test/core/conversions.wast:388 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000000000000002)]), - [value("f32", 1)], -); - -// ./test/core/conversions.wast:389 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 0.9999999999999999)]), - [value("f32", 1)], -); - -// ./test/core/conversions.wast:390 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000000596046448)]), - [value("f32", 1)], -); - -// ./test/core/conversions.wast:391 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.000000059604645)]), - [value("f32", 1.0000001)], -); - -// ./test/core/conversions.wast:392 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.000000178813934)]), - [value("f32", 1.0000001)], -); - -// ./test/core/conversions.wast:393 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000001788139343)]), - [value("f32", 1.0000002)], -); - -// ./test/core/conversions.wast:394 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 1.0000002980232239)]), - [value("f32", 1.0000002)], -); - -// ./test/core/conversions.wast:395 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 16777217)]), [ - value("f32", 16777216), -]); - -// ./test/core/conversions.wast:396 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 16777217.000000004)]), - [value("f32", 16777218)], -); - -// ./test/core/conversions.wast:397 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", 16777218.999999996)]), - [value("f32", 16777218)], -); - -// ./test/core/conversions.wast:398 -assert_return(() => invoke($0, `f32.demote_f64`, [value("f64", 16777219)]), [ - value("f32", 16777220), -]); - -// ./test/core/conversions.wast:399 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 424258443299142700000000000000000), - ]), - [value("f32", 424258450000000000000000000000000)], -); - -// ./test/core/conversions.wast:400 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 0.0000000000000000000000000000000001569262107843488), - ]), - [value("f32", 0.00000000000000000000000000000000015692621)], -); - -// ./test/core/conversions.wast:401 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", 0.000000000000000000000000000000000000010551773688605172), - ]), - [value("f32", 0.000000000000000000000000000000000000010551773)], -); - -// ./test/core/conversions.wast:402 -assert_return( - () => invoke($0, `f32.demote_f64`, [value("f64", -2.8238128484141933)]), - [value("f32", -2.823813)], -); - -// ./test/core/conversions.wast:403 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value("f64", -9063376370095757000000000000000000), - ]), - [value("f32", -9063376000000000000000000000000000)], -); - -// ./test/core/conversions.wast:404 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - [`canonical_nan`], -); - -// ./test/core/conversions.wast:405 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - [`arithmetic_nan`], -); - -// ./test/core/conversions.wast:406 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - [`canonical_nan`], -); - -// ./test/core/conversions.wast:407 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - [`arithmetic_nan`], -); - -// ./test/core/conversions.wast:408 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, - ), - ]), - [value("f32", 0)], -); - -// ./test/core/conversions.wast:409 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000022250738585072014, - ), - ]), - [value("f32", -0)], -); - -// ./test/core/conversions.wast:410 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - 0.0000000000000000000000000000000000000000000007006492321624085, - ), - ]), - [value("f32", 0)], -); - -// ./test/core/conversions.wast:411 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - -0.0000000000000000000000000000000000000000000007006492321624085, - ), - ]), - [value("f32", -0)], -); - -// ./test/core/conversions.wast:412 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - 0.0000000000000000000000000000000000000000000007006492321624087, - ), - ]), - [value("f32", 0.000000000000000000000000000000000000000000001)], -); - -// ./test/core/conversions.wast:413 -assert_return( - () => - invoke($0, `f32.demote_f64`, [ - value( - "f64", - -0.0000000000000000000000000000000000000000000007006492321624087, - ), - ]), - [value("f32", -0.000000000000000000000000000000000000000000001)], -); - -// ./test/core/conversions.wast:415 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [0]), [value("f32", 0)]); - -// ./test/core/conversions.wast:416 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-2147483648]), [ - value("f32", -0), -]); - -// ./test/core/conversions.wast:417 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [1]), [ - value("f32", 0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/conversions.wast:418 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-1]), [ - bytes("f32", [0xff, 0xff, 0xff, 0xff]), -]); - -// ./test/core/conversions.wast:419 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [123456789]), [ - value("f32", 0.00000000000000000000000000000000016535997), -]); - -// ./test/core/conversions.wast:420 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-2147483647]), [ - value("f32", -0.000000000000000000000000000000000000000000001), -]); - -// ./test/core/conversions.wast:421 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [2139095040]), [ - value("f32", Infinity), -]); - -// ./test/core/conversions.wast:422 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-8388608]), [ - value("f32", -Infinity), -]); - -// ./test/core/conversions.wast:423 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [2143289344]), [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), -]); - -// ./test/core/conversions.wast:424 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-4194304]), [ - bytes("f32", [0x0, 0x0, 0xc0, 0xff]), -]); - -// ./test/core/conversions.wast:425 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [2141192192]), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/conversions.wast:426 -assert_return(() => invoke($0, `f32.reinterpret_i32`, [-6291456]), [ - bytes("f32", [0x0, 0x0, 0xa0, 0xff]), -]); - -// ./test/core/conversions.wast:428 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [0n]), [value("f64", 0)]); - -// ./test/core/conversions.wast:429 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [1n]), [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), -]); - -// ./test/core/conversions.wast:430 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [-1n]), [ - bytes("f64", [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), -]); - -// ./test/core/conversions.wast:431 -assert_return( - () => invoke($0, `f64.reinterpret_i64`, [-9223372036854775808n]), - [value("f64", -0)], -); - -// ./test/core/conversions.wast:432 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [1234567890n]), [ - value( - "f64", - 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000609957582, - ), -]); - -// ./test/core/conversions.wast:433 -assert_return( - () => invoke($0, `f64.reinterpret_i64`, [-9223372036854775807n]), - [value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - )], -); - -// ./test/core/conversions.wast:434 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [9218868437227405312n]), [ - value("f64", Infinity), -]); - -// ./test/core/conversions.wast:435 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [-4503599627370496n]), [ - value("f64", -Infinity), -]); - -// ./test/core/conversions.wast:436 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [9221120237041090560n]), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), -]); - -// ./test/core/conversions.wast:437 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [-2251799813685248n]), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), -]); - -// ./test/core/conversions.wast:438 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [9219994337134247936n]), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/conversions.wast:439 -assert_return(() => invoke($0, `f64.reinterpret_i64`, [-3377699720527872n]), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), -]); - -// ./test/core/conversions.wast:441 -assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", 0)]), [ - value("i32", 0), -]); - -// ./test/core/conversions.wast:442 -assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", -0)]), [ - value("i32", -2147483648), -]); - -// ./test/core/conversions.wast:443 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [ - value("f32", 0.000000000000000000000000000000000000000000001), - ]), - [value("i32", 1)], -); - -// ./test/core/conversions.wast:444 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0xff, 0xff, 0xff, 0xff])]), - [value("i32", -1)], -); - -// ./test/core/conversions.wast:445 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [ - value("f32", -0.000000000000000000000000000000000000000000001), - ]), - [value("i32", -2147483647)], -); - -// ./test/core/conversions.wast:446 -assert_return(() => invoke($0, `i32.reinterpret_f32`, [value("f32", 1)]), [ - value("i32", 1065353216), -]); - -// ./test/core/conversions.wast:447 -assert_return( - () => invoke($0, `i32.reinterpret_f32`, [value("f32", 3.1415925)]), - [value("i32", 1078530010)], -); - -// ./test/core/conversions.wast:448 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [ - value("f32", 340282350000000000000000000000000000000), - ]), - [value("i32", 2139095039)], -); - -// ./test/core/conversions.wast:449 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [ - value("f32", -340282350000000000000000000000000000000), - ]), - [value("i32", -8388609)], -); - -// ./test/core/conversions.wast:450 -assert_return( - () => invoke($0, `i32.reinterpret_f32`, [value("f32", Infinity)]), - [value("i32", 2139095040)], -); - -// ./test/core/conversions.wast:451 -assert_return( - () => invoke($0, `i32.reinterpret_f32`, [value("f32", -Infinity)]), - [value("i32", -8388608)], -); - -// ./test/core/conversions.wast:452 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])]), - [value("i32", 2143289344)], -); - -// ./test/core/conversions.wast:453 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xc0, 0xff])]), - [value("i32", -4194304)], -); - -// ./test/core/conversions.wast:454 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0x7f])]), - [value("i32", 2141192192)], -); - -// ./test/core/conversions.wast:455 -assert_return( - () => - invoke($0, `i32.reinterpret_f32`, [bytes("f32", [0x0, 0x0, 0xa0, 0xff])]), - [value("i32", -6291456)], -); - -// ./test/core/conversions.wast:457 -assert_return(() => invoke($0, `i64.reinterpret_f64`, [value("f64", 0)]), [ - value("i64", 0n), -]); - -// ./test/core/conversions.wast:458 -assert_return(() => invoke($0, `i64.reinterpret_f64`, [value("f64", -0)]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/conversions.wast:459 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - value( - "f64", - 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", 1n)], -); - -// ./test/core/conversions.wast:460 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - bytes("f64", [0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff]), - ]), - [value("i64", -1n)], -); - -// ./test/core/conversions.wast:461 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - value( - "f64", - -0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005, - ), - ]), - [value("i64", -9223372036854775807n)], -); - -// ./test/core/conversions.wast:462 -assert_return(() => invoke($0, `i64.reinterpret_f64`, [value("f64", 1)]), [ - value("i64", 4607182418800017408n), -]); - -// ./test/core/conversions.wast:463 -assert_return( - () => invoke($0, `i64.reinterpret_f64`, [value("f64", 3.14159265358979)]), - [value("i64", 4614256656552045841n)], -); - -// ./test/core/conversions.wast:464 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - value( - "f64", - 179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), - ]), - [value("i64", 9218868437227405311n)], -); - -// ./test/core/conversions.wast:465 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - value( - "f64", - -179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000, - ), - ]), - [value("i64", -4503599627370497n)], -); - -// ./test/core/conversions.wast:466 -assert_return( - () => invoke($0, `i64.reinterpret_f64`, [value("f64", Infinity)]), - [value("i64", 9218868437227405312n)], -); - -// ./test/core/conversions.wast:467 -assert_return( - () => invoke($0, `i64.reinterpret_f64`, [value("f64", -Infinity)]), - [value("i64", -4503599627370496n)], -); - -// ./test/core/conversions.wast:468 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - ]), - [value("i64", 9221120237041090560n)], -); - -// ./test/core/conversions.wast:469 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0xff]), - ]), - [value("i64", -2251799813685248n)], -); - -// ./test/core/conversions.wast:470 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), - ]), - [value("i64", 9219994337134247936n)], -); - -// ./test/core/conversions.wast:471 -assert_return( - () => - invoke($0, `i64.reinterpret_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0xff]), - ]), - [value("i64", -3377699720527872n)], -); - -// ./test/core/conversions.wast:475 -assert_invalid( - () => - instantiate(`(module (func (result i32) (i32.wrap_i64 (f32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:476 -assert_invalid( - () => - instantiate(`(module (func (result i32) (i32.trunc_f32_s (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:477 -assert_invalid( - () => - instantiate(`(module (func (result i32) (i32.trunc_f32_u (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:478 -assert_invalid( - () => - instantiate(`(module (func (result i32) (i32.trunc_f64_s (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:479 -assert_invalid( - () => - instantiate(`(module (func (result i32) (i32.trunc_f64_u (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:480 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.reinterpret_f32 (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:481 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.extend_i32_s (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:482 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.extend_i32_u (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:483 -assert_invalid( - () => - instantiate(`(module (func (result i64) (i64.trunc_f32_s (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:484 -assert_invalid( - () => - instantiate(`(module (func (result i64) (i64.trunc_f32_u (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:485 -assert_invalid( - () => - instantiate(`(module (func (result i64) (i64.trunc_f64_s (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:486 -assert_invalid( - () => - instantiate(`(module (func (result i64) (i64.trunc_f64_u (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:487 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.reinterpret_f64 (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:488 -assert_invalid( - () => - instantiate( - `(module (func (result f32) (f32.convert_i32_s (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:489 -assert_invalid( - () => - instantiate( - `(module (func (result f32) (f32.convert_i32_u (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:490 -assert_invalid( - () => - instantiate( - `(module (func (result f32) (f32.convert_i64_s (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:491 -assert_invalid( - () => - instantiate( - `(module (func (result f32) (f32.convert_i64_u (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:492 -assert_invalid( - () => - instantiate(`(module (func (result f32) (f32.demote_f64 (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:493 -assert_invalid( - () => - instantiate( - `(module (func (result f32) (f32.reinterpret_i32 (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:494 -assert_invalid( - () => - instantiate( - `(module (func (result f64) (f64.convert_i32_s (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:495 -assert_invalid( - () => - instantiate( - `(module (func (result f64) (f64.convert_i32_u (i64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:496 -assert_invalid( - () => - instantiate( - `(module (func (result f64) (f64.convert_i64_s (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:497 -assert_invalid( - () => - instantiate( - `(module (func (result f64) (f64.convert_i64_u (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/conversions.wast:498 -assert_invalid( - () => - instantiate(`(module (func (result f64) (f64.promote_f32 (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/conversions.wast:499 -assert_invalid( - () => - instantiate( - `(module (func (result f64) (f64.reinterpret_i64 (i32.const 0))))`, - ), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/custom.wast.js b/js/src/jit-test/tests/wasm/spec/threads/custom.wast.js deleted file mode 100644 index 2d8cba2af539..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/custom.wast.js +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/custom.wast - -// ./test/core/custom.wast:1 -let $0 = instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\24\\10" "a custom section" "this is the payload" - "\\00\\20\\10" "a custom section" "this is payload" - "\\00\\11\\10" "a custom section" "" - "\\00\\10\\00" "" "this is payload" - "\\00\\01\\00" "" "" - "\\00\\24\\10" "\\00\\00custom sectio\\00" "this is the payload" - "\\00\\24\\10" "\\ef\\bb\\bfa custom sect" "this is the payload" - "\\00\\24\\10" "a custom sect\\e2\\8c\\a3" "this is the payload" - "\\00\\1f\\16" "module within a module" "\\00asm" "\\01\\00\\00\\00" -)`); - -// ./test/core/custom.wast:14 -let $1 = instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\01\\01\\00" ;; type section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\02\\01\\00" ;; import section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\03\\01\\00" ;; function section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\04\\01\\00" ;; table section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\05\\01\\00" ;; memory section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\06\\01\\00" ;; global section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\07\\01\\00" ;; export section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\09\\01\\00" ;; element section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\0a\\01\\00" ;; code section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" - "\\0b\\01\\00" ;; data section - "\\00\\0e\\06" "custom" "payload" - "\\00\\0e\\06" "custom" "payload" -)`); - -// ./test/core/custom.wast:50 -let $2 = instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f" ;; type section - "\\00\\1a\\06" "custom" "this is the payload" ;; custom section - "\\03\\02\\01\\00" ;; function section - "\\07\\0a\\01\\06\\61\\64\\64\\54\\77\\6f\\00\\00" ;; export section - "\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b" ;; code section - "\\00\\1b\\07" "custom2" "this is the payload" ;; custom section -)`); - -// ./test/core/custom.wast:60 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00" - )`), `unexpected end`); - -// ./test/core/custom.wast:68 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\00" - )`), `unexpected end`); - -// ./test/core/custom.wast:76 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\00\\00\\05\\01\\00\\07\\00\\00" - )`), `unexpected end`); - -// ./test/core/custom.wast:84 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\26\\10" "a custom section" "this is the payload" - )`), `unexpected end`); - -// ./test/core/custom.wast:92 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\00\\25\\10" "a custom section" "this is the payload" - "\\00\\24\\10" "a custom section" "this is the payload" - )`), `invalid section id`); - -// ./test/core/custom.wast:101 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\01\\07\\01\\60\\02\\7f\\7f\\01\\7f" ;; type section - "\\00\\25\\10" "a custom section" "this is the payload" ;; invalid length! - "\\03\\02\\01\\00" ;; function section - "\\0a\\09\\01\\07\\00\\20\\00\\20\\01\\6a\\0b" ;; code section - "\\00\\1b\\07" "custom2" "this is the payload" ;; custom section - )`), `function and code section have inconsistent lengths`); - -// ./test/core/custom.wast:114 -assert_malformed(() => - instantiate(`(module binary - "\\00asm\\01\\00\\00\\00" - "\\00asm\\01\\00\\00\\00" - )`), `length out of bounds`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/directives.txt b/js/src/jit-test/tests/wasm/spec/threads/directives.txt deleted file mode 100644 index eb19f5caf8e3..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/directives.txt +++ /dev/null @@ -1 +0,0 @@ -|jit-test| test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; test-also=--test-wasm-await-tier2; test-also=--disable-wasm-huge-memory; skip-variant-if: --disable-wasm-huge-memory, !wasmHugeMemorySupported(); local-include:harness/harness.js; skip-if: !wasmThreadsEnabled() \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/threads/fac.wast.js b/js/src/jit-test/tests/wasm/spec/threads/fac.wast.js deleted file mode 100644 index f23739d1c893..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/fac.wast.js +++ /dev/null @@ -1,131 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/fac.wast - -// ./test/core/fac.wast:1 -let $0 = instantiate(`(module - ;; Recursive factorial - (func (export "fac-rec") (param i64) (result i64) - (if (result i64) (i64.eq (local.get 0) (i64.const 0)) - (then (i64.const 1)) - (else - (i64.mul (local.get 0) (call 0 (i64.sub (local.get 0) (i64.const 1)))) - ) - ) - ) - - ;; Recursive factorial named - (func $$fac-rec-named (export "fac-rec-named") (param $$n i64) (result i64) - (if (result i64) (i64.eq (local.get $$n) (i64.const 0)) - (then (i64.const 1)) - (else - (i64.mul - (local.get $$n) - (call $$fac-rec-named (i64.sub (local.get $$n) (i64.const 1))) - ) - ) - ) - ) - - ;; Iterative factorial - (func (export "fac-iter") (param i64) (result i64) - (local i64 i64) - (local.set 1 (local.get 0)) - (local.set 2 (i64.const 1)) - (block - (loop - (if - (i64.eq (local.get 1) (i64.const 0)) - (then (br 2)) - (else - (local.set 2 (i64.mul (local.get 1) (local.get 2))) - (local.set 1 (i64.sub (local.get 1) (i64.const 1))) - ) - ) - (br 0) - ) - ) - (local.get 2) - ) - - ;; Iterative factorial named - (func (export "fac-iter-named") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - (local.set $$i (local.get $$n)) - (local.set $$res (i64.const 1)) - (block $$done - (loop $$loop - (if - (i64.eq (local.get $$i) (i64.const 0)) - (then (br $$done)) - (else - (local.set $$res (i64.mul (local.get $$i) (local.get $$res))) - (local.set $$i (i64.sub (local.get $$i) (i64.const 1))) - ) - ) - (br $$loop) - ) - ) - (local.get $$res) - ) - - ;; Optimized factorial. - (func (export "fac-opt") (param i64) (result i64) - (local i64) - (local.set 1 (i64.const 1)) - (block - (br_if 0 (i64.lt_s (local.get 0) (i64.const 2))) - (loop - (local.set 1 (i64.mul (local.get 1) (local.get 0))) - (local.set 0 (i64.add (local.get 0) (i64.const -1))) - (br_if 0 (i64.gt_s (local.get 0) (i64.const 1))) - ) - ) - (local.get 1) - ) -)`); - -// ./test/core/fac.wast:84 -assert_return(() => invoke($0, `fac-rec`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/fac.wast:85 -assert_return(() => invoke($0, `fac-iter`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/fac.wast:86 -assert_return(() => invoke($0, `fac-rec-named`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/fac.wast:87 -assert_return(() => invoke($0, `fac-iter-named`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/fac.wast:88 -assert_return(() => invoke($0, `fac-opt`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/fac.wast:89 -assert_exhaustion( - () => invoke($0, `fac-rec`, [1073741824n]), - `call stack exhausted`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/float_memory.wast.js b/js/src/jit-test/tests/wasm/spec/threads/float_memory.wast.js deleted file mode 100644 index 9432ff928b35..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/float_memory.wast.js +++ /dev/null @@ -1,388 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/float_memory.wast - -// ./test/core/float_memory.wast:5 -let $0 = instantiate(`(module - (memory (data "\\00\\00\\a0\\7f")) - - (func (export "f32.load") (result f32) (f32.load (i32.const 0))) - (func (export "i32.load") (result i32) (i32.load (i32.const 0))) - (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x200000))) - (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fa00000))) - (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) -)`); - -// ./test/core/float_memory.wast:15 -assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:16 -assert_return(() => invoke($0, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:17 -invoke($0, `reset`, []); - -// ./test/core/float_memory.wast:18 -assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:19 -assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:20 -invoke($0, `f32.store`, []); - -// ./test/core/float_memory.wast:21 -assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:22 -assert_return(() => invoke($0, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:23 -invoke($0, `reset`, []); - -// ./test/core/float_memory.wast:24 -assert_return(() => invoke($0, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:25 -assert_return(() => invoke($0, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:26 -invoke($0, `i32.store`, []); - -// ./test/core/float_memory.wast:27 -assert_return(() => invoke($0, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:28 -assert_return(() => invoke($0, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:30 -let $1 = instantiate(`(module - (memory (data "\\00\\00\\00\\00\\00\\00\\f4\\7f")) - - (func (export "f64.load") (result f64) (f64.load (i32.const 0))) - (func (export "i64.load") (result i64) (i64.load (i32.const 0))) - (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0x4000000000000))) - (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ff4000000000000))) - (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) -)`); - -// ./test/core/float_memory.wast:40 -assert_return(() => invoke($1, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:41 -assert_return(() => invoke($1, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:42 -invoke($1, `reset`, []); - -// ./test/core/float_memory.wast:43 -assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:44 -assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:45 -invoke($1, `f64.store`, []); - -// ./test/core/float_memory.wast:46 -assert_return(() => invoke($1, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:47 -assert_return(() => invoke($1, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:48 -invoke($1, `reset`, []); - -// ./test/core/float_memory.wast:49 -assert_return(() => invoke($1, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:50 -assert_return(() => invoke($1, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:51 -invoke($1, `i64.store`, []); - -// ./test/core/float_memory.wast:52 -assert_return(() => invoke($1, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:53 -assert_return(() => invoke($1, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:57 -let $2 = instantiate(`(module - (memory (data "\\00\\00\\00\\a0\\7f")) - - (func (export "f32.load") (result f32) (f32.load (i32.const 1))) - (func (export "i32.load") (result i32) (i32.load (i32.const 1))) - (func (export "f32.store") (f32.store (i32.const 1) (f32.const nan:0x200000))) - (func (export "i32.store") (i32.store (i32.const 1) (i32.const 0x7fa00000))) - (func (export "reset") (i32.store (i32.const 1) (i32.const 0))) -)`); - -// ./test/core/float_memory.wast:67 -assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:68 -assert_return(() => invoke($2, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:69 -invoke($2, `reset`, []); - -// ./test/core/float_memory.wast:70 -assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:71 -assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:72 -invoke($2, `f32.store`, []); - -// ./test/core/float_memory.wast:73 -assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:74 -assert_return(() => invoke($2, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:75 -invoke($2, `reset`, []); - -// ./test/core/float_memory.wast:76 -assert_return(() => invoke($2, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:77 -assert_return(() => invoke($2, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:78 -invoke($2, `i32.store`, []); - -// ./test/core/float_memory.wast:79 -assert_return(() => invoke($2, `i32.load`, []), [value("i32", 2141192192)]); - -// ./test/core/float_memory.wast:80 -assert_return(() => invoke($2, `f32.load`, []), [ - bytes("f32", [0x0, 0x0, 0xa0, 0x7f]), -]); - -// ./test/core/float_memory.wast:82 -let $3 = instantiate(`(module - (memory (data "\\00\\00\\00\\00\\00\\00\\00\\f4\\7f")) - - (func (export "f64.load") (result f64) (f64.load (i32.const 1))) - (func (export "i64.load") (result i64) (i64.load (i32.const 1))) - (func (export "f64.store") (f64.store (i32.const 1) (f64.const nan:0x4000000000000))) - (func (export "i64.store") (i64.store (i32.const 1) (i64.const 0x7ff4000000000000))) - (func (export "reset") (i64.store (i32.const 1) (i64.const 0))) -)`); - -// ./test/core/float_memory.wast:92 -assert_return(() => invoke($3, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:93 -assert_return(() => invoke($3, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:94 -invoke($3, `reset`, []); - -// ./test/core/float_memory.wast:95 -assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:96 -assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:97 -invoke($3, `f64.store`, []); - -// ./test/core/float_memory.wast:98 -assert_return(() => invoke($3, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:99 -assert_return(() => invoke($3, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:100 -invoke($3, `reset`, []); - -// ./test/core/float_memory.wast:101 -assert_return(() => invoke($3, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:102 -assert_return(() => invoke($3, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:103 -invoke($3, `i64.store`, []); - -// ./test/core/float_memory.wast:104 -assert_return(() => invoke($3, `i64.load`, []), [ - value("i64", 9219994337134247936n), -]); - -// ./test/core/float_memory.wast:105 -assert_return(() => invoke($3, `f64.load`, []), [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf4, 0x7f]), -]); - -// ./test/core/float_memory.wast:109 -let $4 = instantiate(`(module - (memory (data "\\01\\00\\d0\\7f")) - - (func (export "f32.load") (result f32) (f32.load (i32.const 0))) - (func (export "i32.load") (result i32) (i32.load (i32.const 0))) - (func (export "f32.store") (f32.store (i32.const 0) (f32.const nan:0x500001))) - (func (export "i32.store") (i32.store (i32.const 0) (i32.const 0x7fd00001))) - (func (export "reset") (i32.store (i32.const 0) (i32.const 0))) -)`); - -// ./test/core/float_memory.wast:119 -assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); - -// ./test/core/float_memory.wast:120 -assert_return(() => invoke($4, `f32.load`, []), [ - bytes("f32", [0x1, 0x0, 0xd0, 0x7f]), -]); - -// ./test/core/float_memory.wast:121 -invoke($4, `reset`, []); - -// ./test/core/float_memory.wast:122 -assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:123 -assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:124 -invoke($4, `f32.store`, []); - -// ./test/core/float_memory.wast:125 -assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); - -// ./test/core/float_memory.wast:126 -assert_return(() => invoke($4, `f32.load`, []), [ - bytes("f32", [0x1, 0x0, 0xd0, 0x7f]), -]); - -// ./test/core/float_memory.wast:127 -invoke($4, `reset`, []); - -// ./test/core/float_memory.wast:128 -assert_return(() => invoke($4, `i32.load`, []), [value("i32", 0)]); - -// ./test/core/float_memory.wast:129 -assert_return(() => invoke($4, `f32.load`, []), [value("f32", 0)]); - -// ./test/core/float_memory.wast:130 -invoke($4, `i32.store`, []); - -// ./test/core/float_memory.wast:131 -assert_return(() => invoke($4, `i32.load`, []), [value("i32", 2144337921)]); - -// ./test/core/float_memory.wast:132 -assert_return(() => invoke($4, `f32.load`, []), [ - bytes("f32", [0x1, 0x0, 0xd0, 0x7f]), -]); - -// ./test/core/float_memory.wast:134 -let $5 = instantiate(`(module - (memory (data "\\01\\00\\00\\00\\00\\00\\fc\\7f")) - - (func (export "f64.load") (result f64) (f64.load (i32.const 0))) - (func (export "i64.load") (result i64) (i64.load (i32.const 0))) - (func (export "f64.store") (f64.store (i32.const 0) (f64.const nan:0xc000000000001))) - (func (export "i64.store") (i64.store (i32.const 0) (i64.const 0x7ffc000000000001))) - (func (export "reset") (i64.store (i32.const 0) (i64.const 0))) -)`); - -// ./test/core/float_memory.wast:144 -assert_return(() => invoke($5, `i64.load`, []), [ - value("i64", 9222246136947933185n), -]); - -// ./test/core/float_memory.wast:145 -assert_return(() => invoke($5, `f64.load`, []), [ - bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f]), -]); - -// ./test/core/float_memory.wast:146 -invoke($5, `reset`, []); - -// ./test/core/float_memory.wast:147 -assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:148 -assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:149 -invoke($5, `f64.store`, []); - -// ./test/core/float_memory.wast:150 -assert_return(() => invoke($5, `i64.load`, []), [ - value("i64", 9222246136947933185n), -]); - -// ./test/core/float_memory.wast:151 -assert_return(() => invoke($5, `f64.load`, []), [ - bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f]), -]); - -// ./test/core/float_memory.wast:152 -invoke($5, `reset`, []); - -// ./test/core/float_memory.wast:153 -assert_return(() => invoke($5, `i64.load`, []), [value("i64", 0n)]); - -// ./test/core/float_memory.wast:154 -assert_return(() => invoke($5, `f64.load`, []), [value("f64", 0)]); - -// ./test/core/float_memory.wast:155 -invoke($5, `i64.store`, []); - -// ./test/core/float_memory.wast:156 -assert_return(() => invoke($5, `i64.load`, []), [ - value("i64", 9222246136947933185n), -]); - -// ./test/core/float_memory.wast:157 -assert_return(() => invoke($5, `f64.load`, []), [ - bytes("f64", [0x1, 0x0, 0x0, 0x0, 0x0, 0x0, 0xfc, 0x7f]), -]); diff --git a/js/src/jit-test/tests/wasm/spec/threads/harness/directives.txt b/js/src/jit-test/tests/wasm/spec/threads/harness/directives.txt deleted file mode 100644 index d41243abbb08..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/harness/directives.txt +++ /dev/null @@ -1 +0,0 @@ -|jit-test| skip-if: true \ No newline at end of file diff --git a/js/src/jit-test/tests/wasm/spec/threads/harness/harness.js b/js/src/jit-test/tests/wasm/spec/threads/harness/harness.js deleted file mode 100644 index be3f6c317916..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/harness/harness.js +++ /dev/null @@ -1,339 +0,0 @@ -"use strict"; - -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -if (!wasmIsSupported()) { - quit(); -} - -function bytes(type, bytes) { - var typedBuffer = new Uint8Array(bytes); - return wasmGlobalFromArrayBuffer(type, typedBuffer.buffer); -} -function value(type, value) { - return new WebAssembly.Global({ - value: type, - mutable: false, - }, value); -} - -function i8x16(elements) { - let typedBuffer = new Uint8Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} -function i16x8(elements) { - let typedBuffer = new Uint16Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} -function i32x4(elements) { - let typedBuffer = new Uint32Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} -function i64x2(elements) { - let typedBuffer = new BigUint64Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} -function f32x4(elements) { - let typedBuffer = new Float32Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} -function f64x2(elements) { - let typedBuffer = new Float64Array(elements); - return wasmGlobalFromArrayBuffer("v128", typedBuffer.buffer); -} - -class F32x4Pattern { - constructor(x, y, z, w) { - this.x = x; - this.y = y; - this.z = z; - this.w = w; - } -} - -class F64x2Pattern { - constructor(x, y) { - this.x = x; - this.y = y; - } -} - -let externrefs = {}; -let externsym = Symbol("externref"); -function externref(s) { - if (!(s in externrefs)) externrefs[s] = { [externsym]: s }; - return externrefs[s]; -} -function is_externref(x) { - return (x !== null && externsym in x) ? 1 : 0; -} -function is_funcref(x) { - return typeof x === "function" ? 1 : 0; -} -function eq_externref(x, y) { - return x === y ? 1 : 0; -} -function eq_funcref(x, y) { - return x === y ? 1 : 0; -} - -let spectest = { - externref: externref, - is_externref: is_externref, - is_funcref: is_funcref, - eq_externref: eq_externref, - eq_funcref: eq_funcref, - print: console.log.bind(console), - print_i32: console.log.bind(console), - print_i32_f32: console.log.bind(console), - print_f64_f64: console.log.bind(console), - print_f32: console.log.bind(console), - print_f64: console.log.bind(console), - global_i32: 666, - global_i64: 666n, - global_f32: 666, - global_f64: 666, - table: new WebAssembly.Table({ - initial: 10, - maximum: 20, - element: "anyfunc", - }), - memory: new WebAssembly.Memory({ initial: 1, maximum: 2 }), -}; - -let linkage = { - spectest, -}; - -function getInstance(instanceish) { - if (typeof instanceish === "string") { - assertEq( - instanceish in linkage, - true, - `'${instanceish}'' must be registered`, - ); - return linkage[instanceish]; - } - return instanceish; -} - -function instantiate(source) { - let bytecode = wasmTextToBinary(source); - let module = new WebAssembly.Module(bytecode); - let instance = new WebAssembly.Instance(module, linkage); - return instance.exports; -} - -function register(instanceish, name) { - linkage[name] = getInstance(instanceish); -} - -function invoke(instanceish, field, params) { - let func = getInstance(instanceish)[field]; - assertEq(func instanceof Function, true, "expected a function"); - return wasmLosslessInvoke(func, ...params); -} - -function get(instanceish, field) { - let global = getInstance(instanceish)[field]; - assertEq( - global instanceof WebAssembly.Global, - true, - "expected a WebAssembly.Global", - ); - return global; -} - -function assert_trap(thunk, message) { - try { - thunk(); - assertEq("normal return", "trap"); - } catch (err) { - assertEq( - err instanceof WebAssembly.RuntimeError, - true, - "expected trap", - ); - } -} - -let StackOverflow; -try { - (function f() { - 1 + f(); - })(); -} catch (e) { - StackOverflow = e.constructor; -} -function assert_exhaustion(thunk, message) { - try { - thunk(); - assertEq("normal return", "exhaustion"); - } catch (err) { - assertEq( - err instanceof StackOverflow, - true, - "expected exhaustion", - ); - } -} - -function assert_invalid(thunk, message) { - try { - thunk(); - assertEq("valid module", "invalid module"); - } catch (err) { - assertEq( - err instanceof WebAssembly.LinkError || - err instanceof WebAssembly.CompileError, - true, - "expected an invalid module", - ); - } -} - -function assert_unlinkable(thunk, message) { - try { - thunk(); - assertEq(true, false, "expected an unlinkable module"); - } catch (err) { - assertEq( - err instanceof WebAssembly.LinkError || - err instanceof WebAssembly.CompileError, - true, - "expected an unlinkable module", - ); - } -} - -function assert_malformed(thunk, message) { - try { - thunk(); - assertEq("valid module", "malformed module"); - } catch (err) { - assertEq( - err instanceof TypeError || - err instanceof SyntaxError || - err instanceof WebAssembly.CompileError || - err instanceof WebAssembly.LinkError, - true, - `expected a malformed module`, - ); - } -} - -function assert_exception(thunk) { - let thrown = false; - try { - thunk(); - } catch (err) { - thrown = true; - } - assertEq(thrown, true, "expected an exception to be thrown"); -} - -function assert_return(thunk, expected) { - let results = thunk(); - - if (results === undefined) { - results = []; - } else if (!Array.isArray(results)) { - results = [results]; - } - if (!Array.isArray(expected)) { - expected = [expected]; - } - - if (!compareResults(results, expected)) { - let got = results.map((x) => formatResult(x)).join(", "); - let wanted = expected.map((x) => formatExpected(x)).join(", "); - assertEq( - `[${got}]`, - `[${wanted}]`, - ); - assertEq(true, false, `${got} !== ${wanted}`); - } -} - -function formatResult(result) { - if (typeof (result) === "object") { - return wasmGlobalToString(result); - } else { - return `${result}`; - } -} - -function formatExpected(expected) { - if ( - expected === `f32_canonical_nan` || - expected === `f32_arithmetic_nan` || - expected === `f64_canonical_nan` || - expected === `f64_arithmetic_nan` - ) { - return expected; - } else if (expected instanceof F32x4Pattern) { - return `f32x4(${formatExpected(expected.x)}, ${ - formatExpected(expected.y) - }, ${formatExpected(expected.z)}, ${formatExpected(expected.w)})`; - } else if (expected instanceof F64x2Pattern) { - return `f64x2(${formatExpected(expected.x)}, ${ - formatExpected(expected.y) - })`; - } else if (typeof (expected) === "object") { - return wasmGlobalToString(expected); - } else { - throw new Error("unknown expected result"); - } -} - -function compareResults(results, expected) { - if (results.length !== expected.length) { - return false; - } - for (let i in results) { - if (!compareResult(results[i], expected[i])) { - return false; - } - } - return true; -} - -function compareResult(result, expected) { - if ( - expected === `canonical_nan` || - expected === `arithmetic_nan` - ) { - return wasmGlobalIsNaN(result, expected); - } else if (expected instanceof F32x4Pattern) { - return compareResult( - wasmGlobalExtractLane(result, "f32x4", 0), - expected.x, - ) && - compareResult(wasmGlobalExtractLane(result, "f32x4", 1), expected.y) && - compareResult(wasmGlobalExtractLane(result, "f32x4", 2), expected.z) && - compareResult(wasmGlobalExtractLane(result, "f32x4", 3), expected.w); - } else if (expected instanceof F64x2Pattern) { - return compareResult( - wasmGlobalExtractLane(result, "f64x2", 0), - expected.x, - ) && - compareResult(wasmGlobalExtractLane(result, "f64x2", 1), expected.y); - } else if (typeof (expected) === "object") { - return wasmGlobalsEqual(result, expected); - } else { - throw new Error("unknown expected result"); - } -} diff --git a/js/src/jit-test/tests/wasm/spec/threads/i32.wast.js b/js/src/jit-test/tests/wasm/spec/threads/i32.wast.js deleted file mode 100644 index 4297d05b8c78..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/i32.wast.js +++ /dev/null @@ -1,2061 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/i32.wast - -// ./test/core/i32.wast:3 -let $0 = instantiate(`(module - (func (export "add") (param $$x i32) (param $$y i32) (result i32) (i32.add (local.get $$x) (local.get $$y))) - (func (export "sub") (param $$x i32) (param $$y i32) (result i32) (i32.sub (local.get $$x) (local.get $$y))) - (func (export "mul") (param $$x i32) (param $$y i32) (result i32) (i32.mul (local.get $$x) (local.get $$y))) - (func (export "div_s") (param $$x i32) (param $$y i32) (result i32) (i32.div_s (local.get $$x) (local.get $$y))) - (func (export "div_u") (param $$x i32) (param $$y i32) (result i32) (i32.div_u (local.get $$x) (local.get $$y))) - (func (export "rem_s") (param $$x i32) (param $$y i32) (result i32) (i32.rem_s (local.get $$x) (local.get $$y))) - (func (export "rem_u") (param $$x i32) (param $$y i32) (result i32) (i32.rem_u (local.get $$x) (local.get $$y))) - (func (export "and") (param $$x i32) (param $$y i32) (result i32) (i32.and (local.get $$x) (local.get $$y))) - (func (export "or") (param $$x i32) (param $$y i32) (result i32) (i32.or (local.get $$x) (local.get $$y))) - (func (export "xor") (param $$x i32) (param $$y i32) (result i32) (i32.xor (local.get $$x) (local.get $$y))) - (func (export "shl") (param $$x i32) (param $$y i32) (result i32) (i32.shl (local.get $$x) (local.get $$y))) - (func (export "shr_s") (param $$x i32) (param $$y i32) (result i32) (i32.shr_s (local.get $$x) (local.get $$y))) - (func (export "shr_u") (param $$x i32) (param $$y i32) (result i32) (i32.shr_u (local.get $$x) (local.get $$y))) - (func (export "rotl") (param $$x i32) (param $$y i32) (result i32) (i32.rotl (local.get $$x) (local.get $$y))) - (func (export "rotr") (param $$x i32) (param $$y i32) (result i32) (i32.rotr (local.get $$x) (local.get $$y))) - (func (export "clz") (param $$x i32) (result i32) (i32.clz (local.get $$x))) - (func (export "ctz") (param $$x i32) (result i32) (i32.ctz (local.get $$x))) - (func (export "popcnt") (param $$x i32) (result i32) (i32.popcnt (local.get $$x))) - (func (export "eqz") (param $$x i32) (result i32) (i32.eqz (local.get $$x))) - (func (export "eq") (param $$x i32) (param $$y i32) (result i32) (i32.eq (local.get $$x) (local.get $$y))) - (func (export "ne") (param $$x i32) (param $$y i32) (result i32) (i32.ne (local.get $$x) (local.get $$y))) - (func (export "lt_s") (param $$x i32) (param $$y i32) (result i32) (i32.lt_s (local.get $$x) (local.get $$y))) - (func (export "lt_u") (param $$x i32) (param $$y i32) (result i32) (i32.lt_u (local.get $$x) (local.get $$y))) - (func (export "le_s") (param $$x i32) (param $$y i32) (result i32) (i32.le_s (local.get $$x) (local.get $$y))) - (func (export "le_u") (param $$x i32) (param $$y i32) (result i32) (i32.le_u (local.get $$x) (local.get $$y))) - (func (export "gt_s") (param $$x i32) (param $$y i32) (result i32) (i32.gt_s (local.get $$x) (local.get $$y))) - (func (export "gt_u") (param $$x i32) (param $$y i32) (result i32) (i32.gt_u (local.get $$x) (local.get $$y))) - (func (export "ge_s") (param $$x i32) (param $$y i32) (result i32) (i32.ge_s (local.get $$x) (local.get $$y))) - (func (export "ge_u") (param $$x i32) (param $$y i32) (result i32) (i32.ge_u (local.get $$x) (local.get $$y))) -)`); - -// ./test/core/i32.wast:35 -assert_return(() => invoke($0, `add`, [1, 1]), [value("i32", 2)]); - -// ./test/core/i32.wast:36 -assert_return(() => invoke($0, `add`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:37 -assert_return(() => invoke($0, `add`, [-1, -1]), [value("i32", -2)]); - -// ./test/core/i32.wast:38 -assert_return(() => invoke($0, `add`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:39 -assert_return(() => invoke($0, `add`, [2147483647, 1]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:40 -assert_return(() => invoke($0, `add`, [-2147483648, -1]), [ - value("i32", 2147483647), -]); - -// ./test/core/i32.wast:41 -assert_return(() => invoke($0, `add`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:42 -assert_return(() => invoke($0, `add`, [1073741823, 1]), [ - value("i32", 1073741824), -]); - -// ./test/core/i32.wast:44 -assert_return(() => invoke($0, `sub`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:45 -assert_return(() => invoke($0, `sub`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:46 -assert_return(() => invoke($0, `sub`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:47 -assert_return(() => invoke($0, `sub`, [2147483647, -1]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:48 -assert_return(() => invoke($0, `sub`, [-2147483648, 1]), [ - value("i32", 2147483647), -]); - -// ./test/core/i32.wast:49 -assert_return(() => invoke($0, `sub`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:50 -assert_return(() => invoke($0, `sub`, [1073741823, -1]), [ - value("i32", 1073741824), -]); - -// ./test/core/i32.wast:52 -assert_return(() => invoke($0, `mul`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:53 -assert_return(() => invoke($0, `mul`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:54 -assert_return(() => invoke($0, `mul`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:55 -assert_return(() => invoke($0, `mul`, [268435456, 4096]), [value("i32", 0)]); - -// ./test/core/i32.wast:56 -assert_return(() => invoke($0, `mul`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:57 -assert_return(() => invoke($0, `mul`, [-2147483648, -1]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:58 -assert_return(() => invoke($0, `mul`, [2147483647, -1]), [ - value("i32", -2147483647), -]); - -// ./test/core/i32.wast:59 -assert_return(() => invoke($0, `mul`, [19088743, 1985229328]), [ - value("i32", 898528368), -]); - -// ./test/core/i32.wast:60 -assert_return(() => invoke($0, `mul`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:62 -assert_trap(() => invoke($0, `div_s`, [1, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:63 -assert_trap(() => invoke($0, `div_s`, [0, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:64 -assert_trap(() => invoke($0, `div_s`, [-2147483648, -1]), `integer overflow`); - -// ./test/core/i32.wast:65 -assert_trap( - () => invoke($0, `div_s`, [-2147483648, 0]), - `integer divide by zero`, -); - -// ./test/core/i32.wast:66 -assert_return(() => invoke($0, `div_s`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:67 -assert_return(() => invoke($0, `div_s`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:68 -assert_return(() => invoke($0, `div_s`, [0, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:69 -assert_return(() => invoke($0, `div_s`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:70 -assert_return(() => invoke($0, `div_s`, [-2147483648, 2]), [ - value("i32", -1073741824), -]); - -// ./test/core/i32.wast:71 -assert_return(() => invoke($0, `div_s`, [-2147483647, 1000]), [ - value("i32", -2147483), -]); - -// ./test/core/i32.wast:72 -assert_return(() => invoke($0, `div_s`, [5, 2]), [value("i32", 2)]); - -// ./test/core/i32.wast:73 -assert_return(() => invoke($0, `div_s`, [-5, 2]), [value("i32", -2)]); - -// ./test/core/i32.wast:74 -assert_return(() => invoke($0, `div_s`, [5, -2]), [value("i32", -2)]); - -// ./test/core/i32.wast:75 -assert_return(() => invoke($0, `div_s`, [-5, -2]), [value("i32", 2)]); - -// ./test/core/i32.wast:76 -assert_return(() => invoke($0, `div_s`, [7, 3]), [value("i32", 2)]); - -// ./test/core/i32.wast:77 -assert_return(() => invoke($0, `div_s`, [-7, 3]), [value("i32", -2)]); - -// ./test/core/i32.wast:78 -assert_return(() => invoke($0, `div_s`, [7, -3]), [value("i32", -2)]); - -// ./test/core/i32.wast:79 -assert_return(() => invoke($0, `div_s`, [-7, -3]), [value("i32", 2)]); - -// ./test/core/i32.wast:80 -assert_return(() => invoke($0, `div_s`, [11, 5]), [value("i32", 2)]); - -// ./test/core/i32.wast:81 -assert_return(() => invoke($0, `div_s`, [17, 7]), [value("i32", 2)]); - -// ./test/core/i32.wast:83 -assert_trap(() => invoke($0, `div_u`, [1, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:84 -assert_trap(() => invoke($0, `div_u`, [0, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:85 -assert_return(() => invoke($0, `div_u`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:86 -assert_return(() => invoke($0, `div_u`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:87 -assert_return(() => invoke($0, `div_u`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:88 -assert_return(() => invoke($0, `div_u`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:89 -assert_return(() => invoke($0, `div_u`, [-2147483648, 2]), [ - value("i32", 1073741824), -]); - -// ./test/core/i32.wast:90 -assert_return(() => invoke($0, `div_u`, [-1880092688, 65537]), [ - value("i32", 36847), -]); - -// ./test/core/i32.wast:91 -assert_return(() => invoke($0, `div_u`, [-2147483647, 1000]), [ - value("i32", 2147483), -]); - -// ./test/core/i32.wast:92 -assert_return(() => invoke($0, `div_u`, [5, 2]), [value("i32", 2)]); - -// ./test/core/i32.wast:93 -assert_return(() => invoke($0, `div_u`, [-5, 2]), [value("i32", 2147483645)]); - -// ./test/core/i32.wast:94 -assert_return(() => invoke($0, `div_u`, [5, -2]), [value("i32", 0)]); - -// ./test/core/i32.wast:95 -assert_return(() => invoke($0, `div_u`, [-5, -2]), [value("i32", 0)]); - -// ./test/core/i32.wast:96 -assert_return(() => invoke($0, `div_u`, [7, 3]), [value("i32", 2)]); - -// ./test/core/i32.wast:97 -assert_return(() => invoke($0, `div_u`, [11, 5]), [value("i32", 2)]); - -// ./test/core/i32.wast:98 -assert_return(() => invoke($0, `div_u`, [17, 7]), [value("i32", 2)]); - -// ./test/core/i32.wast:100 -assert_trap(() => invoke($0, `rem_s`, [1, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:101 -assert_trap(() => invoke($0, `rem_s`, [0, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:102 -assert_return(() => invoke($0, `rem_s`, [2147483647, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:103 -assert_return(() => invoke($0, `rem_s`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:104 -assert_return(() => invoke($0, `rem_s`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:105 -assert_return(() => invoke($0, `rem_s`, [0, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:106 -assert_return(() => invoke($0, `rem_s`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:107 -assert_return(() => invoke($0, `rem_s`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:108 -assert_return(() => invoke($0, `rem_s`, [-2147483648, 2]), [value("i32", 0)]); - -// ./test/core/i32.wast:109 -assert_return(() => invoke($0, `rem_s`, [-2147483647, 1000]), [ - value("i32", -647), -]); - -// ./test/core/i32.wast:110 -assert_return(() => invoke($0, `rem_s`, [5, 2]), [value("i32", 1)]); - -// ./test/core/i32.wast:111 -assert_return(() => invoke($0, `rem_s`, [-5, 2]), [value("i32", -1)]); - -// ./test/core/i32.wast:112 -assert_return(() => invoke($0, `rem_s`, [5, -2]), [value("i32", 1)]); - -// ./test/core/i32.wast:113 -assert_return(() => invoke($0, `rem_s`, [-5, -2]), [value("i32", -1)]); - -// ./test/core/i32.wast:114 -assert_return(() => invoke($0, `rem_s`, [7, 3]), [value("i32", 1)]); - -// ./test/core/i32.wast:115 -assert_return(() => invoke($0, `rem_s`, [-7, 3]), [value("i32", -1)]); - -// ./test/core/i32.wast:116 -assert_return(() => invoke($0, `rem_s`, [7, -3]), [value("i32", 1)]); - -// ./test/core/i32.wast:117 -assert_return(() => invoke($0, `rem_s`, [-7, -3]), [value("i32", -1)]); - -// ./test/core/i32.wast:118 -assert_return(() => invoke($0, `rem_s`, [11, 5]), [value("i32", 1)]); - -// ./test/core/i32.wast:119 -assert_return(() => invoke($0, `rem_s`, [17, 7]), [value("i32", 3)]); - -// ./test/core/i32.wast:121 -assert_trap(() => invoke($0, `rem_u`, [1, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:122 -assert_trap(() => invoke($0, `rem_u`, [0, 0]), `integer divide by zero`); - -// ./test/core/i32.wast:123 -assert_return(() => invoke($0, `rem_u`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:124 -assert_return(() => invoke($0, `rem_u`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:125 -assert_return(() => invoke($0, `rem_u`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:126 -assert_return(() => invoke($0, `rem_u`, [-2147483648, -1]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:127 -assert_return(() => invoke($0, `rem_u`, [-2147483648, 2]), [value("i32", 0)]); - -// ./test/core/i32.wast:128 -assert_return(() => invoke($0, `rem_u`, [-1880092688, 65537]), [ - value("i32", 32769), -]); - -// ./test/core/i32.wast:129 -assert_return(() => invoke($0, `rem_u`, [-2147483647, 1000]), [ - value("i32", 649), -]); - -// ./test/core/i32.wast:130 -assert_return(() => invoke($0, `rem_u`, [5, 2]), [value("i32", 1)]); - -// ./test/core/i32.wast:131 -assert_return(() => invoke($0, `rem_u`, [-5, 2]), [value("i32", 1)]); - -// ./test/core/i32.wast:132 -assert_return(() => invoke($0, `rem_u`, [5, -2]), [value("i32", 5)]); - -// ./test/core/i32.wast:133 -assert_return(() => invoke($0, `rem_u`, [-5, -2]), [value("i32", -5)]); - -// ./test/core/i32.wast:134 -assert_return(() => invoke($0, `rem_u`, [7, 3]), [value("i32", 1)]); - -// ./test/core/i32.wast:135 -assert_return(() => invoke($0, `rem_u`, [11, 5]), [value("i32", 1)]); - -// ./test/core/i32.wast:136 -assert_return(() => invoke($0, `rem_u`, [17, 7]), [value("i32", 3)]); - -// ./test/core/i32.wast:138 -assert_return(() => invoke($0, `and`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:139 -assert_return(() => invoke($0, `and`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:140 -assert_return(() => invoke($0, `and`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:141 -assert_return(() => invoke($0, `and`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:142 -assert_return(() => invoke($0, `and`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:143 -assert_return(() => invoke($0, `and`, [2147483647, -1]), [ - value("i32", 2147483647), -]); - -// ./test/core/i32.wast:144 -assert_return(() => invoke($0, `and`, [-252641281, -3856]), [ - value("i32", -252645136), -]); - -// ./test/core/i32.wast:145 -assert_return(() => invoke($0, `and`, [-1, -1]), [value("i32", -1)]); - -// ./test/core/i32.wast:147 -assert_return(() => invoke($0, `or`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:148 -assert_return(() => invoke($0, `or`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:149 -assert_return(() => invoke($0, `or`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:150 -assert_return(() => invoke($0, `or`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:151 -assert_return(() => invoke($0, `or`, [2147483647, -2147483648]), [ - value("i32", -1), -]); - -// ./test/core/i32.wast:152 -assert_return(() => invoke($0, `or`, [-2147483648, 0]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:153 -assert_return(() => invoke($0, `or`, [-252641281, -3856]), [value("i32", -1)]); - -// ./test/core/i32.wast:154 -assert_return(() => invoke($0, `or`, [-1, -1]), [value("i32", -1)]); - -// ./test/core/i32.wast:156 -assert_return(() => invoke($0, `xor`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:157 -assert_return(() => invoke($0, `xor`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:158 -assert_return(() => invoke($0, `xor`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:159 -assert_return(() => invoke($0, `xor`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:160 -assert_return(() => invoke($0, `xor`, [2147483647, -2147483648]), [ - value("i32", -1), -]); - -// ./test/core/i32.wast:161 -assert_return(() => invoke($0, `xor`, [-2147483648, 0]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:162 -assert_return(() => invoke($0, `xor`, [-1, -2147483648]), [ - value("i32", 2147483647), -]); - -// ./test/core/i32.wast:163 -assert_return(() => invoke($0, `xor`, [-1, 2147483647]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:164 -assert_return(() => invoke($0, `xor`, [-252641281, -3856]), [ - value("i32", 252645135), -]); - -// ./test/core/i32.wast:165 -assert_return(() => invoke($0, `xor`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:167 -assert_return(() => invoke($0, `shl`, [1, 1]), [value("i32", 2)]); - -// ./test/core/i32.wast:168 -assert_return(() => invoke($0, `shl`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:169 -assert_return(() => invoke($0, `shl`, [2147483647, 1]), [value("i32", -2)]); - -// ./test/core/i32.wast:170 -assert_return(() => invoke($0, `shl`, [-1, 1]), [value("i32", -2)]); - -// ./test/core/i32.wast:171 -assert_return(() => invoke($0, `shl`, [-2147483648, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:172 -assert_return(() => invoke($0, `shl`, [1073741824, 1]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:173 -assert_return(() => invoke($0, `shl`, [1, 31]), [value("i32", -2147483648)]); - -// ./test/core/i32.wast:174 -assert_return(() => invoke($0, `shl`, [1, 32]), [value("i32", 1)]); - -// ./test/core/i32.wast:175 -assert_return(() => invoke($0, `shl`, [1, 33]), [value("i32", 2)]); - -// ./test/core/i32.wast:176 -assert_return(() => invoke($0, `shl`, [1, -1]), [value("i32", -2147483648)]); - -// ./test/core/i32.wast:177 -assert_return(() => invoke($0, `shl`, [1, 2147483647]), [ - value("i32", -2147483648), -]); - -// ./test/core/i32.wast:179 -assert_return(() => invoke($0, `shr_s`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:180 -assert_return(() => invoke($0, `shr_s`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:181 -assert_return(() => invoke($0, `shr_s`, [-1, 1]), [value("i32", -1)]); - -// ./test/core/i32.wast:182 -assert_return(() => invoke($0, `shr_s`, [2147483647, 1]), [ - value("i32", 1073741823), -]); - -// ./test/core/i32.wast:183 -assert_return(() => invoke($0, `shr_s`, [-2147483648, 1]), [ - value("i32", -1073741824), -]); - -// ./test/core/i32.wast:184 -assert_return(() => invoke($0, `shr_s`, [1073741824, 1]), [ - value("i32", 536870912), -]); - -// ./test/core/i32.wast:185 -assert_return(() => invoke($0, `shr_s`, [1, 32]), [value("i32", 1)]); - -// ./test/core/i32.wast:186 -assert_return(() => invoke($0, `shr_s`, [1, 33]), [value("i32", 0)]); - -// ./test/core/i32.wast:187 -assert_return(() => invoke($0, `shr_s`, [1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:188 -assert_return(() => invoke($0, `shr_s`, [1, 2147483647]), [value("i32", 0)]); - -// ./test/core/i32.wast:189 -assert_return(() => invoke($0, `shr_s`, [1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:190 -assert_return(() => invoke($0, `shr_s`, [-2147483648, 31]), [value("i32", -1)]); - -// ./test/core/i32.wast:191 -assert_return(() => invoke($0, `shr_s`, [-1, 32]), [value("i32", -1)]); - -// ./test/core/i32.wast:192 -assert_return(() => invoke($0, `shr_s`, [-1, 33]), [value("i32", -1)]); - -// ./test/core/i32.wast:193 -assert_return(() => invoke($0, `shr_s`, [-1, -1]), [value("i32", -1)]); - -// ./test/core/i32.wast:194 -assert_return(() => invoke($0, `shr_s`, [-1, 2147483647]), [value("i32", -1)]); - -// ./test/core/i32.wast:195 -assert_return(() => invoke($0, `shr_s`, [-1, -2147483648]), [value("i32", -1)]); - -// ./test/core/i32.wast:197 -assert_return(() => invoke($0, `shr_u`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:198 -assert_return(() => invoke($0, `shr_u`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:199 -assert_return(() => invoke($0, `shr_u`, [-1, 1]), [value("i32", 2147483647)]); - -// ./test/core/i32.wast:200 -assert_return(() => invoke($0, `shr_u`, [2147483647, 1]), [ - value("i32", 1073741823), -]); - -// ./test/core/i32.wast:201 -assert_return(() => invoke($0, `shr_u`, [-2147483648, 1]), [ - value("i32", 1073741824), -]); - -// ./test/core/i32.wast:202 -assert_return(() => invoke($0, `shr_u`, [1073741824, 1]), [ - value("i32", 536870912), -]); - -// ./test/core/i32.wast:203 -assert_return(() => invoke($0, `shr_u`, [1, 32]), [value("i32", 1)]); - -// ./test/core/i32.wast:204 -assert_return(() => invoke($0, `shr_u`, [1, 33]), [value("i32", 0)]); - -// ./test/core/i32.wast:205 -assert_return(() => invoke($0, `shr_u`, [1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:206 -assert_return(() => invoke($0, `shr_u`, [1, 2147483647]), [value("i32", 0)]); - -// ./test/core/i32.wast:207 -assert_return(() => invoke($0, `shr_u`, [1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:208 -assert_return(() => invoke($0, `shr_u`, [-2147483648, 31]), [value("i32", 1)]); - -// ./test/core/i32.wast:209 -assert_return(() => invoke($0, `shr_u`, [-1, 32]), [value("i32", -1)]); - -// ./test/core/i32.wast:210 -assert_return(() => invoke($0, `shr_u`, [-1, 33]), [value("i32", 2147483647)]); - -// ./test/core/i32.wast:211 -assert_return(() => invoke($0, `shr_u`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:212 -assert_return(() => invoke($0, `shr_u`, [-1, 2147483647]), [value("i32", 1)]); - -// ./test/core/i32.wast:213 -assert_return(() => invoke($0, `shr_u`, [-1, -2147483648]), [value("i32", -1)]); - -// ./test/core/i32.wast:215 -assert_return(() => invoke($0, `rotl`, [1, 1]), [value("i32", 2)]); - -// ./test/core/i32.wast:216 -assert_return(() => invoke($0, `rotl`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:217 -assert_return(() => invoke($0, `rotl`, [-1, 1]), [value("i32", -1)]); - -// ./test/core/i32.wast:218 -assert_return(() => invoke($0, `rotl`, [1, 32]), [value("i32", 1)]); - -// ./test/core/i32.wast:219 -assert_return(() => invoke($0, `rotl`, [-1412589450, 1]), [ - value("i32", 1469788397), -]); - -// ./test/core/i32.wast:220 -assert_return(() => invoke($0, `rotl`, [-33498112, 4]), [ - value("i32", -535969777), -]); - -// ./test/core/i32.wast:221 -assert_return(() => invoke($0, `rotl`, [-1329474845, 5]), [ - value("i32", 406477942), -]); - -// ./test/core/i32.wast:222 -assert_return(() => invoke($0, `rotl`, [32768, 37]), [value("i32", 1048576)]); - -// ./test/core/i32.wast:223 -assert_return(() => invoke($0, `rotl`, [-1329474845, 65285]), [ - value("i32", 406477942), -]); - -// ./test/core/i32.wast:224 -assert_return(() => invoke($0, `rotl`, [1989852383, -19]), [ - value("i32", 1469837011), -]); - -// ./test/core/i32.wast:225 -assert_return(() => invoke($0, `rotl`, [1989852383, -2147483635]), [ - value("i32", 1469837011), -]); - -// ./test/core/i32.wast:226 -assert_return(() => invoke($0, `rotl`, [1, 31]), [value("i32", -2147483648)]); - -// ./test/core/i32.wast:227 -assert_return(() => invoke($0, `rotl`, [-2147483648, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:229 -assert_return(() => invoke($0, `rotr`, [1, 1]), [value("i32", -2147483648)]); - -// ./test/core/i32.wast:230 -assert_return(() => invoke($0, `rotr`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:231 -assert_return(() => invoke($0, `rotr`, [-1, 1]), [value("i32", -1)]); - -// ./test/core/i32.wast:232 -assert_return(() => invoke($0, `rotr`, [1, 32]), [value("i32", 1)]); - -// ./test/core/i32.wast:233 -assert_return(() => invoke($0, `rotr`, [-16724992, 1]), [ - value("i32", 2139121152), -]); - -// ./test/core/i32.wast:234 -assert_return(() => invoke($0, `rotr`, [524288, 4]), [value("i32", 32768)]); - -// ./test/core/i32.wast:235 -assert_return(() => invoke($0, `rotr`, [-1329474845, 5]), [ - value("i32", 495324823), -]); - -// ./test/core/i32.wast:236 -assert_return(() => invoke($0, `rotr`, [32768, 37]), [value("i32", 1024)]); - -// ./test/core/i32.wast:237 -assert_return(() => invoke($0, `rotr`, [-1329474845, 65285]), [ - value("i32", 495324823), -]); - -// ./test/core/i32.wast:238 -assert_return(() => invoke($0, `rotr`, [1989852383, -19]), [ - value("i32", -419711787), -]); - -// ./test/core/i32.wast:239 -assert_return(() => invoke($0, `rotr`, [1989852383, -2147483635]), [ - value("i32", -419711787), -]); - -// ./test/core/i32.wast:240 -assert_return(() => invoke($0, `rotr`, [1, 31]), [value("i32", 2)]); - -// ./test/core/i32.wast:241 -assert_return(() => invoke($0, `rotr`, [-2147483648, 31]), [value("i32", 1)]); - -// ./test/core/i32.wast:243 -assert_return(() => invoke($0, `clz`, [-1]), [value("i32", 0)]); - -// ./test/core/i32.wast:244 -assert_return(() => invoke($0, `clz`, [0]), [value("i32", 32)]); - -// ./test/core/i32.wast:245 -assert_return(() => invoke($0, `clz`, [32768]), [value("i32", 16)]); - -// ./test/core/i32.wast:246 -assert_return(() => invoke($0, `clz`, [255]), [value("i32", 24)]); - -// ./test/core/i32.wast:247 -assert_return(() => invoke($0, `clz`, [-2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:248 -assert_return(() => invoke($0, `clz`, [1]), [value("i32", 31)]); - -// ./test/core/i32.wast:249 -assert_return(() => invoke($0, `clz`, [2]), [value("i32", 30)]); - -// ./test/core/i32.wast:250 -assert_return(() => invoke($0, `clz`, [2147483647]), [value("i32", 1)]); - -// ./test/core/i32.wast:252 -assert_return(() => invoke($0, `ctz`, [-1]), [value("i32", 0)]); - -// ./test/core/i32.wast:253 -assert_return(() => invoke($0, `ctz`, [0]), [value("i32", 32)]); - -// ./test/core/i32.wast:254 -assert_return(() => invoke($0, `ctz`, [32768]), [value("i32", 15)]); - -// ./test/core/i32.wast:255 -assert_return(() => invoke($0, `ctz`, [65536]), [value("i32", 16)]); - -// ./test/core/i32.wast:256 -assert_return(() => invoke($0, `ctz`, [-2147483648]), [value("i32", 31)]); - -// ./test/core/i32.wast:257 -assert_return(() => invoke($0, `ctz`, [2147483647]), [value("i32", 0)]); - -// ./test/core/i32.wast:259 -assert_return(() => invoke($0, `popcnt`, [-1]), [value("i32", 32)]); - -// ./test/core/i32.wast:260 -assert_return(() => invoke($0, `popcnt`, [0]), [value("i32", 0)]); - -// ./test/core/i32.wast:261 -assert_return(() => invoke($0, `popcnt`, [32768]), [value("i32", 1)]); - -// ./test/core/i32.wast:262 -assert_return(() => invoke($0, `popcnt`, [-2147450880]), [value("i32", 2)]); - -// ./test/core/i32.wast:263 -assert_return(() => invoke($0, `popcnt`, [2147483647]), [value("i32", 31)]); - -// ./test/core/i32.wast:264 -assert_return(() => invoke($0, `popcnt`, [-1431655766]), [value("i32", 16)]); - -// ./test/core/i32.wast:265 -assert_return(() => invoke($0, `popcnt`, [1431655765]), [value("i32", 16)]); - -// ./test/core/i32.wast:266 -assert_return(() => invoke($0, `popcnt`, [-559038737]), [value("i32", 24)]); - -// ./test/core/i32.wast:268 -assert_return(() => invoke($0, `eqz`, [0]), [value("i32", 1)]); - -// ./test/core/i32.wast:269 -assert_return(() => invoke($0, `eqz`, [1]), [value("i32", 0)]); - -// ./test/core/i32.wast:270 -assert_return(() => invoke($0, `eqz`, [-2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:271 -assert_return(() => invoke($0, `eqz`, [2147483647]), [value("i32", 0)]); - -// ./test/core/i32.wast:272 -assert_return(() => invoke($0, `eqz`, [-1]), [value("i32", 0)]); - -// ./test/core/i32.wast:274 -assert_return(() => invoke($0, `eq`, [0, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:275 -assert_return(() => invoke($0, `eq`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:276 -assert_return(() => invoke($0, `eq`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:277 -assert_return(() => invoke($0, `eq`, [-2147483648, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:278 -assert_return(() => invoke($0, `eq`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:279 -assert_return(() => invoke($0, `eq`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:280 -assert_return(() => invoke($0, `eq`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:281 -assert_return(() => invoke($0, `eq`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:282 -assert_return(() => invoke($0, `eq`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:283 -assert_return(() => invoke($0, `eq`, [0, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:284 -assert_return(() => invoke($0, `eq`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:285 -assert_return(() => invoke($0, `eq`, [-1, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:286 -assert_return(() => invoke($0, `eq`, [-2147483648, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:287 -assert_return(() => invoke($0, `eq`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:289 -assert_return(() => invoke($0, `ne`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:290 -assert_return(() => invoke($0, `ne`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:291 -assert_return(() => invoke($0, `ne`, [-1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:292 -assert_return(() => invoke($0, `ne`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:293 -assert_return(() => invoke($0, `ne`, [2147483647, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:294 -assert_return(() => invoke($0, `ne`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:295 -assert_return(() => invoke($0, `ne`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:296 -assert_return(() => invoke($0, `ne`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:297 -assert_return(() => invoke($0, `ne`, [-2147483648, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:298 -assert_return(() => invoke($0, `ne`, [0, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:299 -assert_return(() => invoke($0, `ne`, [-2147483648, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:300 -assert_return(() => invoke($0, `ne`, [-1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:301 -assert_return(() => invoke($0, `ne`, [-2147483648, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:302 -assert_return(() => invoke($0, `ne`, [2147483647, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:304 -assert_return(() => invoke($0, `lt_s`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:305 -assert_return(() => invoke($0, `lt_s`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:306 -assert_return(() => invoke($0, `lt_s`, [-1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:307 -assert_return(() => invoke($0, `lt_s`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:308 -assert_return(() => invoke($0, `lt_s`, [2147483647, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:309 -assert_return(() => invoke($0, `lt_s`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:310 -assert_return(() => invoke($0, `lt_s`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:311 -assert_return(() => invoke($0, `lt_s`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:312 -assert_return(() => invoke($0, `lt_s`, [-2147483648, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:313 -assert_return(() => invoke($0, `lt_s`, [0, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:314 -assert_return(() => invoke($0, `lt_s`, [-2147483648, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:315 -assert_return(() => invoke($0, `lt_s`, [-1, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:316 -assert_return(() => invoke($0, `lt_s`, [-2147483648, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:317 -assert_return(() => invoke($0, `lt_s`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:319 -assert_return(() => invoke($0, `lt_u`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:320 -assert_return(() => invoke($0, `lt_u`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:321 -assert_return(() => invoke($0, `lt_u`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:322 -assert_return(() => invoke($0, `lt_u`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:323 -assert_return(() => invoke($0, `lt_u`, [2147483647, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:324 -assert_return(() => invoke($0, `lt_u`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:325 -assert_return(() => invoke($0, `lt_u`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:326 -assert_return(() => invoke($0, `lt_u`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:327 -assert_return(() => invoke($0, `lt_u`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:328 -assert_return(() => invoke($0, `lt_u`, [0, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:329 -assert_return(() => invoke($0, `lt_u`, [-2147483648, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:330 -assert_return(() => invoke($0, `lt_u`, [-1, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:331 -assert_return(() => invoke($0, `lt_u`, [-2147483648, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:332 -assert_return(() => invoke($0, `lt_u`, [2147483647, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:334 -assert_return(() => invoke($0, `le_s`, [0, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:335 -assert_return(() => invoke($0, `le_s`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:336 -assert_return(() => invoke($0, `le_s`, [-1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:337 -assert_return(() => invoke($0, `le_s`, [-2147483648, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:338 -assert_return(() => invoke($0, `le_s`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:339 -assert_return(() => invoke($0, `le_s`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:340 -assert_return(() => invoke($0, `le_s`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:341 -assert_return(() => invoke($0, `le_s`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:342 -assert_return(() => invoke($0, `le_s`, [-2147483648, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:343 -assert_return(() => invoke($0, `le_s`, [0, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:344 -assert_return(() => invoke($0, `le_s`, [-2147483648, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:345 -assert_return(() => invoke($0, `le_s`, [-1, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:346 -assert_return(() => invoke($0, `le_s`, [-2147483648, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:347 -assert_return(() => invoke($0, `le_s`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:349 -assert_return(() => invoke($0, `le_u`, [0, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:350 -assert_return(() => invoke($0, `le_u`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:351 -assert_return(() => invoke($0, `le_u`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:352 -assert_return(() => invoke($0, `le_u`, [-2147483648, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:353 -assert_return(() => invoke($0, `le_u`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:354 -assert_return(() => invoke($0, `le_u`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:355 -assert_return(() => invoke($0, `le_u`, [1, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:356 -assert_return(() => invoke($0, `le_u`, [0, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:357 -assert_return(() => invoke($0, `le_u`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:358 -assert_return(() => invoke($0, `le_u`, [0, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:359 -assert_return(() => invoke($0, `le_u`, [-2147483648, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:360 -assert_return(() => invoke($0, `le_u`, [-1, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:361 -assert_return(() => invoke($0, `le_u`, [-2147483648, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:362 -assert_return(() => invoke($0, `le_u`, [2147483647, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:364 -assert_return(() => invoke($0, `gt_s`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:365 -assert_return(() => invoke($0, `gt_s`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:366 -assert_return(() => invoke($0, `gt_s`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:367 -assert_return(() => invoke($0, `gt_s`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:368 -assert_return(() => invoke($0, `gt_s`, [2147483647, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:369 -assert_return(() => invoke($0, `gt_s`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:370 -assert_return(() => invoke($0, `gt_s`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:371 -assert_return(() => invoke($0, `gt_s`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:372 -assert_return(() => invoke($0, `gt_s`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:373 -assert_return(() => invoke($0, `gt_s`, [0, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:374 -assert_return(() => invoke($0, `gt_s`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:375 -assert_return(() => invoke($0, `gt_s`, [-1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:376 -assert_return(() => invoke($0, `gt_s`, [-2147483648, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:377 -assert_return(() => invoke($0, `gt_s`, [2147483647, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:379 -assert_return(() => invoke($0, `gt_u`, [0, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:380 -assert_return(() => invoke($0, `gt_u`, [1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:381 -assert_return(() => invoke($0, `gt_u`, [-1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:382 -assert_return(() => invoke($0, `gt_u`, [-2147483648, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:383 -assert_return(() => invoke($0, `gt_u`, [2147483647, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:384 -assert_return(() => invoke($0, `gt_u`, [-1, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:385 -assert_return(() => invoke($0, `gt_u`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:386 -assert_return(() => invoke($0, `gt_u`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:387 -assert_return(() => invoke($0, `gt_u`, [-2147483648, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:388 -assert_return(() => invoke($0, `gt_u`, [0, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:389 -assert_return(() => invoke($0, `gt_u`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:390 -assert_return(() => invoke($0, `gt_u`, [-1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:391 -assert_return(() => invoke($0, `gt_u`, [-2147483648, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:392 -assert_return(() => invoke($0, `gt_u`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:394 -assert_return(() => invoke($0, `ge_s`, [0, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:395 -assert_return(() => invoke($0, `ge_s`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:396 -assert_return(() => invoke($0, `ge_s`, [-1, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:397 -assert_return(() => invoke($0, `ge_s`, [-2147483648, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:398 -assert_return(() => invoke($0, `ge_s`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:399 -assert_return(() => invoke($0, `ge_s`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:400 -assert_return(() => invoke($0, `ge_s`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:401 -assert_return(() => invoke($0, `ge_s`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:402 -assert_return(() => invoke($0, `ge_s`, [-2147483648, 0]), [value("i32", 0)]); - -// ./test/core/i32.wast:403 -assert_return(() => invoke($0, `ge_s`, [0, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:404 -assert_return(() => invoke($0, `ge_s`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:405 -assert_return(() => invoke($0, `ge_s`, [-1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:406 -assert_return(() => invoke($0, `ge_s`, [-2147483648, 2147483647]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:407 -assert_return(() => invoke($0, `ge_s`, [2147483647, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:409 -assert_return(() => invoke($0, `ge_u`, [0, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:410 -assert_return(() => invoke($0, `ge_u`, [1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:411 -assert_return(() => invoke($0, `ge_u`, [-1, 1]), [value("i32", 1)]); - -// ./test/core/i32.wast:412 -assert_return(() => invoke($0, `ge_u`, [-2147483648, -2147483648]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:413 -assert_return(() => invoke($0, `ge_u`, [2147483647, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:414 -assert_return(() => invoke($0, `ge_u`, [-1, -1]), [value("i32", 1)]); - -// ./test/core/i32.wast:415 -assert_return(() => invoke($0, `ge_u`, [1, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:416 -assert_return(() => invoke($0, `ge_u`, [0, 1]), [value("i32", 0)]); - -// ./test/core/i32.wast:417 -assert_return(() => invoke($0, `ge_u`, [-2147483648, 0]), [value("i32", 1)]); - -// ./test/core/i32.wast:418 -assert_return(() => invoke($0, `ge_u`, [0, -2147483648]), [value("i32", 0)]); - -// ./test/core/i32.wast:419 -assert_return(() => invoke($0, `ge_u`, [-2147483648, -1]), [value("i32", 0)]); - -// ./test/core/i32.wast:420 -assert_return(() => invoke($0, `ge_u`, [-1, -2147483648]), [value("i32", 1)]); - -// ./test/core/i32.wast:421 -assert_return(() => invoke($0, `ge_u`, [-2147483648, 2147483647]), [ - value("i32", 1), -]); - -// ./test/core/i32.wast:422 -assert_return(() => invoke($0, `ge_u`, [2147483647, -2147483648]), [ - value("i32", 0), -]); - -// ./test/core/i32.wast:425 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty - (i32.eqz) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:433 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-block - (i32.const 0) - (block (i32.eqz) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:442 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-loop - (i32.const 0) - (loop (i32.eqz) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:451 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-if - (i32.const 0) (i32.const 0) - (if (then (i32.eqz) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:460 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-else - (i32.const 0) (i32.const 0) - (if (result i32) (then (i32.const 0)) (else (i32.eqz))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:469 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-br - (i32.const 0) - (block (br 0 (i32.eqz)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:478 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-br_if - (i32.const 0) - (block (br_if 0 (i32.eqz) (i32.const 1)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:487 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-br_table - (i32.const 0) - (block (br_table 0 (i32.eqz)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:496 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-return - (return (i32.eqz)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:504 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-select - (select (i32.eqz) (i32.const 1) (i32.const 2)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:512 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-call - (call 1 (i32.eqz)) (drop) - ) - (func (param i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/i32.wast:521 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-unary-operand-empty-in-call_indirect - (block (result i32) - (call_indirect (type $$sig) - (i32.eqz) (i32.const 0) - ) - (drop) - ) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:537 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-local.set - (local i32) - (local.set 0 (i32.eqz)) (local.get 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:546 -assert_invalid(() => - instantiate(`(module - (func $$type-unary-operand-empty-in-local.tee - (local i32) - (local.tee 0 (i32.eqz)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:555 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-unary-operand-empty-in-global.set - (global.set $$x (i32.eqz)) (global.get $$x) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:564 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-unary-operand-empty-in-memory.grow - (memory.grow (i32.eqz)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:573 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-unary-operand-empty-in-load - (i32.load (i32.eqz)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:582 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-unary-operand-empty-in-store - (i32.store (i32.eqz) (i32.const 1)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:592 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty - (i32.add) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:600 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty - (i32.const 0) (i32.add) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:608 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-block - (i32.const 0) (i32.const 0) - (block (i32.add) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:617 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-block - (i32.const 0) - (block (i32.const 0) (i32.add) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:626 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-loop - (i32.const 0) (i32.const 0) - (loop (i32.add) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:635 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-loop - (i32.const 0) - (loop (i32.const 0) (i32.add) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:644 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-if - (i32.const 0) (i32.const 0) (i32.const 0) - (if (i32.add) (then (drop))) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:653 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-if - (i32.const 0) (i32.const 0) - (if (i32.const 0) (then (i32.add)) (else (drop))) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:662 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-else - (i32.const 0) (i32.const 0) (i32.const 0) - (if (result i32) (then (i32.const 0)) (else (i32.add) (i32.const 0))) - (drop) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:672 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-else - (i32.const 0) (i32.const 0) - (if (result i32) (then (i32.const 0)) (else (i32.add))) - (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:682 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-br - (i32.const 0) (i32.const 0) - (block (br 0 (i32.add)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:691 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-br - (i32.const 0) - (block (br 0 (i32.const 0) (i32.add)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:700 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-br_if - (i32.const 0) (i32.const 0) - (block (br_if 0 (i32.add) (i32.const 1)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:709 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-br_if - (i32.const 0) - (block (br_if 0 (i32.const 0) (i32.add) (i32.const 1)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:718 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-br_table - (i32.const 0) (i32.const 0) - (block (br_table 0 (i32.add)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:727 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-br_table - (i32.const 0) - (block (br_table 0 (i32.const 0) (i32.add)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:736 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-return - (return (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:744 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-return - (return (i32.const 0) (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:752 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-select - (select (i32.add) (i32.const 1) (i32.const 2)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:760 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-select - (select (i32.const 0) (i32.add) (i32.const 1) (i32.const 2)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:768 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-call - (call 1 (i32.add)) (drop) - ) - (func (param i32 i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/i32.wast:777 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-call - (call 1 (i32.const 0) (i32.add)) (drop) - ) - (func (param i32 i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/i32.wast:786 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-binary-1st-operand-empty-in-call_indirect - (block (result i32) - (call_indirect (type $$sig) - (i32.add) (i32.const 0) - ) - (drop) - ) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:802 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-binary-2nd-operand-empty-in-call_indirect - (block (result i32) - (call_indirect (type $$sig) - (i32.const 0) (i32.add) (i32.const 0) - ) - (drop) - ) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:818 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-local.set - (local i32) - (local.set 0 (i32.add)) (local.get 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:827 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-local.set - (local i32) - (local.set 0 (i32.const 0) (i32.add)) (local.get 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:836 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-1st-operand-empty-in-local.tee - (local i32) - (local.tee 0 (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:845 -assert_invalid(() => - instantiate(`(module - (func $$type-binary-2nd-operand-empty-in-local.tee - (local i32) - (local.tee 0 (i32.const 0) (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:854 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-binary-1st-operand-empty-in-global.set - (global.set $$x (i32.add)) (global.get $$x) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:863 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-binary-2nd-operand-empty-in-global.set - (global.set $$x (i32.const 0) (i32.add)) (global.get $$x) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:872 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-binary-1st-operand-empty-in-memory.grow - (memory.grow (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:881 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-binary-2nd-operand-empty-in-memory.grow - (memory.grow (i32.const 0) (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:890 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-binary-1st-operand-empty-in-load - (i32.load (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:899 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-binary-2nd-operand-empty-in-load - (i32.load (i32.const 0) (i32.add)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:908 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-binary-1st-operand-empty-in-store - (i32.store (i32.add) (i32.const 1)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:917 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-binary-2nd-operand-empty-in-store - (i32.store (i32.const 1) (i32.add) (i32.const 0)) - ) - )`), `type mismatch`); - -// ./test/core/i32.wast:930 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.add (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:931 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.and (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:932 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.div_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:933 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.div_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:934 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.mul (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:935 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.or (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:936 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.rem_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:937 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.rem_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:938 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.rotl (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:939 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.rotr (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:940 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.shl (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:941 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.shr_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:942 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.shr_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:943 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.sub (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:944 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.xor (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:945 -assert_invalid( - () => instantiate(`(module (func (result i32) (i32.eqz (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/i32.wast:946 -assert_invalid( - () => instantiate(`(module (func (result i32) (i32.clz (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/i32.wast:947 -assert_invalid( - () => instantiate(`(module (func (result i32) (i32.ctz (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/i32.wast:948 -assert_invalid( - () => instantiate(`(module (func (result i32) (i32.popcnt (i64.const 0))))`), - `type mismatch`, -); - -// ./test/core/i32.wast:949 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.eq (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:950 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.ge_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:951 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.ge_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:952 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.gt_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:953 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.gt_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:954 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.le_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:955 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.le_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:956 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.lt_s (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:957 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.lt_u (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i32.wast:958 -assert_invalid( - () => - instantiate( - `(module (func (result i32) (i32.ne (i64.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/i64.wast.js b/js/src/jit-test/tests/wasm/spec/threads/i64.wast.js deleted file mode 100644 index 03b6eeb0989f..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/i64.wast.js +++ /dev/null @@ -1,1779 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/i64.wast - -// ./test/core/i64.wast:3 -let $0 = instantiate(`(module - (func (export "add") (param $$x i64) (param $$y i64) (result i64) (i64.add (local.get $$x) (local.get $$y))) - (func (export "sub") (param $$x i64) (param $$y i64) (result i64) (i64.sub (local.get $$x) (local.get $$y))) - (func (export "mul") (param $$x i64) (param $$y i64) (result i64) (i64.mul (local.get $$x) (local.get $$y))) - (func (export "div_s") (param $$x i64) (param $$y i64) (result i64) (i64.div_s (local.get $$x) (local.get $$y))) - (func (export "div_u") (param $$x i64) (param $$y i64) (result i64) (i64.div_u (local.get $$x) (local.get $$y))) - (func (export "rem_s") (param $$x i64) (param $$y i64) (result i64) (i64.rem_s (local.get $$x) (local.get $$y))) - (func (export "rem_u") (param $$x i64) (param $$y i64) (result i64) (i64.rem_u (local.get $$x) (local.get $$y))) - (func (export "and") (param $$x i64) (param $$y i64) (result i64) (i64.and (local.get $$x) (local.get $$y))) - (func (export "or") (param $$x i64) (param $$y i64) (result i64) (i64.or (local.get $$x) (local.get $$y))) - (func (export "xor") (param $$x i64) (param $$y i64) (result i64) (i64.xor (local.get $$x) (local.get $$y))) - (func (export "shl") (param $$x i64) (param $$y i64) (result i64) (i64.shl (local.get $$x) (local.get $$y))) - (func (export "shr_s") (param $$x i64) (param $$y i64) (result i64) (i64.shr_s (local.get $$x) (local.get $$y))) - (func (export "shr_u") (param $$x i64) (param $$y i64) (result i64) (i64.shr_u (local.get $$x) (local.get $$y))) - (func (export "rotl") (param $$x i64) (param $$y i64) (result i64) (i64.rotl (local.get $$x) (local.get $$y))) - (func (export "rotr") (param $$x i64) (param $$y i64) (result i64) (i64.rotr (local.get $$x) (local.get $$y))) - (func (export "clz") (param $$x i64) (result i64) (i64.clz (local.get $$x))) - (func (export "ctz") (param $$x i64) (result i64) (i64.ctz (local.get $$x))) - (func (export "popcnt") (param $$x i64) (result i64) (i64.popcnt (local.get $$x))) - (func (export "eqz") (param $$x i64) (result i32) (i64.eqz (local.get $$x))) - (func (export "eq") (param $$x i64) (param $$y i64) (result i32) (i64.eq (local.get $$x) (local.get $$y))) - (func (export "ne") (param $$x i64) (param $$y i64) (result i32) (i64.ne (local.get $$x) (local.get $$y))) - (func (export "lt_s") (param $$x i64) (param $$y i64) (result i32) (i64.lt_s (local.get $$x) (local.get $$y))) - (func (export "lt_u") (param $$x i64) (param $$y i64) (result i32) (i64.lt_u (local.get $$x) (local.get $$y))) - (func (export "le_s") (param $$x i64) (param $$y i64) (result i32) (i64.le_s (local.get $$x) (local.get $$y))) - (func (export "le_u") (param $$x i64) (param $$y i64) (result i32) (i64.le_u (local.get $$x) (local.get $$y))) - (func (export "gt_s") (param $$x i64) (param $$y i64) (result i32) (i64.gt_s (local.get $$x) (local.get $$y))) - (func (export "gt_u") (param $$x i64) (param $$y i64) (result i32) (i64.gt_u (local.get $$x) (local.get $$y))) - (func (export "ge_s") (param $$x i64) (param $$y i64) (result i32) (i64.ge_s (local.get $$x) (local.get $$y))) - (func (export "ge_u") (param $$x i64) (param $$y i64) (result i32) (i64.ge_u (local.get $$x) (local.get $$y))) -)`); - -// ./test/core/i64.wast:35 -assert_return(() => invoke($0, `add`, [1n, 1n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:36 -assert_return(() => invoke($0, `add`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:37 -assert_return(() => invoke($0, `add`, [-1n, -1n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:38 -assert_return(() => invoke($0, `add`, [-1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:39 -assert_return(() => invoke($0, `add`, [9223372036854775807n, 1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:40 -assert_return(() => invoke($0, `add`, [-9223372036854775808n, -1n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:41 -assert_return( - () => invoke($0, `add`, [-9223372036854775808n, -9223372036854775808n]), - [value("i64", 0n)], -); - -// ./test/core/i64.wast:42 -assert_return(() => invoke($0, `add`, [1073741823n, 1n]), [ - value("i64", 1073741824n), -]); - -// ./test/core/i64.wast:44 -assert_return(() => invoke($0, `sub`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:45 -assert_return(() => invoke($0, `sub`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:46 -assert_return(() => invoke($0, `sub`, [-1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:47 -assert_return(() => invoke($0, `sub`, [9223372036854775807n, -1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:48 -assert_return(() => invoke($0, `sub`, [-9223372036854775808n, 1n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:49 -assert_return( - () => invoke($0, `sub`, [-9223372036854775808n, -9223372036854775808n]), - [value("i64", 0n)], -); - -// ./test/core/i64.wast:50 -assert_return(() => invoke($0, `sub`, [1073741823n, -1n]), [ - value("i64", 1073741824n), -]); - -// ./test/core/i64.wast:52 -assert_return(() => invoke($0, `mul`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:53 -assert_return(() => invoke($0, `mul`, [1n, 0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:54 -assert_return(() => invoke($0, `mul`, [-1n, -1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:55 -assert_return(() => invoke($0, `mul`, [1152921504606846976n, 4096n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:56 -assert_return(() => invoke($0, `mul`, [-9223372036854775808n, 0n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:57 -assert_return(() => invoke($0, `mul`, [-9223372036854775808n, -1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:58 -assert_return(() => invoke($0, `mul`, [9223372036854775807n, -1n]), [ - value("i64", -9223372036854775807n), -]); - -// ./test/core/i64.wast:59 -assert_return( - () => invoke($0, `mul`, [81985529216486895n, -81985529216486896n]), - [value("i64", 2465395958572223728n)], -); - -// ./test/core/i64.wast:60 -assert_return( - () => invoke($0, `mul`, [9223372036854775807n, 9223372036854775807n]), - [value("i64", 1n)], -); - -// ./test/core/i64.wast:62 -assert_trap(() => invoke($0, `div_s`, [1n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:63 -assert_trap(() => invoke($0, `div_s`, [0n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:64 -assert_trap( - () => invoke($0, `div_s`, [-9223372036854775808n, -1n]), - `integer overflow`, -); - -// ./test/core/i64.wast:65 -assert_trap( - () => invoke($0, `div_s`, [-9223372036854775808n, 0n]), - `integer divide by zero`, -); - -// ./test/core/i64.wast:66 -assert_return(() => invoke($0, `div_s`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:67 -assert_return(() => invoke($0, `div_s`, [0n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:68 -assert_return(() => invoke($0, `div_s`, [0n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:69 -assert_return(() => invoke($0, `div_s`, [-1n, -1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:70 -assert_return(() => invoke($0, `div_s`, [-9223372036854775808n, 2n]), [ - value("i64", -4611686018427387904n), -]); - -// ./test/core/i64.wast:71 -assert_return(() => invoke($0, `div_s`, [-9223372036854775807n, 1000n]), [ - value("i64", -9223372036854775n), -]); - -// ./test/core/i64.wast:72 -assert_return(() => invoke($0, `div_s`, [5n, 2n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:73 -assert_return(() => invoke($0, `div_s`, [-5n, 2n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:74 -assert_return(() => invoke($0, `div_s`, [5n, -2n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:75 -assert_return(() => invoke($0, `div_s`, [-5n, -2n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:76 -assert_return(() => invoke($0, `div_s`, [7n, 3n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:77 -assert_return(() => invoke($0, `div_s`, [-7n, 3n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:78 -assert_return(() => invoke($0, `div_s`, [7n, -3n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:79 -assert_return(() => invoke($0, `div_s`, [-7n, -3n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:80 -assert_return(() => invoke($0, `div_s`, [11n, 5n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:81 -assert_return(() => invoke($0, `div_s`, [17n, 7n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:83 -assert_trap(() => invoke($0, `div_u`, [1n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:84 -assert_trap(() => invoke($0, `div_u`, [0n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:85 -assert_return(() => invoke($0, `div_u`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:86 -assert_return(() => invoke($0, `div_u`, [0n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:87 -assert_return(() => invoke($0, `div_u`, [-1n, -1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:88 -assert_return(() => invoke($0, `div_u`, [-9223372036854775808n, -1n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:89 -assert_return(() => invoke($0, `div_u`, [-9223372036854775808n, 2n]), [ - value("i64", 4611686018427387904n), -]); - -// ./test/core/i64.wast:90 -assert_return(() => invoke($0, `div_u`, [-8074936608141340688n, 4294967297n]), [ - value("i64", 2414874607n), -]); - -// ./test/core/i64.wast:91 -assert_return(() => invoke($0, `div_u`, [-9223372036854775807n, 1000n]), [ - value("i64", 9223372036854775n), -]); - -// ./test/core/i64.wast:92 -assert_return(() => invoke($0, `div_u`, [5n, 2n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:93 -assert_return(() => invoke($0, `div_u`, [-5n, 2n]), [ - value("i64", 9223372036854775805n), -]); - -// ./test/core/i64.wast:94 -assert_return(() => invoke($0, `div_u`, [5n, -2n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:95 -assert_return(() => invoke($0, `div_u`, [-5n, -2n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:96 -assert_return(() => invoke($0, `div_u`, [7n, 3n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:97 -assert_return(() => invoke($0, `div_u`, [11n, 5n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:98 -assert_return(() => invoke($0, `div_u`, [17n, 7n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:100 -assert_trap(() => invoke($0, `rem_s`, [1n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:101 -assert_trap(() => invoke($0, `rem_s`, [0n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:102 -assert_return(() => invoke($0, `rem_s`, [9223372036854775807n, -1n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:103 -assert_return(() => invoke($0, `rem_s`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:104 -assert_return(() => invoke($0, `rem_s`, [0n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:105 -assert_return(() => invoke($0, `rem_s`, [0n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:106 -assert_return(() => invoke($0, `rem_s`, [-1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:107 -assert_return(() => invoke($0, `rem_s`, [-9223372036854775808n, -1n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:108 -assert_return(() => invoke($0, `rem_s`, [-9223372036854775808n, 2n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:109 -assert_return(() => invoke($0, `rem_s`, [-9223372036854775807n, 1000n]), [ - value("i64", -807n), -]); - -// ./test/core/i64.wast:110 -assert_return(() => invoke($0, `rem_s`, [5n, 2n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:111 -assert_return(() => invoke($0, `rem_s`, [-5n, 2n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:112 -assert_return(() => invoke($0, `rem_s`, [5n, -2n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:113 -assert_return(() => invoke($0, `rem_s`, [-5n, -2n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:114 -assert_return(() => invoke($0, `rem_s`, [7n, 3n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:115 -assert_return(() => invoke($0, `rem_s`, [-7n, 3n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:116 -assert_return(() => invoke($0, `rem_s`, [7n, -3n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:117 -assert_return(() => invoke($0, `rem_s`, [-7n, -3n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:118 -assert_return(() => invoke($0, `rem_s`, [11n, 5n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:119 -assert_return(() => invoke($0, `rem_s`, [17n, 7n]), [value("i64", 3n)]); - -// ./test/core/i64.wast:121 -assert_trap(() => invoke($0, `rem_u`, [1n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:122 -assert_trap(() => invoke($0, `rem_u`, [0n, 0n]), `integer divide by zero`); - -// ./test/core/i64.wast:123 -assert_return(() => invoke($0, `rem_u`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:124 -assert_return(() => invoke($0, `rem_u`, [0n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:125 -assert_return(() => invoke($0, `rem_u`, [-1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:126 -assert_return(() => invoke($0, `rem_u`, [-9223372036854775808n, -1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:127 -assert_return(() => invoke($0, `rem_u`, [-9223372036854775808n, 2n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:128 -assert_return(() => invoke($0, `rem_u`, [-8074936608141340688n, 4294967297n]), [ - value("i64", 2147483649n), -]); - -// ./test/core/i64.wast:129 -assert_return(() => invoke($0, `rem_u`, [-9223372036854775807n, 1000n]), [ - value("i64", 809n), -]); - -// ./test/core/i64.wast:130 -assert_return(() => invoke($0, `rem_u`, [5n, 2n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:131 -assert_return(() => invoke($0, `rem_u`, [-5n, 2n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:132 -assert_return(() => invoke($0, `rem_u`, [5n, -2n]), [value("i64", 5n)]); - -// ./test/core/i64.wast:133 -assert_return(() => invoke($0, `rem_u`, [-5n, -2n]), [value("i64", -5n)]); - -// ./test/core/i64.wast:134 -assert_return(() => invoke($0, `rem_u`, [7n, 3n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:135 -assert_return(() => invoke($0, `rem_u`, [11n, 5n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:136 -assert_return(() => invoke($0, `rem_u`, [17n, 7n]), [value("i64", 3n)]); - -// ./test/core/i64.wast:138 -assert_return(() => invoke($0, `and`, [1n, 0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:139 -assert_return(() => invoke($0, `and`, [0n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:140 -assert_return(() => invoke($0, `and`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:141 -assert_return(() => invoke($0, `and`, [0n, 0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:142 -assert_return( - () => invoke($0, `and`, [9223372036854775807n, -9223372036854775808n]), - [value("i64", 0n)], -); - -// ./test/core/i64.wast:143 -assert_return(() => invoke($0, `and`, [9223372036854775807n, -1n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:144 -assert_return(() => invoke($0, `and`, [4042326015n, 4294963440n]), [ - value("i64", 4042322160n), -]); - -// ./test/core/i64.wast:145 -assert_return(() => invoke($0, `and`, [-1n, -1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:147 -assert_return(() => invoke($0, `or`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:148 -assert_return(() => invoke($0, `or`, [0n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:149 -assert_return(() => invoke($0, `or`, [1n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:150 -assert_return(() => invoke($0, `or`, [0n, 0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:151 -assert_return( - () => invoke($0, `or`, [9223372036854775807n, -9223372036854775808n]), - [value("i64", -1n)], -); - -// ./test/core/i64.wast:152 -assert_return(() => invoke($0, `or`, [-9223372036854775808n, 0n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:153 -assert_return(() => invoke($0, `or`, [4042326015n, 4294963440n]), [ - value("i64", 4294967295n), -]); - -// ./test/core/i64.wast:154 -assert_return(() => invoke($0, `or`, [-1n, -1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:156 -assert_return(() => invoke($0, `xor`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:157 -assert_return(() => invoke($0, `xor`, [0n, 1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:158 -assert_return(() => invoke($0, `xor`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:159 -assert_return(() => invoke($0, `xor`, [0n, 0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:160 -assert_return( - () => invoke($0, `xor`, [9223372036854775807n, -9223372036854775808n]), - [value("i64", -1n)], -); - -// ./test/core/i64.wast:161 -assert_return(() => invoke($0, `xor`, [-9223372036854775808n, 0n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:162 -assert_return(() => invoke($0, `xor`, [-1n, -9223372036854775808n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:163 -assert_return(() => invoke($0, `xor`, [-1n, 9223372036854775807n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:164 -assert_return(() => invoke($0, `xor`, [4042326015n, 4294963440n]), [ - value("i64", 252645135n), -]); - -// ./test/core/i64.wast:165 -assert_return(() => invoke($0, `xor`, [-1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:167 -assert_return(() => invoke($0, `shl`, [1n, 1n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:168 -assert_return(() => invoke($0, `shl`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:169 -assert_return(() => invoke($0, `shl`, [9223372036854775807n, 1n]), [ - value("i64", -2n), -]); - -// ./test/core/i64.wast:170 -assert_return(() => invoke($0, `shl`, [-1n, 1n]), [value("i64", -2n)]); - -// ./test/core/i64.wast:171 -assert_return(() => invoke($0, `shl`, [-9223372036854775808n, 1n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:172 -assert_return(() => invoke($0, `shl`, [4611686018427387904n, 1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:173 -assert_return(() => invoke($0, `shl`, [1n, 63n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:174 -assert_return(() => invoke($0, `shl`, [1n, 64n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:175 -assert_return(() => invoke($0, `shl`, [1n, 65n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:176 -assert_return(() => invoke($0, `shl`, [1n, -1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:177 -assert_return(() => invoke($0, `shl`, [1n, 9223372036854775807n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:179 -assert_return(() => invoke($0, `shr_s`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:180 -assert_return(() => invoke($0, `shr_s`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:181 -assert_return(() => invoke($0, `shr_s`, [-1n, 1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:182 -assert_return(() => invoke($0, `shr_s`, [9223372036854775807n, 1n]), [ - value("i64", 4611686018427387903n), -]); - -// ./test/core/i64.wast:183 -assert_return(() => invoke($0, `shr_s`, [-9223372036854775808n, 1n]), [ - value("i64", -4611686018427387904n), -]); - -// ./test/core/i64.wast:184 -assert_return(() => invoke($0, `shr_s`, [4611686018427387904n, 1n]), [ - value("i64", 2305843009213693952n), -]); - -// ./test/core/i64.wast:185 -assert_return(() => invoke($0, `shr_s`, [1n, 64n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:186 -assert_return(() => invoke($0, `shr_s`, [1n, 65n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:187 -assert_return(() => invoke($0, `shr_s`, [1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:188 -assert_return(() => invoke($0, `shr_s`, [1n, 9223372036854775807n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:189 -assert_return(() => invoke($0, `shr_s`, [1n, -9223372036854775808n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:190 -assert_return(() => invoke($0, `shr_s`, [-9223372036854775808n, 63n]), [ - value("i64", -1n), -]); - -// ./test/core/i64.wast:191 -assert_return(() => invoke($0, `shr_s`, [-1n, 64n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:192 -assert_return(() => invoke($0, `shr_s`, [-1n, 65n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:193 -assert_return(() => invoke($0, `shr_s`, [-1n, -1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:194 -assert_return(() => invoke($0, `shr_s`, [-1n, 9223372036854775807n]), [ - value("i64", -1n), -]); - -// ./test/core/i64.wast:195 -assert_return(() => invoke($0, `shr_s`, [-1n, -9223372036854775808n]), [ - value("i64", -1n), -]); - -// ./test/core/i64.wast:197 -assert_return(() => invoke($0, `shr_u`, [1n, 1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:198 -assert_return(() => invoke($0, `shr_u`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:199 -assert_return(() => invoke($0, `shr_u`, [-1n, 1n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:200 -assert_return(() => invoke($0, `shr_u`, [9223372036854775807n, 1n]), [ - value("i64", 4611686018427387903n), -]); - -// ./test/core/i64.wast:201 -assert_return(() => invoke($0, `shr_u`, [-9223372036854775808n, 1n]), [ - value("i64", 4611686018427387904n), -]); - -// ./test/core/i64.wast:202 -assert_return(() => invoke($0, `shr_u`, [4611686018427387904n, 1n]), [ - value("i64", 2305843009213693952n), -]); - -// ./test/core/i64.wast:203 -assert_return(() => invoke($0, `shr_u`, [1n, 64n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:204 -assert_return(() => invoke($0, `shr_u`, [1n, 65n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:205 -assert_return(() => invoke($0, `shr_u`, [1n, -1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:206 -assert_return(() => invoke($0, `shr_u`, [1n, 9223372036854775807n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:207 -assert_return(() => invoke($0, `shr_u`, [1n, -9223372036854775808n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:208 -assert_return(() => invoke($0, `shr_u`, [-9223372036854775808n, 63n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:209 -assert_return(() => invoke($0, `shr_u`, [-1n, 64n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:210 -assert_return(() => invoke($0, `shr_u`, [-1n, 65n]), [ - value("i64", 9223372036854775807n), -]); - -// ./test/core/i64.wast:211 -assert_return(() => invoke($0, `shr_u`, [-1n, -1n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:212 -assert_return(() => invoke($0, `shr_u`, [-1n, 9223372036854775807n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:213 -assert_return(() => invoke($0, `shr_u`, [-1n, -9223372036854775808n]), [ - value("i64", -1n), -]); - -// ./test/core/i64.wast:215 -assert_return(() => invoke($0, `rotl`, [1n, 1n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:216 -assert_return(() => invoke($0, `rotl`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:217 -assert_return(() => invoke($0, `rotl`, [-1n, 1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:218 -assert_return(() => invoke($0, `rotl`, [1n, 64n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:219 -assert_return(() => invoke($0, `rotl`, [-6067025490386449714n, 1n]), [ - value("i64", 6312693092936652189n), -]); - -// ./test/core/i64.wast:220 -assert_return(() => invoke($0, `rotl`, [-144115184384868352n, 4n]), [ - value("i64", -2305842950157893617n), -]); - -// ./test/core/i64.wast:221 -assert_return(() => invoke($0, `rotl`, [-6067173104435169271n, 53n]), [ - value("i64", 87109505680009935n), -]); - -// ./test/core/i64.wast:222 -assert_return(() => invoke($0, `rotl`, [-6066028401059725156n, 63n]), [ - value("i64", 6190357836324913230n), -]); - -// ./test/core/i64.wast:223 -assert_return(() => invoke($0, `rotl`, [-6067173104435169271n, 245n]), [ - value("i64", 87109505680009935n), -]); - -// ./test/core/i64.wast:224 -assert_return(() => invoke($0, `rotl`, [-6067067139002042359n, -19n]), [ - value("i64", -3530481836149793302n), -]); - -// ./test/core/i64.wast:225 -assert_return( - () => invoke($0, `rotl`, [-6066028401059725156n, -9223372036854775745n]), - [value("i64", 6190357836324913230n)], -); - -// ./test/core/i64.wast:226 -assert_return(() => invoke($0, `rotl`, [1n, 63n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:227 -assert_return(() => invoke($0, `rotl`, [-9223372036854775808n, 1n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:229 -assert_return(() => invoke($0, `rotr`, [1n, 1n]), [ - value("i64", -9223372036854775808n), -]); - -// ./test/core/i64.wast:230 -assert_return(() => invoke($0, `rotr`, [1n, 0n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:231 -assert_return(() => invoke($0, `rotr`, [-1n, 1n]), [value("i64", -1n)]); - -// ./test/core/i64.wast:232 -assert_return(() => invoke($0, `rotr`, [1n, 64n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:233 -assert_return(() => invoke($0, `rotr`, [-6067025490386449714n, 1n]), [ - value("i64", 6189859291661550951n), -]); - -// ./test/core/i64.wast:234 -assert_return(() => invoke($0, `rotr`, [-144115184384868352n, 4n]), [ - value("i64", 1143914305582792704n), -]); - -// ./test/core/i64.wast:235 -assert_return(() => invoke($0, `rotr`, [-6067173104435169271n, 53n]), [ - value("i64", 7534987797011123550n), -]); - -// ./test/core/i64.wast:236 -assert_return(() => invoke($0, `rotr`, [-6066028401059725156n, 63n]), [ - value("i64", 6314687271590101305n), -]); - -// ./test/core/i64.wast:237 -assert_return(() => invoke($0, `rotr`, [-6067173104435169271n, 245n]), [ - value("i64", 7534987797011123550n), -]); - -// ./test/core/i64.wast:238 -assert_return(() => invoke($0, `rotr`, [-6067067139002042359n, -19n]), [ - value("i64", -7735078922541506965n), -]); - -// ./test/core/i64.wast:239 -assert_return( - () => invoke($0, `rotr`, [-6066028401059725156n, -9223372036854775745n]), - [value("i64", 6314687271590101305n)], -); - -// ./test/core/i64.wast:240 -assert_return(() => invoke($0, `rotr`, [1n, 63n]), [value("i64", 2n)]); - -// ./test/core/i64.wast:241 -assert_return(() => invoke($0, `rotr`, [-9223372036854775808n, 63n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:243 -assert_return(() => invoke($0, `clz`, [-1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:244 -assert_return(() => invoke($0, `clz`, [0n]), [value("i64", 64n)]); - -// ./test/core/i64.wast:245 -assert_return(() => invoke($0, `clz`, [32768n]), [value("i64", 48n)]); - -// ./test/core/i64.wast:246 -assert_return(() => invoke($0, `clz`, [255n]), [value("i64", 56n)]); - -// ./test/core/i64.wast:247 -assert_return(() => invoke($0, `clz`, [-9223372036854775808n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:248 -assert_return(() => invoke($0, `clz`, [1n]), [value("i64", 63n)]); - -// ./test/core/i64.wast:249 -assert_return(() => invoke($0, `clz`, [2n]), [value("i64", 62n)]); - -// ./test/core/i64.wast:250 -assert_return(() => invoke($0, `clz`, [9223372036854775807n]), [ - value("i64", 1n), -]); - -// ./test/core/i64.wast:252 -assert_return(() => invoke($0, `ctz`, [-1n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:253 -assert_return(() => invoke($0, `ctz`, [0n]), [value("i64", 64n)]); - -// ./test/core/i64.wast:254 -assert_return(() => invoke($0, `ctz`, [32768n]), [value("i64", 15n)]); - -// ./test/core/i64.wast:255 -assert_return(() => invoke($0, `ctz`, [65536n]), [value("i64", 16n)]); - -// ./test/core/i64.wast:256 -assert_return(() => invoke($0, `ctz`, [-9223372036854775808n]), [ - value("i64", 63n), -]); - -// ./test/core/i64.wast:257 -assert_return(() => invoke($0, `ctz`, [9223372036854775807n]), [ - value("i64", 0n), -]); - -// ./test/core/i64.wast:259 -assert_return(() => invoke($0, `popcnt`, [-1n]), [value("i64", 64n)]); - -// ./test/core/i64.wast:260 -assert_return(() => invoke($0, `popcnt`, [0n]), [value("i64", 0n)]); - -// ./test/core/i64.wast:261 -assert_return(() => invoke($0, `popcnt`, [32768n]), [value("i64", 1n)]); - -// ./test/core/i64.wast:262 -assert_return(() => invoke($0, `popcnt`, [-9223231297218904064n]), [ - value("i64", 4n), -]); - -// ./test/core/i64.wast:263 -assert_return(() => invoke($0, `popcnt`, [9223372036854775807n]), [ - value("i64", 63n), -]); - -// ./test/core/i64.wast:264 -assert_return(() => invoke($0, `popcnt`, [-6148914692668172971n]), [ - value("i64", 32n), -]); - -// ./test/core/i64.wast:265 -assert_return(() => invoke($0, `popcnt`, [-7378697629197489494n]), [ - value("i64", 32n), -]); - -// ./test/core/i64.wast:266 -assert_return(() => invoke($0, `popcnt`, [-2401053088876216593n]), [ - value("i64", 48n), -]); - -// ./test/core/i64.wast:268 -assert_return(() => invoke($0, `eqz`, [0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:269 -assert_return(() => invoke($0, `eqz`, [1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:270 -assert_return(() => invoke($0, `eqz`, [-9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:271 -assert_return(() => invoke($0, `eqz`, [9223372036854775807n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:272 -assert_return(() => invoke($0, `eqz`, [-1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:274 -assert_return(() => invoke($0, `eq`, [0n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:275 -assert_return(() => invoke($0, `eq`, [1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:276 -assert_return(() => invoke($0, `eq`, [-1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:277 -assert_return( - () => invoke($0, `eq`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:278 -assert_return( - () => invoke($0, `eq`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:279 -assert_return(() => invoke($0, `eq`, [-1n, -1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:280 -assert_return(() => invoke($0, `eq`, [1n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:281 -assert_return(() => invoke($0, `eq`, [0n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:282 -assert_return(() => invoke($0, `eq`, [-9223372036854775808n, 0n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:283 -assert_return(() => invoke($0, `eq`, [0n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:284 -assert_return(() => invoke($0, `eq`, [-9223372036854775808n, -1n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:285 -assert_return(() => invoke($0, `eq`, [-1n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:286 -assert_return( - () => invoke($0, `eq`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:287 -assert_return( - () => invoke($0, `eq`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:289 -assert_return(() => invoke($0, `ne`, [0n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:290 -assert_return(() => invoke($0, `ne`, [1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:291 -assert_return(() => invoke($0, `ne`, [-1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:292 -assert_return( - () => invoke($0, `ne`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:293 -assert_return( - () => invoke($0, `ne`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:294 -assert_return(() => invoke($0, `ne`, [-1n, -1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:295 -assert_return(() => invoke($0, `ne`, [1n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:296 -assert_return(() => invoke($0, `ne`, [0n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:297 -assert_return(() => invoke($0, `ne`, [-9223372036854775808n, 0n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:298 -assert_return(() => invoke($0, `ne`, [0n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:299 -assert_return(() => invoke($0, `ne`, [-9223372036854775808n, -1n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:300 -assert_return(() => invoke($0, `ne`, [-1n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:301 -assert_return( - () => invoke($0, `ne`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:302 -assert_return( - () => invoke($0, `ne`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:304 -assert_return(() => invoke($0, `lt_s`, [0n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:305 -assert_return(() => invoke($0, `lt_s`, [1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:306 -assert_return(() => invoke($0, `lt_s`, [-1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:307 -assert_return( - () => invoke($0, `lt_s`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:308 -assert_return( - () => invoke($0, `lt_s`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:309 -assert_return(() => invoke($0, `lt_s`, [-1n, -1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:310 -assert_return(() => invoke($0, `lt_s`, [1n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:311 -assert_return(() => invoke($0, `lt_s`, [0n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:312 -assert_return(() => invoke($0, `lt_s`, [-9223372036854775808n, 0n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:313 -assert_return(() => invoke($0, `lt_s`, [0n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:314 -assert_return(() => invoke($0, `lt_s`, [-9223372036854775808n, -1n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:315 -assert_return(() => invoke($0, `lt_s`, [-1n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:316 -assert_return( - () => invoke($0, `lt_s`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:317 -assert_return( - () => invoke($0, `lt_s`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:319 -assert_return(() => invoke($0, `lt_u`, [0n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:320 -assert_return(() => invoke($0, `lt_u`, [1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:321 -assert_return(() => invoke($0, `lt_u`, [-1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:322 -assert_return( - () => invoke($0, `lt_u`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:323 -assert_return( - () => invoke($0, `lt_u`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:324 -assert_return(() => invoke($0, `lt_u`, [-1n, -1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:325 -assert_return(() => invoke($0, `lt_u`, [1n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:326 -assert_return(() => invoke($0, `lt_u`, [0n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:327 -assert_return(() => invoke($0, `lt_u`, [-9223372036854775808n, 0n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:328 -assert_return(() => invoke($0, `lt_u`, [0n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:329 -assert_return(() => invoke($0, `lt_u`, [-9223372036854775808n, -1n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:330 -assert_return(() => invoke($0, `lt_u`, [-1n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:331 -assert_return( - () => invoke($0, `lt_u`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:332 -assert_return( - () => invoke($0, `lt_u`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:334 -assert_return(() => invoke($0, `le_s`, [0n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:335 -assert_return(() => invoke($0, `le_s`, [1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:336 -assert_return(() => invoke($0, `le_s`, [-1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:337 -assert_return( - () => invoke($0, `le_s`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:338 -assert_return( - () => invoke($0, `le_s`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:339 -assert_return(() => invoke($0, `le_s`, [-1n, -1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:340 -assert_return(() => invoke($0, `le_s`, [1n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:341 -assert_return(() => invoke($0, `le_s`, [0n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:342 -assert_return(() => invoke($0, `le_s`, [-9223372036854775808n, 0n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:343 -assert_return(() => invoke($0, `le_s`, [0n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:344 -assert_return(() => invoke($0, `le_s`, [-9223372036854775808n, -1n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:345 -assert_return(() => invoke($0, `le_s`, [-1n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:346 -assert_return( - () => invoke($0, `le_s`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:347 -assert_return( - () => invoke($0, `le_s`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:349 -assert_return(() => invoke($0, `le_u`, [0n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:350 -assert_return(() => invoke($0, `le_u`, [1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:351 -assert_return(() => invoke($0, `le_u`, [-1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:352 -assert_return( - () => invoke($0, `le_u`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:353 -assert_return( - () => invoke($0, `le_u`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:354 -assert_return(() => invoke($0, `le_u`, [-1n, -1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:355 -assert_return(() => invoke($0, `le_u`, [1n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:356 -assert_return(() => invoke($0, `le_u`, [0n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:357 -assert_return(() => invoke($0, `le_u`, [-9223372036854775808n, 0n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:358 -assert_return(() => invoke($0, `le_u`, [0n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:359 -assert_return(() => invoke($0, `le_u`, [-9223372036854775808n, -1n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:360 -assert_return(() => invoke($0, `le_u`, [-1n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:361 -assert_return( - () => invoke($0, `le_u`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:362 -assert_return( - () => invoke($0, `le_u`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:364 -assert_return(() => invoke($0, `gt_s`, [0n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:365 -assert_return(() => invoke($0, `gt_s`, [1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:366 -assert_return(() => invoke($0, `gt_s`, [-1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:367 -assert_return( - () => invoke($0, `gt_s`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:368 -assert_return( - () => invoke($0, `gt_s`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:369 -assert_return(() => invoke($0, `gt_s`, [-1n, -1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:370 -assert_return(() => invoke($0, `gt_s`, [1n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:371 -assert_return(() => invoke($0, `gt_s`, [0n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:372 -assert_return(() => invoke($0, `gt_s`, [-9223372036854775808n, 0n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:373 -assert_return(() => invoke($0, `gt_s`, [0n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:374 -assert_return(() => invoke($0, `gt_s`, [-9223372036854775808n, -1n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:375 -assert_return(() => invoke($0, `gt_s`, [-1n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:376 -assert_return( - () => invoke($0, `gt_s`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:377 -assert_return( - () => invoke($0, `gt_s`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:379 -assert_return(() => invoke($0, `gt_u`, [0n, 0n]), [value("i32", 0)]); - -// ./test/core/i64.wast:380 -assert_return(() => invoke($0, `gt_u`, [1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:381 -assert_return(() => invoke($0, `gt_u`, [-1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:382 -assert_return( - () => invoke($0, `gt_u`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:383 -assert_return( - () => invoke($0, `gt_u`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:384 -assert_return(() => invoke($0, `gt_u`, [-1n, -1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:385 -assert_return(() => invoke($0, `gt_u`, [1n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:386 -assert_return(() => invoke($0, `gt_u`, [0n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:387 -assert_return(() => invoke($0, `gt_u`, [-9223372036854775808n, 0n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:388 -assert_return(() => invoke($0, `gt_u`, [0n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:389 -assert_return(() => invoke($0, `gt_u`, [-9223372036854775808n, -1n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:390 -assert_return(() => invoke($0, `gt_u`, [-1n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:391 -assert_return( - () => invoke($0, `gt_u`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:392 -assert_return( - () => invoke($0, `gt_u`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:394 -assert_return(() => invoke($0, `ge_s`, [0n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:395 -assert_return(() => invoke($0, `ge_s`, [1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:396 -assert_return(() => invoke($0, `ge_s`, [-1n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:397 -assert_return( - () => invoke($0, `ge_s`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:398 -assert_return( - () => invoke($0, `ge_s`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:399 -assert_return(() => invoke($0, `ge_s`, [-1n, -1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:400 -assert_return(() => invoke($0, `ge_s`, [1n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:401 -assert_return(() => invoke($0, `ge_s`, [0n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:402 -assert_return(() => invoke($0, `ge_s`, [-9223372036854775808n, 0n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:403 -assert_return(() => invoke($0, `ge_s`, [0n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:404 -assert_return(() => invoke($0, `ge_s`, [-9223372036854775808n, -1n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:405 -assert_return(() => invoke($0, `ge_s`, [-1n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:406 -assert_return( - () => invoke($0, `ge_s`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:407 -assert_return( - () => invoke($0, `ge_s`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:409 -assert_return(() => invoke($0, `ge_u`, [0n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:410 -assert_return(() => invoke($0, `ge_u`, [1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:411 -assert_return(() => invoke($0, `ge_u`, [-1n, 1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:412 -assert_return( - () => invoke($0, `ge_u`, [-9223372036854775808n, -9223372036854775808n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:413 -assert_return( - () => invoke($0, `ge_u`, [9223372036854775807n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:414 -assert_return(() => invoke($0, `ge_u`, [-1n, -1n]), [value("i32", 1)]); - -// ./test/core/i64.wast:415 -assert_return(() => invoke($0, `ge_u`, [1n, 0n]), [value("i32", 1)]); - -// ./test/core/i64.wast:416 -assert_return(() => invoke($0, `ge_u`, [0n, 1n]), [value("i32", 0)]); - -// ./test/core/i64.wast:417 -assert_return(() => invoke($0, `ge_u`, [-9223372036854775808n, 0n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:418 -assert_return(() => invoke($0, `ge_u`, [0n, -9223372036854775808n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:419 -assert_return(() => invoke($0, `ge_u`, [-9223372036854775808n, -1n]), [ - value("i32", 0), -]); - -// ./test/core/i64.wast:420 -assert_return(() => invoke($0, `ge_u`, [-1n, -9223372036854775808n]), [ - value("i32", 1), -]); - -// ./test/core/i64.wast:421 -assert_return( - () => invoke($0, `ge_u`, [-9223372036854775808n, 9223372036854775807n]), - [value("i32", 1)], -); - -// ./test/core/i64.wast:422 -assert_return( - () => invoke($0, `ge_u`, [9223372036854775807n, -9223372036854775808n]), - [value("i32", 0)], -); - -// ./test/core/i64.wast:427 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.add (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:428 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.and (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:429 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.div_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:430 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.div_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:431 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.mul (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:432 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.or (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:433 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.rem_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:434 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.rem_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:435 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.rotl (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:436 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.rotr (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:437 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.shl (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:438 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.shr_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:439 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.shr_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:440 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.sub (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:441 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.xor (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:442 -assert_invalid( - () => instantiate(`(module (func (result i64) (i64.eqz (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/i64.wast:443 -assert_invalid( - () => instantiate(`(module (func (result i64) (i64.clz (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/i64.wast:444 -assert_invalid( - () => instantiate(`(module (func (result i64) (i64.ctz (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/i64.wast:445 -assert_invalid( - () => instantiate(`(module (func (result i64) (i64.popcnt (i32.const 0))))`), - `type mismatch`, -); - -// ./test/core/i64.wast:446 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.eq (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:447 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.ge_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:448 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.ge_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:449 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.gt_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:450 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.gt_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:451 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.le_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:452 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.le_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:453 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.lt_s (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:454 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.lt_u (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/i64.wast:455 -assert_invalid( - () => - instantiate( - `(module (func (result i64) (i64.ne (i32.const 0) (f32.const 0))))`, - ), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/if.wast.js b/js/src/jit-test/tests/wasm/spec/threads/if.wast.js deleted file mode 100644 index 481e14bae15c..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/if.wast.js +++ /dev/null @@ -1,1240 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/if.wast - -// ./test/core/if.wast:3 -let $0 = instantiate(`(module - ;; Auxiliary definition - (memory 1) - - (func $$dummy) - - (func (export "empty") (param i32) - (if (local.get 0) (then)) - (if (local.get 0) (then) (else)) - (if $$l (local.get 0) (then)) - (if $$l (local.get 0) (then) (else)) - ) - - (func (export "singular") (param i32) (result i32) - (if (local.get 0) (then (nop))) - (if (local.get 0) (then (nop)) (else (nop))) - (if (result i32) (local.get 0) (then (i32.const 7)) (else (i32.const 8))) - ) - - (func (export "multi") (param i32) (result i32) - (if (local.get 0) (then (call $$dummy) (call $$dummy) (call $$dummy))) - (if (local.get 0) (then) (else (call $$dummy) (call $$dummy) (call $$dummy))) - (if (result i32) (local.get 0) - (then (call $$dummy) (call $$dummy) (i32.const 8)) - (else (call $$dummy) (call $$dummy) (i32.const 9)) - ) - ) - - (func (export "nested") (param i32 i32) (result i32) - (if (result i32) (local.get 0) - (then - (if (local.get 1) (then (call $$dummy) (block) (nop))) - (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) - (if (result i32) (local.get 1) - (then (call $$dummy) (i32.const 9)) - (else (call $$dummy) (i32.const 10)) - ) - ) - (else - (if (local.get 1) (then (call $$dummy) (block) (nop))) - (if (local.get 1) (then) (else (call $$dummy) (block) (nop))) - (if (result i32) (local.get 1) - (then (call $$dummy) (i32.const 10)) - (else (call $$dummy) (i32.const 11)) - ) - ) - ) - ) - - (func (export "as-select-first") (param i32) (result i32) - (select - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 2) (i32.const 3) - ) - ) - (func (export "as-select-mid") (param i32) (result i32) - (select - (i32.const 2) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 3) - ) - ) - (func (export "as-select-last") (param i32) (result i32) - (select - (i32.const 2) (i32.const 3) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - ) - ) - - (func (export "as-loop-first") (param i32) (result i32) - (loop (result i32) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (call $$dummy) (call $$dummy) - ) - ) - (func (export "as-loop-mid") (param i32) (result i32) - (loop (result i32) - (call $$dummy) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (call $$dummy) - ) - ) - (func (export "as-loop-last") (param i32) (result i32) - (loop (result i32) - (call $$dummy) (call $$dummy) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - ) - ) - - (func (export "as-if-condition") (param i32) (result i32) - (if (result i32) - (if (result i32) (local.get 0) - (then (i32.const 1)) (else (i32.const 0)) - ) - (then (call $$dummy) (i32.const 2)) - (else (call $$dummy) (i32.const 3)) - ) - ) - - (func (export "as-br_if-first") (param i32) (result i32) - (block (result i32) - (br_if 0 - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 2) - ) - (return (i32.const 3)) - ) - ) - (func (export "as-br_if-last") (param i32) (result i32) - (block (result i32) - (br_if 0 - (i32.const 2) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - ) - (return (i32.const 3)) - ) - ) - - (func (export "as-br_table-first") (param i32) (result i32) - (block (result i32) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 2) - (br_table 0 0) - ) - ) - (func (export "as-br_table-last") (param i32) (result i32) - (block (result i32) - (i32.const 2) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (br_table 0 0) - ) - ) - - (func $$func (param i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-first") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 2) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 2) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 2) (i32.const 0) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - ) - ) - ) - - (func (export "as-store-first") (param i32) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.const 2) - (i32.store) - ) - (func (export "as-store-last") (param i32) - (i32.const 2) - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 1)) - (else (call $$dummy) (i32.const 0)) - ) - (i32.store) - ) - - (func (export "as-memory.grow-value") (param i32) (result i32) - (memory.grow - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - ) - - (func $$f (param i32) (result i32) (local.get 0)) - - (func (export "as-call-value") (param i32) (result i32) - (call $$f - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - ) - (func (export "as-return-value") (param i32) (result i32) - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0))) - (return) - ) - (func (export "as-drop-operand") (param i32) - (drop - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - ) - (func (export "as-br-value") (param i32) (result i32) - (block (result i32) - (br 0 - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - ) - ) - (func (export "as-local.set-value") (param i32) (result i32) - (local i32) - (local.set 0 - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - (local.get 0) - ) - (func (export "as-local.tee-value") (param i32) (result i32) - (local.tee 0 - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (param i32) (result i32) - (global.set $$a - (if (result i32) (local.get 0) - (then (i32.const 1)) - (else (i32.const 0)) - ) - ) (global.get $$a) - ) - (func (export "as-load-operand") (param i32) (result i32) - (i32.load - (if (result i32) (local.get 0) - (then (i32.const 11)) - (else (i32.const 10)) - ) - ) - ) - - (func (export "as-unary-operand") (param i32) (result i32) - (i32.ctz - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 13)) - (else (call $$dummy) (i32.const -13)) - ) - ) - ) - (func (export "as-binary-operand") (param i32 i32) (result i32) - (i32.mul - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 3)) - (else (call $$dummy) (i32.const -3)) - ) - (if (result i32) (local.get 1) - (then (call $$dummy) (i32.const 4)) - (else (call $$dummy) (i32.const -5)) - ) - ) - ) - (func (export "as-test-operand") (param i32) (result i32) - (i32.eqz - (if (result i32) (local.get 0) - (then (call $$dummy) (i32.const 13)) - (else (call $$dummy) (i32.const 0)) - ) - ) - ) - (func (export "as-compare-operand") (param i32 i32) (result i32) - (f32.gt - (if (result f32) (local.get 0) - (then (call $$dummy) (f32.const 3)) - (else (call $$dummy) (f32.const -3)) - ) - (if (result f32) (local.get 1) - (then (call $$dummy) (f32.const 4)) - (else (call $$dummy) (f32.const -4)) - ) - ) - ) - - (func (export "break-bare") (result i32) - (if (i32.const 1) (then (br 0) (unreachable))) - (if (i32.const 1) (then (br 0) (unreachable)) (else (unreachable))) - (if (i32.const 0) (then (unreachable)) (else (br 0) (unreachable))) - (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable))) - (if (i32.const 1) (then (br_if 0 (i32.const 1)) (unreachable)) (else (unreachable))) - (if (i32.const 0) (then (unreachable)) (else (br_if 0 (i32.const 1)) (unreachable))) - (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable))) - (if (i32.const 1) (then (br_table 0 (i32.const 0)) (unreachable)) (else (unreachable))) - (if (i32.const 0) (then (unreachable)) (else (br_table 0 (i32.const 0)) (unreachable))) - (i32.const 19) - ) - - (func (export "break-value") (param i32) (result i32) - (if (result i32) (local.get 0) - (then (br 0 (i32.const 18)) (i32.const 19)) - (else (br 0 (i32.const 21)) (i32.const 20)) - ) - ) - - (func (export "effects") (param i32) (result i32) - (local i32) - (if - (block (result i32) (local.set 1 (i32.const 1)) (local.get 0)) - (then - (local.set 1 (i32.mul (local.get 1) (i32.const 3))) - (local.set 1 (i32.sub (local.get 1) (i32.const 5))) - (local.set 1 (i32.mul (local.get 1) (i32.const 7))) - (br 0) - (local.set 1 (i32.mul (local.get 1) (i32.const 100))) - ) - (else - (local.set 1 (i32.mul (local.get 1) (i32.const 5))) - (local.set 1 (i32.sub (local.get 1) (i32.const 7))) - (local.set 1 (i32.mul (local.get 1) (i32.const 3))) - (br 0) - (local.set 1 (i32.mul (local.get 1) (i32.const 1000))) - ) - ) - (local.get 1) - ) -)`); - -// ./test/core/if.wast:384 -assert_return(() => invoke($0, `empty`, [0]), []); - -// ./test/core/if.wast:385 -assert_return(() => invoke($0, `empty`, [1]), []); - -// ./test/core/if.wast:386 -assert_return(() => invoke($0, `empty`, [100]), []); - -// ./test/core/if.wast:387 -assert_return(() => invoke($0, `empty`, [-2]), []); - -// ./test/core/if.wast:389 -assert_return(() => invoke($0, `singular`, [0]), [value("i32", 8)]); - -// ./test/core/if.wast:390 -assert_return(() => invoke($0, `singular`, [1]), [value("i32", 7)]); - -// ./test/core/if.wast:391 -assert_return(() => invoke($0, `singular`, [10]), [value("i32", 7)]); - -// ./test/core/if.wast:392 -assert_return(() => invoke($0, `singular`, [-10]), [value("i32", 7)]); - -// ./test/core/if.wast:394 -assert_return(() => invoke($0, `multi`, [0]), [value("i32", 9)]); - -// ./test/core/if.wast:395 -assert_return(() => invoke($0, `multi`, [1]), [value("i32", 8)]); - -// ./test/core/if.wast:396 -assert_return(() => invoke($0, `multi`, [13]), [value("i32", 8)]); - -// ./test/core/if.wast:397 -assert_return(() => invoke($0, `multi`, [-5]), [value("i32", 8)]); - -// ./test/core/if.wast:399 -assert_return(() => invoke($0, `nested`, [0, 0]), [value("i32", 11)]); - -// ./test/core/if.wast:400 -assert_return(() => invoke($0, `nested`, [1, 0]), [value("i32", 10)]); - -// ./test/core/if.wast:401 -assert_return(() => invoke($0, `nested`, [0, 1]), [value("i32", 10)]); - -// ./test/core/if.wast:402 -assert_return(() => invoke($0, `nested`, [3, 2]), [value("i32", 9)]); - -// ./test/core/if.wast:403 -assert_return(() => invoke($0, `nested`, [0, -100]), [value("i32", 10)]); - -// ./test/core/if.wast:404 -assert_return(() => invoke($0, `nested`, [10, 10]), [value("i32", 9)]); - -// ./test/core/if.wast:405 -assert_return(() => invoke($0, `nested`, [0, -1]), [value("i32", 10)]); - -// ./test/core/if.wast:406 -assert_return(() => invoke($0, `nested`, [-111, -2]), [value("i32", 9)]); - -// ./test/core/if.wast:408 -assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:409 -assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:410 -assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); - -// ./test/core/if.wast:411 -assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:412 -assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 3)]); - -// ./test/core/if.wast:413 -assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:415 -assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:416 -assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:417 -assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:418 -assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:419 -assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:420 -assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:422 -assert_return(() => invoke($0, `as-if-condition`, [0]), [value("i32", 3)]); - -// ./test/core/if.wast:423 -assert_return(() => invoke($0, `as-if-condition`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:425 -assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:426 -assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:427 -assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 3)]); - -// ./test/core/if.wast:428 -assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:430 -assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:431 -assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:432 -assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); - -// ./test/core/if.wast:433 -assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:435 -assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [ - value("i32", 0), -]); - -// ./test/core/if.wast:436 -assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [ - value("i32", 1), -]); - -// ./test/core/if.wast:437 -assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 2)]); - -// ./test/core/if.wast:438 -assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 2)]); - -// ./test/core/if.wast:439 -assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [ - value("i32", 2), -]); - -// ./test/core/if.wast:440 -assert_trap( - () => invoke($0, `as-call_indirect-last`, [1]), - `undefined element`, -); - -// ./test/core/if.wast:442 -assert_return(() => invoke($0, `as-store-first`, [0]), []); - -// ./test/core/if.wast:443 -assert_return(() => invoke($0, `as-store-first`, [1]), []); - -// ./test/core/if.wast:444 -assert_return(() => invoke($0, `as-store-last`, [0]), []); - -// ./test/core/if.wast:445 -assert_return(() => invoke($0, `as-store-last`, [1]), []); - -// ./test/core/if.wast:447 -assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); - -// ./test/core/if.wast:448 -assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:450 -assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:451 -assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:453 -assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:454 -assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:456 -assert_return(() => invoke($0, `as-drop-operand`, [0]), []); - -// ./test/core/if.wast:457 -assert_return(() => invoke($0, `as-drop-operand`, [1]), []); - -// ./test/core/if.wast:459 -assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:460 -assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:462 -assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:463 -assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:465 -assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:466 -assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:468 -assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:469 -assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); - -// ./test/core/if.wast:471 -assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:472 -assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 0)]); - -// ./test/core/if.wast:474 -assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); - -// ./test/core/if.wast:475 -assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 0)]); - -// ./test/core/if.wast:476 -assert_return(() => invoke($0, `as-unary-operand`, [-1]), [value("i32", 0)]); - -// ./test/core/if.wast:478 -assert_return(() => invoke($0, `as-binary-operand`, [0, 0]), [ - value("i32", 15), -]); - -// ./test/core/if.wast:479 -assert_return(() => invoke($0, `as-binary-operand`, [0, 1]), [ - value("i32", -12), -]); - -// ./test/core/if.wast:480 -assert_return(() => invoke($0, `as-binary-operand`, [1, 0]), [ - value("i32", -15), -]); - -// ./test/core/if.wast:481 -assert_return(() => invoke($0, `as-binary-operand`, [1, 1]), [ - value("i32", 12), -]); - -// ./test/core/if.wast:483 -assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); - -// ./test/core/if.wast:484 -assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 0)]); - -// ./test/core/if.wast:486 -assert_return(() => invoke($0, `as-compare-operand`, [0, 0]), [ - value("i32", 1), -]); - -// ./test/core/if.wast:487 -assert_return(() => invoke($0, `as-compare-operand`, [0, 1]), [ - value("i32", 0), -]); - -// ./test/core/if.wast:488 -assert_return(() => invoke($0, `as-compare-operand`, [1, 0]), [ - value("i32", 1), -]); - -// ./test/core/if.wast:489 -assert_return(() => invoke($0, `as-compare-operand`, [1, 1]), [ - value("i32", 0), -]); - -// ./test/core/if.wast:491 -assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); - -// ./test/core/if.wast:492 -assert_return(() => invoke($0, `break-value`, [1]), [value("i32", 18)]); - -// ./test/core/if.wast:493 -assert_return(() => invoke($0, `break-value`, [0]), [value("i32", 21)]); - -// ./test/core/if.wast:495 -assert_return(() => invoke($0, `effects`, [1]), [value("i32", -14)]); - -// ./test/core/if.wast:496 -assert_return(() => invoke($0, `effects`, [0]), [value("i32", -6)]); - -// ./test/core/if.wast:498 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:502 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:506 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:510 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:515 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-i32 (result i32) (if (i32.const 0) (then) (else))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:519 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-i64 (result i64) (if (i32.const 0) (then) (else))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:523 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-f32 (result f32) (if (i32.const 0) (then) (else))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:527 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-f64 (result f64) (if (i32.const 0) (then) (else))))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:532 -assert_invalid(() => - instantiate(`(module (func $$type-then-value-num-vs-void - (if (i32.const 1) (then (i32.const 1))) - ))`), `type mismatch`); - -// ./test/core/if.wast:538 -assert_invalid(() => - instantiate(`(module (func $$type-then-value-num-vs-void - (if (i32.const 1) (then (i32.const 1)) (else)) - ))`), `type mismatch`); - -// ./test/core/if.wast:544 -assert_invalid(() => - instantiate(`(module (func $$type-else-value-num-vs-void - (if (i32.const 1) (then) (else (i32.const 1))) - ))`), `type mismatch`); - -// ./test/core/if.wast:550 -assert_invalid(() => - instantiate(`(module (func $$type-both-value-num-vs-void - (if (i32.const 1) (then (i32.const 1)) (else (i32.const 1))) - ))`), `type mismatch`); - -// ./test/core/if.wast:557 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-empty-vs-num (result i32) - (if (result i32) (i32.const 1) (then) (else (i32.const 0))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:563 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-empty-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i32.const 0)) (else)) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:569 -assert_invalid( - () => - instantiate(`(module (func $$type-both-value-empty-vs-num (result i32) - (if (result i32) (i32.const 1) (then) (else)) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:575 -assert_invalid( - () => - instantiate(`(module (func $$type-no-else-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:582 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-void-vs-num (result i32) - (if (result i32) (i32.const 1) (then (nop)) (else (i32.const 0))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:588 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-void-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i32.const 0)) (else (nop))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:594 -assert_invalid( - () => - instantiate(`(module (func $$type-both-value-void-vs-num (result i32) - (if (result i32) (i32.const 1) (then (nop)) (else (nop))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:601 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-num-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:607 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-num-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i32.const 1)) (else (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:613 -assert_invalid( - () => - instantiate(`(module (func $$type-both-value-num-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i64.const 1)) (else (i64.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:619 -assert_invalid( - () => - instantiate( - `(module (func $$type-both-different-value-num-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i64.const 1)) (else (f64.const 1))) - ))`, - ), - `type mismatch`, -); - -// ./test/core/if.wast:626 -assert_invalid( - () => - instantiate(`(module (func $$type-then-value-unreached-select (result i32) - (if (result i64) - (i32.const 0) - (then (select (unreachable) (unreachable) (unreachable))) - (else (i64.const 0)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:636 -assert_invalid( - () => - instantiate(`(module (func $$type-else-value-unreached-select (result i32) - (if (result i64) - (i32.const 1) - (then (i64.const 0)) - (else (select (unreachable) (unreachable) (unreachable))) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:646 -assert_invalid( - () => - instantiate(`(module (func $$type-else-value-unreached-select (result i32) - (if (result i64) - (i32.const 1) - (then (select (unreachable) (unreachable) (unreachable))) - (else (select (unreachable) (unreachable) (unreachable))) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:657 -assert_invalid( - () => - instantiate(`(module (func $$type-then-break-last-void-vs-num (result i32) - (if (result i32) (i32.const 1) (then (br 0)) (else (i32.const 1))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:663 -assert_invalid( - () => - instantiate(`(module (func $$type-else-break-last-void-vs-num (result i32) - (if (result i32) (i32.const 1) (then (i32.const 1)) (else (br 0))) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:669 -assert_invalid( - () => - instantiate(`(module (func $$type-then-break-empty-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (br 0) (i32.const 1)) - (else (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:678 -assert_invalid( - () => - instantiate(`(module (func $$type-else-break-empty-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (i32.const 1)) - (else (br 0) (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:687 -assert_invalid( - () => - instantiate(`(module (func $$type-then-break-void-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (br 0 (nop)) (i32.const 1)) - (else (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:696 -assert_invalid( - () => - instantiate(`(module (func $$type-else-break-void-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (i32.const 1)) - (else (br 0 (nop)) (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:706 -assert_invalid( - () => - instantiate(`(module (func $$type-then-break-num-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (br 0 (i64.const 1)) (i32.const 1)) - (else (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:715 -assert_invalid( - () => - instantiate(`(module (func $$type-else-break-num-vs-num (result i32) - (if (result i32) (i32.const 1) - (then (i32.const 1)) - (else (br 0 (i64.const 1)) (i32.const 1)) - ) - ))`), - `type mismatch`, -); - -// ./test/core/if.wast:725 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty - (if (then)) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:733 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-block - (i32.const 0) - (block (if (then))) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:742 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-loop - (i32.const 0) - (loop (if (then))) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:751 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-then - (i32.const 0) (i32.const 0) - (if (then (if (then)))) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:760 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-else - (i32.const 0) (i32.const 0) - (if (result i32) (then (i32.const 0)) (else (if (then)) (i32.const 0))) - (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:770 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-br - (i32.const 0) - (block (br 0 (if(then))) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:779 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-br_if - (i32.const 0) - (block (br_if 0 (if(then)) (i32.const 1)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:788 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-br_table - (i32.const 0) - (block (br_table 0 (if(then))) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:797 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-return - (return (if(then))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:805 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-select - (select (if(then)) (i32.const 1) (i32.const 2)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:813 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-call - (call 1 (if(then))) (drop) - ) - (func (param i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/if.wast:822 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-condition-empty-in-call_indirect - (block (result i32) - (call_indirect (type $$sig) - (if(then)) (i32.const 0) - ) - (drop) - ) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:838 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-local.set - (local i32) - (local.set 0 (if(then))) (local.get 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:847 -assert_invalid(() => - instantiate(`(module - (func $$type-condition-empty-in-local.tee - (local i32) - (local.tee 0 (if(then))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:856 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-condition-empty-in-global.set - (global.set $$x (if(then))) (global.get $$x) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:865 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-condition-empty-in-memory.grow - (memory.grow (if(then))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:874 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-condition-empty-in-load - (i32.load (if(then))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:883 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-condition-empty-in-store - (i32.store (if(then)) (i32.const 1)) - ) - )`), `type mismatch`); - -// ./test/core/if.wast:894 -assert_malformed( - () => instantiate(`(func i32.const 0 if end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:898 -assert_malformed( - () => instantiate(`(func i32.const 0 if $$a end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:902 -assert_malformed( - () => instantiate(`(func i32.const 0 if else $$l end) `), - `mismatching label`, -); - -// ./test/core/if.wast:906 -assert_malformed( - () => instantiate(`(func i32.const 0 if $$a else $$l end) `), - `mismatching label`, -); - -// ./test/core/if.wast:910 -assert_malformed( - () => instantiate(`(func i32.const 0 if else end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:914 -assert_malformed( - () => instantiate(`(func i32.const 0 if else $$l end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:918 -assert_malformed( - () => instantiate(`(func i32.const 0 if else $$l1 end $$l2) `), - `mismatching label`, -); - -// ./test/core/if.wast:922 -assert_malformed( - () => instantiate(`(func i32.const 0 if $$a else end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:926 -assert_malformed( - () => instantiate(`(func i32.const 0 if $$a else $$a end $$l) `), - `mismatching label`, -); - -// ./test/core/if.wast:930 -assert_malformed( - () => instantiate(`(func i32.const 0 if $$a else $$l end $$l) `), - `mismatching label`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/local_get.wast.js b/js/src/jit-test/tests/wasm/spec/threads/local_get.wast.js deleted file mode 100644 index c768eae782b2..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/local_get.wast.js +++ /dev/null @@ -1,337 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/local_get.wast - -// ./test/core/local_get.wast:3 -let $0 = instantiate(`(module - ;; Typing - - (func (export "type-local-i32") (result i32) (local i32) (local.get 0)) - (func (export "type-local-i64") (result i64) (local i64) (local.get 0)) - (func (export "type-local-f32") (result f32) (local f32) (local.get 0)) - (func (export "type-local-f64") (result f64) (local f64) (local.get 0)) - - (func (export "type-param-i32") (param i32) (result i32) (local.get 0)) - (func (export "type-param-i64") (param i64) (result i64) (local.get 0)) - (func (export "type-param-f32") (param f32) (result f32) (local.get 0)) - (func (export "type-param-f64") (param f64) (result f64) (local.get 0)) - - (func (export "type-mixed") (param i64 f32 f64 i32 i32) - (local f32 i64 i64 f64) - (drop (i64.eqz (local.get 0))) - (drop (f32.neg (local.get 1))) - (drop (f64.neg (local.get 2))) - (drop (i32.eqz (local.get 3))) - (drop (i32.eqz (local.get 4))) - (drop (f32.neg (local.get 5))) - (drop (i64.eqz (local.get 6))) - (drop (i64.eqz (local.get 7))) - (drop (f64.neg (local.get 8))) - ) - - ;; Reading - - (func (export "read") (param i64 f32 f64 i32 i32) (result f64) - (local f32 i64 i64 f64) - (local.set 5 (f32.const 5.5)) - (local.set 6 (i64.const 6)) - (local.set 8 (f64.const 8)) - (f64.add - (f64.convert_i64_u (local.get 0)) - (f64.add - (f64.promote_f32 (local.get 1)) - (f64.add - (local.get 2) - (f64.add - (f64.convert_i32_u (local.get 3)) - (f64.add - (f64.convert_i32_s (local.get 4)) - (f64.add - (f64.promote_f32 (local.get 5)) - (f64.add - (f64.convert_i64_u (local.get 6)) - (f64.add - (f64.convert_i64_u (local.get 7)) - (local.get 8) - ) - ) - ) - ) - ) - ) - ) - ) - ) - - ;; As parameter of control constructs and instructions - - (func (export "as-block-value") (param i32) (result i32) - (block (result i32) (local.get 0)) - ) - (func (export "as-loop-value") (param i32) (result i32) - (loop (result i32) (local.get 0)) - ) - (func (export "as-br-value") (param i32) (result i32) - (block (result i32) (br 0 (local.get 0))) - ) - (func (export "as-br_if-value") (param i32) (result i32) - (block $$l0 (result i32) (br_if $$l0 (local.get 0) (i32.const 1))) - ) - - (func (export "as-br_if-value-cond") (param i32) (result i32) - (block (result i32) - (br_if 0 (local.get 0) (local.get 0)) - ) - ) - (func (export "as-br_table-value") (param i32) (result i32) - (block - (block - (block - (br_table 0 1 2 (local.get 0)) - (return (i32.const 0)) - ) - (return (i32.const 1)) - ) - (return (i32.const 2)) - ) - (i32.const 3) - ) - - (func (export "as-return-value") (param i32) (result i32) - (return (local.get 0)) - ) - - (func (export "as-if-then") (param i32) (result i32) - (if (result i32) (local.get 0) (then (local.get 0)) (else (i32.const 0))) - ) - (func (export "as-if-else") (param i32) (result i32) - (if (result i32) (local.get 0) (then (i32.const 1)) (else (local.get 0))) - ) -)`); - -// ./test/core/local_get.wast:109 -assert_return(() => invoke($0, `type-local-i32`, []), [value("i32", 0)]); - -// ./test/core/local_get.wast:110 -assert_return(() => invoke($0, `type-local-i64`, []), [value("i64", 0n)]); - -// ./test/core/local_get.wast:111 -assert_return(() => invoke($0, `type-local-f32`, []), [value("f32", 0)]); - -// ./test/core/local_get.wast:112 -assert_return(() => invoke($0, `type-local-f64`, []), [value("f64", 0)]); - -// ./test/core/local_get.wast:114 -assert_return(() => invoke($0, `type-param-i32`, [2]), [value("i32", 2)]); - -// ./test/core/local_get.wast:115 -assert_return(() => invoke($0, `type-param-i64`, [3n]), [value("i64", 3n)]); - -// ./test/core/local_get.wast:116 -assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), [ - value("f32", 4.4), -]); - -// ./test/core/local_get.wast:117 -assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), [ - value("f64", 5.5), -]); - -// ./test/core/local_get.wast:119 -assert_return(() => invoke($0, `as-block-value`, [6]), [value("i32", 6)]); - -// ./test/core/local_get.wast:120 -assert_return(() => invoke($0, `as-loop-value`, [7]), [value("i32", 7)]); - -// ./test/core/local_get.wast:122 -assert_return(() => invoke($0, `as-br-value`, [8]), [value("i32", 8)]); - -// ./test/core/local_get.wast:123 -assert_return(() => invoke($0, `as-br_if-value`, [9]), [value("i32", 9)]); - -// ./test/core/local_get.wast:124 -assert_return(() => invoke($0, `as-br_if-value-cond`, [10]), [ - value("i32", 10), -]); - -// ./test/core/local_get.wast:125 -assert_return(() => invoke($0, `as-br_table-value`, [1]), [value("i32", 2)]); - -// ./test/core/local_get.wast:127 -assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 0)]); - -// ./test/core/local_get.wast:129 -assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 1)]); - -// ./test/core/local_get.wast:130 -assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 0)]); - -// ./test/core/local_get.wast:132 -assert_return( - () => - invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), - [], -); - -// ./test/core/local_get.wast:138 -assert_return( - () => invoke($0, `read`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), - [value("f64", 34.8)], -); - -// ./test/core/local_get.wast:148 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (result i64) (local i32) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:152 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (result i32) (local f32) (i32.eqz (local.get 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:156 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (result f64) (local f64 i64) (f64.neg (local.get 1))))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:164 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:168 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param f32) (result i32) (i32.eqz (local.get 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:172 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param f64 i64) (result f64) (f64.neg (local.get 1))))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:180 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-vs-i32 (local i32) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:184 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-vs-i64 (local i64) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:188 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-vs-f32 (local f32) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:192 -assert_invalid( - () => - instantiate( - `(module (func $$type-empty-vs-f64 (local f64) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_get.wast:200 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-local (local i32 i64) (local.get 3)))`, - ), - `unknown local`, -); - -// ./test/core/local_get.wast:204 -assert_invalid( - () => - instantiate( - `(module (func $$large-local (local i32 i64) (local.get 14324343)))`, - ), - `unknown local`, -); - -// ./test/core/local_get.wast:209 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-param (param i32 i64) (local.get 2)))`, - ), - `unknown local`, -); - -// ./test/core/local_get.wast:213 -assert_invalid( - () => - instantiate( - `(module (func $$large-param (param i32 i64) (local.get 714324343)))`, - ), - `unknown local`, -); - -// ./test/core/local_get.wast:218 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-mixed (param i32) (local i32 i64) (local.get 3)))`, - ), - `unknown local`, -); - -// ./test/core/local_get.wast:222 -assert_invalid( - () => - instantiate( - `(module (func $$large-mixed (param i64) (local i32 i64) (local.get 214324343)))`, - ), - `unknown local`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/local_tee.wast.js b/js/src/jit-test/tests/wasm/spec/threads/local_tee.wast.js deleted file mode 100644 index cab23ccf782a..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/local_tee.wast.js +++ /dev/null @@ -1,857 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/local_tee.wast - -// ./test/core/local_tee.wast:3 -let $0 = instantiate(`(module - ;; Typing - - (func (export "type-local-i32") (result i32) (local i32) (local.tee 0 (i32.const 0))) - (func (export "type-local-i64") (result i64) (local i64) (local.tee 0 (i64.const 0))) - (func (export "type-local-f32") (result f32) (local f32) (local.tee 0 (f32.const 0))) - (func (export "type-local-f64") (result f64) (local f64) (local.tee 0 (f64.const 0))) - - (func (export "type-param-i32") (param i32) (result i32) (local.tee 0 (i32.const 10))) - (func (export "type-param-i64") (param i64) (result i64) (local.tee 0 (i64.const 11))) - (func (export "type-param-f32") (param f32) (result f32) (local.tee 0 (f32.const 11.1))) - (func (export "type-param-f64") (param f64) (result f64) (local.tee 0 (f64.const 12.2))) - - (func (export "type-mixed") (param i64 f32 f64 i32 i32) (local f32 i64 i64 f64) - (drop (i64.eqz (local.tee 0 (i64.const 0)))) - (drop (f32.neg (local.tee 1 (f32.const 0)))) - (drop (f64.neg (local.tee 2 (f64.const 0)))) - (drop (i32.eqz (local.tee 3 (i32.const 0)))) - (drop (i32.eqz (local.tee 4 (i32.const 0)))) - (drop (f32.neg (local.tee 5 (f32.const 0)))) - (drop (i64.eqz (local.tee 6 (i64.const 0)))) - (drop (i64.eqz (local.tee 7 (i64.const 0)))) - (drop (f64.neg (local.tee 8 (f64.const 0)))) - ) - - ;; Writing - - (func (export "write") (param i64 f32 f64 i32 i32) (result i64) (local f32 i64 i64 f64) - (drop (local.tee 1 (f32.const -0.3))) - (drop (local.tee 3 (i32.const 40))) - (drop (local.tee 4 (i32.const -7))) - (drop (local.tee 5 (f32.const 5.5))) - (drop (local.tee 6 (i64.const 6))) - (drop (local.tee 8 (f64.const 8))) - (i64.trunc_f64_s - (f64.add - (f64.convert_i64_u (local.get 0)) - (f64.add - (f64.promote_f32 (local.get 1)) - (f64.add - (local.get 2) - (f64.add - (f64.convert_i32_u (local.get 3)) - (f64.add - (f64.convert_i32_s (local.get 4)) - (f64.add - (f64.promote_f32 (local.get 5)) - (f64.add - (f64.convert_i64_u (local.get 6)) - (f64.add - (f64.convert_i64_u (local.get 7)) - (local.get 8) - ) - ) - ) - ) - ) - ) - ) - ) - ) - ) - - ;; Result - - (func (export "result") (param i64 f32 f64 i32 i32) (result f64) - (local f32 i64 i64 f64) - (f64.add - (f64.convert_i64_u (local.tee 0 (i64.const 1))) - (f64.add - (f64.promote_f32 (local.tee 1 (f32.const 2))) - (f64.add - (local.tee 2 (f64.const 3.3)) - (f64.add - (f64.convert_i32_u (local.tee 3 (i32.const 4))) - (f64.add - (f64.convert_i32_s (local.tee 4 (i32.const 5))) - (f64.add - (f64.promote_f32 (local.tee 5 (f32.const 5.5))) - (f64.add - (f64.convert_i64_u (local.tee 6 (i64.const 6))) - (f64.add - (f64.convert_i64_u (local.tee 7 (i64.const 0))) - (local.tee 8 (f64.const 8)) - ) - ) - ) - ) - ) - ) - ) - ) - ) - - (func $$dummy) - - (func (export "as-block-first") (param i32) (result i32) - (block (result i32) (local.tee 0 (i32.const 1)) (call $$dummy)) - ) - (func (export "as-block-mid") (param i32) (result i32) - (block (result i32) (call $$dummy) (local.tee 0 (i32.const 1)) (call $$dummy)) - ) - (func (export "as-block-last") (param i32) (result i32) - (block (result i32) (call $$dummy) (call $$dummy) (local.tee 0 (i32.const 1))) - ) - - (func (export "as-loop-first") (param i32) (result i32) - (loop (result i32) (local.tee 0 (i32.const 3)) (call $$dummy)) - ) - (func (export "as-loop-mid") (param i32) (result i32) - (loop (result i32) (call $$dummy) (local.tee 0 (i32.const 4)) (call $$dummy)) - ) - (func (export "as-loop-last") (param i32) (result i32) - (loop (result i32) (call $$dummy) (call $$dummy) (local.tee 0 (i32.const 5))) - ) - - (func (export "as-br-value") (param i32) (result i32) - (block (result i32) (br 0 (local.tee 0 (i32.const 9)))) - ) - - (func (export "as-br_if-cond") (param i32) - (block (br_if 0 (local.tee 0 (i32.const 1)))) - ) - (func (export "as-br_if-value") (param i32) (result i32) - (block (result i32) - (drop (br_if 0 (local.tee 0 (i32.const 8)) (i32.const 1))) (i32.const 7) - ) - ) - (func (export "as-br_if-value-cond") (param i32) (result i32) - (block (result i32) - (drop (br_if 0 (i32.const 6) (local.tee 0 (i32.const 9)))) (i32.const 7) - ) - ) - - (func (export "as-br_table-index") (param i32) - (block (br_table 0 0 0 (local.tee 0 (i32.const 0)))) - ) - (func (export "as-br_table-value") (param i32) (result i32) - (block (result i32) - (br_table 0 0 0 (local.tee 0 (i32.const 10)) (i32.const 1)) (i32.const 7) - ) - ) - (func (export "as-br_table-value-index") (param i32) (result i32) - (block (result i32) - (br_table 0 0 (i32.const 6) (local.tee 0 (i32.const 11))) (i32.const 7) - ) - ) - - (func (export "as-return-value") (param i32) (result i32) - (return (local.tee 0 (i32.const 7))) - ) - - (func (export "as-if-cond") (param i32) (result i32) - (if (result i32) (local.tee 0 (i32.const 2)) - (then (i32.const 0)) (else (i32.const 1)) - ) - ) - (func (export "as-if-then") (param i32) (result i32) - (if (result i32) (local.get 0) - (then (local.tee 0 (i32.const 3))) (else (local.get 0)) - ) - ) - (func (export "as-if-else") (param i32) (result i32) - (if (result i32) (local.get 0) - (then (local.get 0)) (else (local.tee 0 (i32.const 4))) - ) - ) - - (func (export "as-select-first") (param i32 i32) (result i32) - (select (local.tee 0 (i32.const 5)) (local.get 0) (local.get 1)) - ) - (func (export "as-select-second") (param i32 i32) (result i32) - (select (local.get 0) (local.tee 0 (i32.const 6)) (local.get 1)) - ) - (func (export "as-select-cond") (param i32) (result i32) - (select (i32.const 0) (i32.const 1) (local.tee 0 (i32.const 7))) - ) - - (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) - (func (export "as-call-first") (param i32) (result i32) - (call $$f (local.tee 0 (i32.const 12)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-call-mid") (param i32) (result i32) - (call $$f (i32.const 1) (local.tee 0 (i32.const 13)) (i32.const 3)) - ) - (func (export "as-call-last") (param i32) (result i32) - (call $$f (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 14))) - ) - - (type $$sig (func (param i32 i32 i32) (result i32))) - (table funcref (elem $$f)) - (func (export "as-call_indirect-first") (param i32) (result i32) - (call_indirect (type $$sig) - (local.tee 0 (i32.const 1)) (i32.const 2) (i32.const 3) (i32.const 0) - ) - ) - (func (export "as-call_indirect-mid") (param i32) (result i32) - (call_indirect (type $$sig) - (i32.const 1) (local.tee 0 (i32.const 2)) (i32.const 3) (i32.const 0) - ) - ) - (func (export "as-call_indirect-last") (param i32) (result i32) - (call_indirect (type $$sig) - (i32.const 1) (i32.const 2) (local.tee 0 (i32.const 3)) (i32.const 0) - ) - ) - (func (export "as-call_indirect-index") (param i32) (result i32) - (call_indirect (type $$sig) - (i32.const 1) (i32.const 2) (i32.const 3) (local.tee 0 (i32.const 0)) - ) - ) - - (func (export "as-local.set-value") (local i32) - (local.set 0 (local.tee 0 (i32.const 1))) - ) - (func (export "as-local.tee-value") (param i32) (result i32) - (local.tee 0 (local.tee 0 (i32.const 1))) - ) - (global $$g (mut i32) (i32.const 0)) - (func (export "as-global.set-value") (local i32) - (global.set $$g (local.tee 0 (i32.const 1))) - ) - - (memory 1) - (func (export "as-load-address") (param i32) (result i32) - (i32.load (local.tee 0 (i32.const 1))) - ) - (func (export "as-loadN-address") (param i32) (result i32) - (i32.load8_s (local.tee 0 (i32.const 3))) - ) - - (func (export "as-store-address") (param i32) - (i32.store (local.tee 0 (i32.const 30)) (i32.const 7)) - ) - (func (export "as-store-value") (param i32) - (i32.store (i32.const 2) (local.tee 0 (i32.const 1))) - ) - - (func (export "as-storeN-address") (param i32) - (i32.store8 (local.tee 0 (i32.const 1)) (i32.const 7)) - ) - (func (export "as-storeN-value") (param i32) - (i32.store16 (i32.const 2) (local.tee 0 (i32.const 1))) - ) - - (func (export "as-unary-operand") (param f32) (result f32) - (f32.neg (local.tee 0 (f32.const nan:0x0f1e2))) - ) - - (func (export "as-binary-left") (param i32) (result i32) - (i32.add (local.tee 0 (i32.const 3)) (i32.const 10)) - ) - (func (export "as-binary-right") (param i32) (result i32) - (i32.sub (i32.const 10) (local.tee 0 (i32.const 4))) - ) - - (func (export "as-test-operand") (param i32) (result i32) - (i32.eqz (local.tee 0 (i32.const 0))) - ) - - (func (export "as-compare-left") (param i32) (result i32) - (i32.le_s (local.tee 0 (i32.const 43)) (i32.const 10)) - ) - (func (export "as-compare-right") (param i32) (result i32) - (i32.ne (i32.const 10) (local.tee 0 (i32.const 42))) - ) - - (func (export "as-convert-operand") (param i64) (result i32) - (i32.wrap_i64 (local.tee 0 (i64.const 41))) - ) - - (func (export "as-memory.grow-size") (param i32) (result i32) - (memory.grow (local.tee 0 (i32.const 40))) - ) - -)`); - -// ./test/core/local_tee.wast:280 -assert_return(() => invoke($0, `type-local-i32`, []), [value("i32", 0)]); - -// ./test/core/local_tee.wast:281 -assert_return(() => invoke($0, `type-local-i64`, []), [value("i64", 0n)]); - -// ./test/core/local_tee.wast:282 -assert_return(() => invoke($0, `type-local-f32`, []), [value("f32", 0)]); - -// ./test/core/local_tee.wast:283 -assert_return(() => invoke($0, `type-local-f64`, []), [value("f64", 0)]); - -// ./test/core/local_tee.wast:285 -assert_return(() => invoke($0, `type-param-i32`, [2]), [value("i32", 10)]); - -// ./test/core/local_tee.wast:286 -assert_return(() => invoke($0, `type-param-i64`, [3n]), [value("i64", 11n)]); - -// ./test/core/local_tee.wast:287 -assert_return(() => invoke($0, `type-param-f32`, [value("f32", 4.4)]), [ - value("f32", 11.1), -]); - -// ./test/core/local_tee.wast:288 -assert_return(() => invoke($0, `type-param-f64`, [value("f64", 5.5)]), [ - value("f64", 12.2), -]); - -// ./test/core/local_tee.wast:290 -assert_return(() => invoke($0, `as-block-first`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:291 -assert_return(() => invoke($0, `as-block-mid`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:292 -assert_return(() => invoke($0, `as-block-last`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:294 -assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 3)]); - -// ./test/core/local_tee.wast:295 -assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 4)]); - -// ./test/core/local_tee.wast:296 -assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 5)]); - -// ./test/core/local_tee.wast:298 -assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 9)]); - -// ./test/core/local_tee.wast:300 -assert_return(() => invoke($0, `as-br_if-cond`, [0]), []); - -// ./test/core/local_tee.wast:301 -assert_return(() => invoke($0, `as-br_if-value`, [0]), [value("i32", 8)]); - -// ./test/core/local_tee.wast:302 -assert_return(() => invoke($0, `as-br_if-value-cond`, [0]), [value("i32", 6)]); - -// ./test/core/local_tee.wast:304 -assert_return(() => invoke($0, `as-br_table-index`, [0]), []); - -// ./test/core/local_tee.wast:305 -assert_return(() => invoke($0, `as-br_table-value`, [0]), [value("i32", 10)]); - -// ./test/core/local_tee.wast:306 -assert_return(() => invoke($0, `as-br_table-value-index`, [0]), [ - value("i32", 6), -]); - -// ./test/core/local_tee.wast:308 -assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 7)]); - -// ./test/core/local_tee.wast:310 -assert_return(() => invoke($0, `as-if-cond`, [0]), [value("i32", 0)]); - -// ./test/core/local_tee.wast:311 -assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 3)]); - -// ./test/core/local_tee.wast:312 -assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 4)]); - -// ./test/core/local_tee.wast:314 -assert_return(() => invoke($0, `as-select-first`, [0, 1]), [value("i32", 5)]); - -// ./test/core/local_tee.wast:315 -assert_return(() => invoke($0, `as-select-second`, [0, 0]), [value("i32", 6)]); - -// ./test/core/local_tee.wast:316 -assert_return(() => invoke($0, `as-select-cond`, [0]), [value("i32", 0)]); - -// ./test/core/local_tee.wast:318 -assert_return(() => invoke($0, `as-call-first`, [0]), [value("i32", -1)]); - -// ./test/core/local_tee.wast:319 -assert_return(() => invoke($0, `as-call-mid`, [0]), [value("i32", -1)]); - -// ./test/core/local_tee.wast:320 -assert_return(() => invoke($0, `as-call-last`, [0]), [value("i32", -1)]); - -// ./test/core/local_tee.wast:322 -assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [ - value("i32", -1), -]); - -// ./test/core/local_tee.wast:323 -assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [ - value("i32", -1), -]); - -// ./test/core/local_tee.wast:324 -assert_return(() => invoke($0, `as-call_indirect-last`, [0]), [ - value("i32", -1), -]); - -// ./test/core/local_tee.wast:325 -assert_return(() => invoke($0, `as-call_indirect-index`, [0]), [ - value("i32", -1), -]); - -// ./test/core/local_tee.wast:327 -assert_return(() => invoke($0, `as-local.set-value`, []), []); - -// ./test/core/local_tee.wast:328 -assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:329 -assert_return(() => invoke($0, `as-global.set-value`, []), []); - -// ./test/core/local_tee.wast:331 -assert_return(() => invoke($0, `as-load-address`, [0]), [value("i32", 0)]); - -// ./test/core/local_tee.wast:332 -assert_return(() => invoke($0, `as-loadN-address`, [0]), [value("i32", 0)]); - -// ./test/core/local_tee.wast:333 -assert_return(() => invoke($0, `as-store-address`, [0]), []); - -// ./test/core/local_tee.wast:334 -assert_return(() => invoke($0, `as-store-value`, [0]), []); - -// ./test/core/local_tee.wast:335 -assert_return(() => invoke($0, `as-storeN-address`, [0]), []); - -// ./test/core/local_tee.wast:336 -assert_return(() => invoke($0, `as-storeN-value`, [0]), []); - -// ./test/core/local_tee.wast:338 -assert_return(() => invoke($0, `as-unary-operand`, [value("f32", 0)]), [ - bytes("f32", [0xe2, 0xf1, 0x80, 0xff]), -]); - -// ./test/core/local_tee.wast:339 -assert_return(() => invoke($0, `as-binary-left`, [0]), [value("i32", 13)]); - -// ./test/core/local_tee.wast:340 -assert_return(() => invoke($0, `as-binary-right`, [0]), [value("i32", 6)]); - -// ./test/core/local_tee.wast:341 -assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:342 -assert_return(() => invoke($0, `as-compare-left`, [0]), [value("i32", 0)]); - -// ./test/core/local_tee.wast:343 -assert_return(() => invoke($0, `as-compare-right`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:344 -assert_return(() => invoke($0, `as-convert-operand`, [0n]), [value("i32", 41)]); - -// ./test/core/local_tee.wast:345 -assert_return(() => invoke($0, `as-memory.grow-size`, [0]), [value("i32", 1)]); - -// ./test/core/local_tee.wast:347 -assert_return( - () => - invoke($0, `type-mixed`, [1n, value("f32", 2.2), value("f64", 3.3), 4, 5]), - [], -); - -// ./test/core/local_tee.wast:353 -assert_return( - () => invoke($0, `write`, [1n, value("f32", 2), value("f64", 3.3), 4, 5]), - [value("i64", 56n)], -); - -// ./test/core/local_tee.wast:360 -assert_return( - () => - invoke($0, `result`, [-1n, value("f32", -2), value("f64", -3.3), -4, -5]), - [value("f64", 34.8)], -); - -// ./test/core/local_tee.wast:370 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (result i64) (local i32) (local.tee 0 (i32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:374 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (local f32) (i32.eqz (local.tee 0 (f32.const 0)))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:378 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-num-vs-num (local f64 i64) (f64.neg (local.tee 1 (i64.const 0)))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:383 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-arg-void-vs-num (local i32) (local.tee 0 (nop))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:387 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-arg-num-vs-num (local i32) (local.tee 0 (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:391 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-arg-num-vs-num (local f32) (local.tee 0 (f64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:395 -assert_invalid( - () => - instantiate( - `(module (func $$type-local-arg-num-vs-num (local f64 i64) (local.tee 1 (f64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:403 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param i32) (result i64) (local.get 0)))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:407 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param f32) (i32.eqz (local.get 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:411 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-num-vs-num (param f64 i64) (f64.neg (local.get 1))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:416 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-arg-void-vs-num (param i32) (local.tee 0 (nop))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:420 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-arg-num-vs-num (param i32) (local.tee 0 (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:424 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-arg-num-vs-num (param f32) (local.tee 0 (f64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:428 -assert_invalid( - () => - instantiate( - `(module (func $$type-param-arg-num-vs-num (param f64 i64) (local.tee 1 (f64.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:433 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num (param i32) - (local.tee 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:441 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-block (param i32) - (i32.const 0) - (block (local.tee 0) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:450 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-loop (param i32) - (i32.const 0) - (loop (local.tee 0) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:459 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-then (param i32) - (i32.const 0) (i32.const 0) - (if (then (local.tee 0) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:468 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-else (param i32) - (i32.const 0) (i32.const 0) - (if (result i32) (then (i32.const 0)) (else (local.tee 0))) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:477 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-br (param i32) - (i32.const 0) - (block (br 0 (local.tee 0)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:486 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-br_if (param i32) - (i32.const 0) - (block (br_if 0 (local.tee 0) (i32.const 1)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:495 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-br_table (param i32) - (i32.const 0) - (block (br_table 0 (local.tee 0)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:504 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-return (param i32) - (return (local.tee 0)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:512 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-select (param i32) - (select (local.tee 0) (i32.const 1) (i32.const 2)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:520 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-call (param i32) - (call 1 (local.tee 0)) (drop) - ) - (func (param i32) (result i32) (local.get 0)) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:529 -assert_invalid(() => - instantiate(`(module - (func $$f (param i32) (result i32) (local.get 0)) - (type $$sig (func (param i32) (result i32))) - (table funcref (elem $$f)) - (func $$type-param-arg-empty-vs-num-in-call_indirect (param i32) - (block (result i32) - (call_indirect (type $$sig) - (local.tee 0) (i32.const 0) - ) - (drop) - ) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:545 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-local.set (param i32) - (local.set 0 (local.tee 0)) (local.get 0) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:553 -assert_invalid(() => - instantiate(`(module - (func $$type-param-arg-empty-vs-num-in-local.tee (param i32) - (local.tee 0 (local.tee 0)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:561 -assert_invalid(() => - instantiate(`(module - (global $$x (mut i32) (i32.const 0)) - (func $$type-param-arg-empty-vs-num-in-global.set (param i32) - (global.set $$x (local.tee 0)) (global.get $$x) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:570 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-param-arg-empty-vs-num-in-memory.grow (param i32) - (memory.grow (local.tee 0)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:579 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-param-arg-empty-vs-num-in-load (param i32) - (i32.load (local.tee 0)) (drop) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:588 -assert_invalid(() => - instantiate(`(module - (memory 1) - (func $$type-param-arg-empty-vs-num-in-store (param i32) - (i32.store (local.tee 0) (i32.const 1)) - ) - )`), `type mismatch`); - -// ./test/core/local_tee.wast:601 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-local (local i32 i64) (local.get 3)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:605 -assert_invalid( - () => - instantiate( - `(module (func $$large-local (local i32 i64) (local.get 14324343)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:610 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-param (param i32 i64) (local.get 2)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:614 -assert_invalid( - () => - instantiate( - `(module (func $$large-param (local i32 i64) (local.get 714324343)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:619 -assert_invalid( - () => - instantiate( - `(module (func $$unbound-mixed (param i32) (local i32 i64) (local.get 3)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:623 -assert_invalid( - () => - instantiate( - `(module (func $$large-mixed (param i64) (local i32 i64) (local.get 214324343)))`, - ), - `unknown local`, -); - -// ./test/core/local_tee.wast:628 -assert_invalid( - () => - instantiate( - `(module (func $$type-mixed-arg-num-vs-num (param f32) (local i32) (local.tee 1 (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:632 -assert_invalid( - () => - instantiate( - `(module (func $$type-mixed-arg-num-vs-num (param i64 i32) (local f32) (local.tee 1 (f32.const 0))))`, - ), - `type mismatch`, -); - -// ./test/core/local_tee.wast:636 -assert_invalid( - () => - instantiate( - `(module (func $$type-mixed-arg-num-vs-num (param i64) (local f64 i64) (local.tee 1 (i64.const 0))))`, - ), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/loop.wast.js b/js/src/jit-test/tests/wasm/spec/threads/loop.wast.js deleted file mode 100644 index 9293145a4380..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/loop.wast.js +++ /dev/null @@ -1,665 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/loop.wast - -// ./test/core/loop.wast:3 -let $0 = instantiate(`(module - (memory 1) - - (func $$dummy) - - (func (export "empty") - (loop) - (loop $$l) - ) - - (func (export "singular") (result i32) - (loop (nop)) - (loop (result i32) (i32.const 7)) - ) - - (func (export "multi") (result i32) - (loop (call $$dummy) (call $$dummy) (call $$dummy) (call $$dummy)) - (loop (result i32) (call $$dummy) (call $$dummy) (call $$dummy) (i32.const 8)) - ) - - (func (export "nested") (result i32) - (loop (result i32) - (loop (call $$dummy) (block) (nop)) - (loop (result i32) (call $$dummy) (i32.const 9)) - ) - ) - - (func (export "deep") (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (loop (result i32) (block (result i32) - (call $$dummy) (i32.const 150) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - )) - ) - - (func (export "as-select-first") (result i32) - (select (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-select-mid") (result i32) - (select (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 3)) - ) - (func (export "as-select-last") (result i32) - (select (i32.const 2) (i32.const 3) (loop (result i32) (i32.const 1))) - ) - - (func (export "as-if-condition") - (loop (result i32) (i32.const 1)) (if (then (call $$dummy))) - ) - (func (export "as-if-then") (result i32) - (if (result i32) (i32.const 1) (then (loop (result i32) (i32.const 1))) (else (i32.const 2))) - ) - (func (export "as-if-else") (result i32) - (if (result i32) (i32.const 1) (then (i32.const 2)) (else (loop (result i32) (i32.const 1)))) - ) - - (func (export "as-br_if-first") (result i32) - (block (result i32) (br_if 0 (loop (result i32) (i32.const 1)) (i32.const 2))) - ) - (func (export "as-br_if-last") (result i32) - (block (result i32) (br_if 0 (i32.const 2) (loop (result i32) (i32.const 1)))) - ) - - (func (export "as-br_table-first") (result i32) - (block (result i32) (loop (result i32) (i32.const 1)) (i32.const 2) (br_table 0 0)) - ) - (func (export "as-br_table-last") (result i32) - (block (result i32) (i32.const 2) (loop (result i32) (i32.const 1)) (br_table 0 0)) - ) - - (func $$func (param i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-first") (result i32) - (block (result i32) - (call_indirect (type $$check) - (loop (result i32) (i32.const 1)) (i32.const 2) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 2) (loop (result i32) (i32.const 1)) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 2) (loop (result i32) (i32.const 0)) - ) - ) - ) - - (func (export "as-store-first") - (loop (result i32) (i32.const 1)) (i32.const 1) (i32.store) - ) - (func (export "as-store-last") - (i32.const 10) (loop (result i32) (i32.const 1)) (i32.store) - ) - - (func (export "as-memory.grow-value") (result i32) - (memory.grow (loop (result i32) (i32.const 1))) - ) - - (func $$f (param i32) (result i32) (local.get 0)) - - (func (export "as-call-value") (result i32) - (call $$f (loop (result i32) (i32.const 1))) - ) - (func (export "as-return-value") (result i32) - (loop (result i32) (i32.const 1)) (return) - ) - (func (export "as-drop-operand") - (drop (loop (result i32) (i32.const 1))) - ) - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (loop (result i32) (i32.const 1)))) - ) - (func (export "as-local.set-value") (result i32) - (local i32) (local.set 0 (loop (result i32) (i32.const 1))) (local.get 0) - ) - (func (export "as-local.tee-value") (result i32) - (local i32) (local.tee 0 (loop (result i32) (i32.const 1))) - ) - (global $$a (mut i32) (i32.const 0)) - (func (export "as-global.set-value") (result i32) - (global.set $$a (loop (result i32) (i32.const 1))) - (global.get $$a) - ) - (func (export "as-load-operand") (result i32) - (i32.load (loop (result i32) (i32.const 1))) - ) - - (func (export "as-unary-operand") (result i32) - (i32.ctz (loop (result i32) (call $$dummy) (i32.const 13))) - ) - (func (export "as-binary-operand") (result i32) - (i32.mul - (loop (result i32) (call $$dummy) (i32.const 3)) - (loop (result i32) (call $$dummy) (i32.const 4)) - ) - ) - (func (export "as-test-operand") (result i32) - (i32.eqz (loop (result i32) (call $$dummy) (i32.const 13))) - ) - (func (export "as-compare-operand") (result i32) - (f32.gt - (loop (result f32) (call $$dummy) (f32.const 3)) - (loop (result f32) (call $$dummy) (f32.const 3)) - ) - ) - - (func (export "break-bare") (result i32) - (block (loop (br 1) (br 0) (unreachable))) - (block (loop (br_if 1 (i32.const 1)) (unreachable))) - (block (loop (br_table 1 (i32.const 0)) (unreachable))) - (block (loop (br_table 1 1 1 (i32.const 1)) (unreachable))) - (i32.const 19) - ) - (func (export "break-value") (result i32) - (block (result i32) - (loop (result i32) (br 1 (i32.const 18)) (br 0) (i32.const 19)) - ) - ) - (func (export "break-repeated") (result i32) - (block (result i32) - (loop (result i32) - (br 1 (i32.const 18)) - (br 1 (i32.const 19)) - (drop (br_if 1 (i32.const 20) (i32.const 0))) - (drop (br_if 1 (i32.const 20) (i32.const 1))) - (br 1 (i32.const 21)) - (br_table 1 (i32.const 22) (i32.const 0)) - (br_table 1 1 1 (i32.const 23) (i32.const 1)) - (i32.const 21) - ) - ) - ) - (func (export "break-inner") (result i32) - (local i32) - (local.set 0 (i32.const 0)) - (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (br 2 (i32.const 0x1))))))) - (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (loop (result i32) (br 2 (i32.const 0x2))))))) - (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (block (result i32) (loop (result i32) (br 1 (i32.const 0x4)))))))) - (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (br 1 (i32.const 0x8))))))) - (local.set 0 (i32.add (local.get 0) (block (result i32) (loop (result i32) (i32.ctz (loop (result i32) (br 2 (i32.const 0x10)))))))) - (local.get 0) - ) - (func (export "cont-inner") (result i32) - (local i32) - (local.set 0 (i32.const 0)) - (local.set 0 (i32.add (local.get 0) (loop (result i32) (loop (result i32) (br 1))))) - (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (br 0))))) - (local.set 0 (i32.add (local.get 0) (loop (result i32) (i32.ctz (loop (result i32) (br 1)))))) - (local.get 0) - ) - - (func $$fx (export "effects") (result i32) - (local i32) - (block - (loop - (local.set 0 (i32.const 1)) - (local.set 0 (i32.mul (local.get 0) (i32.const 3))) - (local.set 0 (i32.sub (local.get 0) (i32.const 5))) - (local.set 0 (i32.mul (local.get 0) (i32.const 7))) - (br 1) - (local.set 0 (i32.mul (local.get 0) (i32.const 100))) - ) - ) - (i32.eq (local.get 0) (i32.const -14)) - ) - - (func (export "while") (param i64) (result i64) - (local i64) - (local.set 1 (i64.const 1)) - (block - (loop - (br_if 1 (i64.eqz (local.get 0))) - (local.set 1 (i64.mul (local.get 0) (local.get 1))) - (local.set 0 (i64.sub (local.get 0) (i64.const 1))) - (br 0) - ) - ) - (local.get 1) - ) - - (func (export "for") (param i64) (result i64) - (local i64 i64) - (local.set 1 (i64.const 1)) - (local.set 2 (i64.const 2)) - (block - (loop - (br_if 1 (i64.gt_u (local.get 2) (local.get 0))) - (local.set 1 (i64.mul (local.get 1) (local.get 2))) - (local.set 2 (i64.add (local.get 2) (i64.const 1))) - (br 0) - ) - ) - (local.get 1) - ) - - (func (export "nesting") (param f32 f32) (result f32) - (local f32 f32) - (block - (loop - (br_if 1 (f32.eq (local.get 0) (f32.const 0))) - (local.set 2 (local.get 1)) - (block - (loop - (br_if 1 (f32.eq (local.get 2) (f32.const 0))) - (br_if 3 (f32.lt (local.get 2) (f32.const 0))) - (local.set 3 (f32.add (local.get 3) (local.get 2))) - (local.set 2 (f32.sub (local.get 2) (f32.const 2))) - (br 0) - ) - ) - (local.set 3 (f32.div (local.get 3) (local.get 0))) - (local.set 0 (f32.sub (local.get 0) (f32.const 1))) - (br 0) - ) - ) - (local.get 3) - ) -)`); - -// ./test/core/loop.wast:305 -assert_return(() => invoke($0, `empty`, []), []); - -// ./test/core/loop.wast:306 -assert_return(() => invoke($0, `singular`, []), [value("i32", 7)]); - -// ./test/core/loop.wast:307 -assert_return(() => invoke($0, `multi`, []), [value("i32", 8)]); - -// ./test/core/loop.wast:308 -assert_return(() => invoke($0, `nested`, []), [value("i32", 9)]); - -// ./test/core/loop.wast:309 -assert_return(() => invoke($0, `deep`, []), [value("i32", 150)]); - -// ./test/core/loop.wast:311 -assert_return(() => invoke($0, `as-select-first`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:312 -assert_return(() => invoke($0, `as-select-mid`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:313 -assert_return(() => invoke($0, `as-select-last`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:315 -assert_return(() => invoke($0, `as-if-condition`, []), []); - -// ./test/core/loop.wast:316 -assert_return(() => invoke($0, `as-if-then`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:317 -assert_return(() => invoke($0, `as-if-else`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:319 -assert_return(() => invoke($0, `as-br_if-first`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:320 -assert_return(() => invoke($0, `as-br_if-last`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:322 -assert_return(() => invoke($0, `as-br_table-first`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:323 -assert_return(() => invoke($0, `as-br_table-last`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:325 -assert_return(() => invoke($0, `as-call_indirect-first`, []), [ - value("i32", 1), -]); - -// ./test/core/loop.wast:326 -assert_return(() => invoke($0, `as-call_indirect-mid`, []), [value("i32", 2)]); - -// ./test/core/loop.wast:327 -assert_return(() => invoke($0, `as-call_indirect-last`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:329 -assert_return(() => invoke($0, `as-store-first`, []), []); - -// ./test/core/loop.wast:330 -assert_return(() => invoke($0, `as-store-last`, []), []); - -// ./test/core/loop.wast:332 -assert_return(() => invoke($0, `as-memory.grow-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:333 -assert_return(() => invoke($0, `as-call-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:334 -assert_return(() => invoke($0, `as-return-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:335 -assert_return(() => invoke($0, `as-drop-operand`, []), []); - -// ./test/core/loop.wast:336 -assert_return(() => invoke($0, `as-br-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:337 -assert_return(() => invoke($0, `as-local.set-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:338 -assert_return(() => invoke($0, `as-local.tee-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:339 -assert_return(() => invoke($0, `as-global.set-value`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:340 -assert_return(() => invoke($0, `as-load-operand`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:342 -assert_return(() => invoke($0, `as-unary-operand`, []), [value("i32", 0)]); - -// ./test/core/loop.wast:343 -assert_return(() => invoke($0, `as-binary-operand`, []), [value("i32", 12)]); - -// ./test/core/loop.wast:344 -assert_return(() => invoke($0, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/loop.wast:345 -assert_return(() => invoke($0, `as-compare-operand`, []), [value("i32", 0)]); - -// ./test/core/loop.wast:347 -assert_return(() => invoke($0, `break-bare`, []), [value("i32", 19)]); - -// ./test/core/loop.wast:348 -assert_return(() => invoke($0, `break-value`, []), [value("i32", 18)]); - -// ./test/core/loop.wast:349 -assert_return(() => invoke($0, `break-repeated`, []), [value("i32", 18)]); - -// ./test/core/loop.wast:350 -assert_return(() => invoke($0, `break-inner`, []), [value("i32", 31)]); - -// ./test/core/loop.wast:352 -assert_return(() => invoke($0, `effects`, []), [value("i32", 1)]); - -// ./test/core/loop.wast:354 -assert_return(() => invoke($0, `while`, [0n]), [value("i64", 1n)]); - -// ./test/core/loop.wast:355 -assert_return(() => invoke($0, `while`, [1n]), [value("i64", 1n)]); - -// ./test/core/loop.wast:356 -assert_return(() => invoke($0, `while`, [2n]), [value("i64", 2n)]); - -// ./test/core/loop.wast:357 -assert_return(() => invoke($0, `while`, [3n]), [value("i64", 6n)]); - -// ./test/core/loop.wast:358 -assert_return(() => invoke($0, `while`, [5n]), [value("i64", 120n)]); - -// ./test/core/loop.wast:359 -assert_return(() => invoke($0, `while`, [20n]), [ - value("i64", 2432902008176640000n), -]); - -// ./test/core/loop.wast:361 -assert_return(() => invoke($0, `for`, [0n]), [value("i64", 1n)]); - -// ./test/core/loop.wast:362 -assert_return(() => invoke($0, `for`, [1n]), [value("i64", 1n)]); - -// ./test/core/loop.wast:363 -assert_return(() => invoke($0, `for`, [2n]), [value("i64", 2n)]); - -// ./test/core/loop.wast:364 -assert_return(() => invoke($0, `for`, [3n]), [value("i64", 6n)]); - -// ./test/core/loop.wast:365 -assert_return(() => invoke($0, `for`, [5n]), [value("i64", 120n)]); - -// ./test/core/loop.wast:366 -assert_return(() => invoke($0, `for`, [20n]), [ - value("i64", 2432902008176640000n), -]); - -// ./test/core/loop.wast:368 -assert_return(() => invoke($0, `nesting`, [value("f32", 0), value("f32", 7)]), [ - value("f32", 0), -]); - -// ./test/core/loop.wast:369 -assert_return(() => invoke($0, `nesting`, [value("f32", 7), value("f32", 0)]), [ - value("f32", 0), -]); - -// ./test/core/loop.wast:370 -assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 1)]), [ - value("f32", 1), -]); - -// ./test/core/loop.wast:371 -assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 2)]), [ - value("f32", 2), -]); - -// ./test/core/loop.wast:372 -assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 3)]), [ - value("f32", 4), -]); - -// ./test/core/loop.wast:373 -assert_return(() => invoke($0, `nesting`, [value("f32", 1), value("f32", 4)]), [ - value("f32", 6), -]); - -// ./test/core/loop.wast:374 -assert_return( - () => invoke($0, `nesting`, [value("f32", 1), value("f32", 100)]), - [value("f32", 2550)], -); - -// ./test/core/loop.wast:375 -assert_return( - () => invoke($0, `nesting`, [value("f32", 1), value("f32", 101)]), - [value("f32", 2601)], -); - -// ./test/core/loop.wast:376 -assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 1)]), [ - value("f32", 1), -]); - -// ./test/core/loop.wast:377 -assert_return(() => invoke($0, `nesting`, [value("f32", 3), value("f32", 1)]), [ - value("f32", 1), -]); - -// ./test/core/loop.wast:378 -assert_return( - () => invoke($0, `nesting`, [value("f32", 10), value("f32", 1)]), - [value("f32", 1)], -); - -// ./test/core/loop.wast:379 -assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 2)]), [ - value("f32", 3), -]); - -// ./test/core/loop.wast:380 -assert_return(() => invoke($0, `nesting`, [value("f32", 2), value("f32", 3)]), [ - value("f32", 4), -]); - -// ./test/core/loop.wast:381 -assert_return(() => invoke($0, `nesting`, [value("f32", 7), value("f32", 4)]), [ - value("f32", 10.309524), -]); - -// ./test/core/loop.wast:382 -assert_return( - () => invoke($0, `nesting`, [value("f32", 7), value("f32", 100)]), - [value("f32", 4381.548)], -); - -// ./test/core/loop.wast:383 -assert_return( - () => invoke($0, `nesting`, [value("f32", 7), value("f32", 101)]), - [value("f32", 2601)], -); - -// ./test/core/loop.wast:385 -assert_invalid( - () => instantiate(`(module (func $$type-empty-i32 (result i32) (loop)))`), - `type mismatch`, -); - -// ./test/core/loop.wast:389 -assert_invalid( - () => instantiate(`(module (func $$type-empty-i64 (result i64) (loop)))`), - `type mismatch`, -); - -// ./test/core/loop.wast:393 -assert_invalid( - () => instantiate(`(module (func $$type-empty-f32 (result f32) (loop)))`), - `type mismatch`, -); - -// ./test/core/loop.wast:397 -assert_invalid( - () => instantiate(`(module (func $$type-empty-f64 (result f64) (loop)))`), - `type mismatch`, -); - -// ./test/core/loop.wast:402 -assert_invalid(() => - instantiate(`(module (func $$type-value-num-vs-void - (loop (i32.const 1)) - ))`), `type mismatch`); - -// ./test/core/loop.wast:408 -assert_invalid( - () => - instantiate(`(module (func $$type-value-empty-vs-num (result i32) - (loop (result i32)) - ))`), - `type mismatch`, -); - -// ./test/core/loop.wast:414 -assert_invalid( - () => - instantiate(`(module (func $$type-value-void-vs-num (result i32) - (loop (result i32) (nop)) - ))`), - `type mismatch`, -); - -// ./test/core/loop.wast:420 -assert_invalid( - () => - instantiate(`(module (func $$type-value-num-vs-num (result i32) - (loop (result i32) (f32.const 0)) - ))`), - `type mismatch`, -); - -// ./test/core/loop.wast:426 -assert_invalid( - () => - instantiate(`(module (func $$type-value-unreached-select (result i32) - (loop (result i64) (select (unreachable) (unreachable) (unreachable))) - ))`), - `type mismatch`, -); - -// ./test/core/loop.wast:433 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-block - (i32.const 0) - (block (loop (result i32)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/loop.wast:442 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-loop - (i32.const 0) - (loop (loop (result i32)) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/loop.wast:451 -assert_invalid(() => - instantiate(`(module - (func $$type-value-empty-in-then - (i32.const 0) (i32.const 0) - (if (then (loop (result i32)) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/loop.wast:462 -assert_malformed( - () => instantiate(`(func loop end $$l) `), - `mismatching label`, -); - -// ./test/core/loop.wast:466 -assert_malformed( - () => instantiate(`(func loop $$a end $$l) `), - `mismatching label`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/memory.wast.js b/js/src/jit-test/tests/wasm/spec/threads/memory.wast.js deleted file mode 100644 index 2ca6b714e099..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/memory.wast.js +++ /dev/null @@ -1,434 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/memory.wast - -// ./test/core/memory.wast:3 -let $0 = instantiate(`(module (memory 0 0))`); - -// ./test/core/memory.wast:4 -let $1 = instantiate(`(module (memory 0 1))`); - -// ./test/core/memory.wast:5 -let $2 = instantiate(`(module (memory 1 256))`); - -// ./test/core/memory.wast:6 -let $3 = instantiate(`(module (memory 0 65536))`); - -// ./test/core/memory.wast:7 -let $4 = instantiate(`(module (memory 0 0 shared))`); - -// ./test/core/memory.wast:8 -let $5 = instantiate(`(module (memory 1 2 shared))`); - -// ./test/core/memory.wast:10 -assert_invalid( - () => instantiate(`(module (memory 1 shared))`), - `shared memory must have maximum`, -); - -// ./test/core/memory.wast:12 -assert_invalid( - () => instantiate(`(module (memory 0) (memory 0))`), - `multiple memories`, -); - -// ./test/core/memory.wast:13 -assert_invalid( - () => - instantiate(`(module (memory (import "spectest" "memory") 0) (memory 0))`), - `multiple memories`, -); - -// ./test/core/memory.wast:15 -let $6 = instantiate( - `(module (memory (data)) (func (export "memsize") (result i32) (memory.size)))`, -); - -// ./test/core/memory.wast:16 -assert_return(() => invoke($6, `memsize`, []), [value("i32", 0)]); - -// ./test/core/memory.wast:17 -let $7 = instantiate( - `(module (memory (data "")) (func (export "memsize") (result i32) (memory.size)))`, -); - -// ./test/core/memory.wast:18 -assert_return(() => invoke($7, `memsize`, []), [value("i32", 0)]); - -// ./test/core/memory.wast:19 -let $8 = instantiate( - `(module (memory (data "x")) (func (export "memsize") (result i32) (memory.size)))`, -); - -// ./test/core/memory.wast:20 -assert_return(() => invoke($8, `memsize`, []), [value("i32", 1)]); - -// ./test/core/memory.wast:22 -assert_invalid( - () => instantiate(`(module (data (i32.const 0)))`), - `unknown memory`, -); - -// ./test/core/memory.wast:23 -assert_invalid( - () => instantiate(`(module (data (i32.const 0) ""))`), - `unknown memory`, -); - -// ./test/core/memory.wast:24 -assert_invalid( - () => instantiate(`(module (data (i32.const 0) "x"))`), - `unknown memory`, -); - -// ./test/core/memory.wast:26 -assert_invalid( - () => instantiate(`(module (func (drop (f32.load (i32.const 0)))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:30 -assert_invalid( - () => instantiate(`(module (func (f32.store (i32.const 0) (f32.const 0))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:34 -assert_invalid( - () => instantiate(`(module (func (drop (i32.load8_s (i32.const 0)))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:38 -assert_invalid( - () => instantiate(`(module (func (i32.store8 (i32.const 0) (i32.const 0))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:42 -assert_invalid( - () => instantiate(`(module (func (drop (memory.size))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:46 -assert_invalid( - () => instantiate(`(module (func (drop (memory.grow (i32.const 0)))))`), - `unknown memory`, -); - -// ./test/core/memory.wast:52 -assert_invalid( - () => instantiate(`(module (memory 1 0))`), - `size minimum must not be greater than maximum`, -); - -// ./test/core/memory.wast:56 -assert_invalid( - () => instantiate(`(module (memory 65537))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:60 -assert_invalid( - () => instantiate(`(module (memory 2147483648))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:64 -assert_invalid( - () => instantiate(`(module (memory 4294967295))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:68 -assert_invalid( - () => instantiate(`(module (memory 0 65537))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:72 -assert_invalid( - () => instantiate(`(module (memory 0 2147483648))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:76 -assert_invalid( - () => instantiate(`(module (memory 0 4294967295))`), - `memory size must be at most 65536 pages (4GiB)`, -); - -// ./test/core/memory.wast:81 -let $9 = instantiate(`(module - (memory 1) - (data (i32.const 0) "ABC\\a7D") (data (i32.const 20) "WASM") - - ;; Data section - (func (export "data") (result i32) - (i32.and - (i32.and - (i32.and - (i32.eq (i32.load8_u (i32.const 0)) (i32.const 65)) - (i32.eq (i32.load8_u (i32.const 3)) (i32.const 167)) - ) - (i32.and - (i32.eq (i32.load8_u (i32.const 6)) (i32.const 0)) - (i32.eq (i32.load8_u (i32.const 19)) (i32.const 0)) - ) - ) - (i32.and - (i32.and - (i32.eq (i32.load8_u (i32.const 20)) (i32.const 87)) - (i32.eq (i32.load8_u (i32.const 23)) (i32.const 77)) - ) - (i32.and - (i32.eq (i32.load8_u (i32.const 24)) (i32.const 0)) - (i32.eq (i32.load8_u (i32.const 1023)) (i32.const 0)) - ) - ) - ) - ) - - ;; Memory cast - (func (export "cast") (result f64) - (i64.store (i32.const 8) (i64.const -12345)) - (if - (f64.eq - (f64.load (i32.const 8)) - (f64.reinterpret_i64 (i64.const -12345)) - ) - (then (return (f64.const 0))) - ) - (i64.store align=1 (i32.const 9) (i64.const 0)) - (i32.store16 align=1 (i32.const 15) (i32.const 16453)) - (f64.load align=1 (i32.const 9)) - ) - - ;; Sign and zero extending memory loads - (func (export "i32_load8_s") (param $$i i32) (result i32) - (i32.store8 (i32.const 8) (local.get $$i)) - (i32.load8_s (i32.const 8)) - ) - (func (export "i32_load8_u") (param $$i i32) (result i32) - (i32.store8 (i32.const 8) (local.get $$i)) - (i32.load8_u (i32.const 8)) - ) - (func (export "i32_load16_s") (param $$i i32) (result i32) - (i32.store16 (i32.const 8) (local.get $$i)) - (i32.load16_s (i32.const 8)) - ) - (func (export "i32_load16_u") (param $$i i32) (result i32) - (i32.store16 (i32.const 8) (local.get $$i)) - (i32.load16_u (i32.const 8)) - ) - (func (export "i64_load8_s") (param $$i i64) (result i64) - (i64.store8 (i32.const 8) (local.get $$i)) - (i64.load8_s (i32.const 8)) - ) - (func (export "i64_load8_u") (param $$i i64) (result i64) - (i64.store8 (i32.const 8) (local.get $$i)) - (i64.load8_u (i32.const 8)) - ) - (func (export "i64_load16_s") (param $$i i64) (result i64) - (i64.store16 (i32.const 8) (local.get $$i)) - (i64.load16_s (i32.const 8)) - ) - (func (export "i64_load16_u") (param $$i i64) (result i64) - (i64.store16 (i32.const 8) (local.get $$i)) - (i64.load16_u (i32.const 8)) - ) - (func (export "i64_load32_s") (param $$i i64) (result i64) - (i64.store32 (i32.const 8) (local.get $$i)) - (i64.load32_s (i32.const 8)) - ) - (func (export "i64_load32_u") (param $$i i64) (result i64) - (i64.store32 (i32.const 8) (local.get $$i)) - (i64.load32_u (i32.const 8)) - ) -)`); - -// ./test/core/memory.wast:169 -assert_return(() => invoke($9, `data`, []), [value("i32", 1)]); - -// ./test/core/memory.wast:170 -assert_return(() => invoke($9, `cast`, []), [value("f64", 42)]); - -// ./test/core/memory.wast:172 -assert_return(() => invoke($9, `i32_load8_s`, [-1]), [value("i32", -1)]); - -// ./test/core/memory.wast:173 -assert_return(() => invoke($9, `i32_load8_u`, [-1]), [value("i32", 255)]); - -// ./test/core/memory.wast:174 -assert_return(() => invoke($9, `i32_load16_s`, [-1]), [value("i32", -1)]); - -// ./test/core/memory.wast:175 -assert_return(() => invoke($9, `i32_load16_u`, [-1]), [value("i32", 65535)]); - -// ./test/core/memory.wast:177 -assert_return(() => invoke($9, `i32_load8_s`, [100]), [value("i32", 100)]); - -// ./test/core/memory.wast:178 -assert_return(() => invoke($9, `i32_load8_u`, [200]), [value("i32", 200)]); - -// ./test/core/memory.wast:179 -assert_return(() => invoke($9, `i32_load16_s`, [20000]), [value("i32", 20000)]); - -// ./test/core/memory.wast:180 -assert_return(() => invoke($9, `i32_load16_u`, [40000]), [value("i32", 40000)]); - -// ./test/core/memory.wast:182 -assert_return(() => invoke($9, `i32_load8_s`, [-19110589]), [value("i32", 67)]); - -// ./test/core/memory.wast:183 -assert_return(() => invoke($9, `i32_load8_s`, [878104047]), [ - value("i32", -17), -]); - -// ./test/core/memory.wast:184 -assert_return(() => invoke($9, `i32_load8_u`, [-19110589]), [value("i32", 67)]); - -// ./test/core/memory.wast:185 -assert_return(() => invoke($9, `i32_load8_u`, [878104047]), [ - value("i32", 239), -]); - -// ./test/core/memory.wast:186 -assert_return(() => invoke($9, `i32_load16_s`, [-19110589]), [ - value("i32", 25923), -]); - -// ./test/core/memory.wast:187 -assert_return(() => invoke($9, `i32_load16_s`, [878104047]), [ - value("i32", -12817), -]); - -// ./test/core/memory.wast:188 -assert_return(() => invoke($9, `i32_load16_u`, [-19110589]), [ - value("i32", 25923), -]); - -// ./test/core/memory.wast:189 -assert_return(() => invoke($9, `i32_load16_u`, [878104047]), [ - value("i32", 52719), -]); - -// ./test/core/memory.wast:191 -assert_return(() => invoke($9, `i64_load8_s`, [-1n]), [value("i64", -1n)]); - -// ./test/core/memory.wast:192 -assert_return(() => invoke($9, `i64_load8_u`, [-1n]), [value("i64", 255n)]); - -// ./test/core/memory.wast:193 -assert_return(() => invoke($9, `i64_load16_s`, [-1n]), [value("i64", -1n)]); - -// ./test/core/memory.wast:194 -assert_return(() => invoke($9, `i64_load16_u`, [-1n]), [value("i64", 65535n)]); - -// ./test/core/memory.wast:195 -assert_return(() => invoke($9, `i64_load32_s`, [-1n]), [value("i64", -1n)]); - -// ./test/core/memory.wast:196 -assert_return(() => invoke($9, `i64_load32_u`, [-1n]), [ - value("i64", 4294967295n), -]); - -// ./test/core/memory.wast:198 -assert_return(() => invoke($9, `i64_load8_s`, [100n]), [value("i64", 100n)]); - -// ./test/core/memory.wast:199 -assert_return(() => invoke($9, `i64_load8_u`, [200n]), [value("i64", 200n)]); - -// ./test/core/memory.wast:200 -assert_return(() => invoke($9, `i64_load16_s`, [20000n]), [ - value("i64", 20000n), -]); - -// ./test/core/memory.wast:201 -assert_return(() => invoke($9, `i64_load16_u`, [40000n]), [ - value("i64", 40000n), -]); - -// ./test/core/memory.wast:202 -assert_return(() => invoke($9, `i64_load32_s`, [20000n]), [ - value("i64", 20000n), -]); - -// ./test/core/memory.wast:203 -assert_return(() => invoke($9, `i64_load32_u`, [40000n]), [ - value("i64", 40000n), -]); - -// ./test/core/memory.wast:205 -assert_return(() => invoke($9, `i64_load8_s`, [-81985529755441853n]), [ - value("i64", 67n), -]); - -// ./test/core/memory.wast:206 -assert_return(() => invoke($9, `i64_load8_s`, [3771275841602506223n]), [ - value("i64", -17n), -]); - -// ./test/core/memory.wast:207 -assert_return(() => invoke($9, `i64_load8_u`, [-81985529755441853n]), [ - value("i64", 67n), -]); - -// ./test/core/memory.wast:208 -assert_return(() => invoke($9, `i64_load8_u`, [3771275841602506223n]), [ - value("i64", 239n), -]); - -// ./test/core/memory.wast:209 -assert_return(() => invoke($9, `i64_load16_s`, [-81985529755441853n]), [ - value("i64", 25923n), -]); - -// ./test/core/memory.wast:210 -assert_return(() => invoke($9, `i64_load16_s`, [3771275841602506223n]), [ - value("i64", -12817n), -]); - -// ./test/core/memory.wast:211 -assert_return(() => invoke($9, `i64_load16_u`, [-81985529755441853n]), [ - value("i64", 25923n), -]); - -// ./test/core/memory.wast:212 -assert_return(() => invoke($9, `i64_load16_u`, [3771275841602506223n]), [ - value("i64", 52719n), -]); - -// ./test/core/memory.wast:213 -assert_return(() => invoke($9, `i64_load32_s`, [-81985529755441853n]), [ - value("i64", 1446274371n), -]); - -// ./test/core/memory.wast:214 -assert_return(() => invoke($9, `i64_load32_s`, [3771275841602506223n]), [ - value("i64", -1732588049n), -]); - -// ./test/core/memory.wast:215 -assert_return(() => invoke($9, `i64_load32_u`, [-81985529755441853n]), [ - value("i64", 1446274371n), -]); - -// ./test/core/memory.wast:216 -assert_return(() => invoke($9, `i64_load32_u`, [3771275841602506223n]), [ - value("i64", 2562379247n), -]); diff --git a/js/src/jit-test/tests/wasm/spec/threads/memory_grow.wast.js b/js/src/jit-test/tests/wasm/spec/threads/memory_grow.wast.js deleted file mode 100644 index 203681c1d123..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/memory_grow.wast.js +++ /dev/null @@ -1,562 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/memory_grow.wast - -// ./test/core/memory_grow.wast:1 -let $0 = instantiate(`(module - (memory 0) - - (func (export "load_at_zero") (result i32) (i32.load (i32.const 0))) - (func (export "store_at_zero") (i32.store (i32.const 0) (i32.const 2))) - - (func (export "load_at_page_size") (result i32) (i32.load (i32.const 0x10000))) - (func (export "store_at_page_size") (i32.store (i32.const 0x10000) (i32.const 3))) - - (func (export "grow") (param $$sz i32) (result i32) (memory.grow (local.get $$sz))) - (func (export "size") (result i32) (memory.size)) -)`); - -// ./test/core/memory_grow.wast:14 -assert_return(() => invoke($0, `size`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:15 -assert_trap( - () => invoke($0, `store_at_zero`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:16 -assert_trap( - () => invoke($0, `load_at_zero`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:17 -assert_trap( - () => invoke($0, `store_at_page_size`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:18 -assert_trap( - () => invoke($0, `load_at_page_size`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:19 -assert_return(() => invoke($0, `grow`, [1]), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:20 -assert_return(() => invoke($0, `size`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:21 -assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:22 -assert_return(() => invoke($0, `store_at_zero`, []), []); - -// ./test/core/memory_grow.wast:23 -assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); - -// ./test/core/memory_grow.wast:24 -assert_trap( - () => invoke($0, `store_at_page_size`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:25 -assert_trap( - () => invoke($0, `load_at_page_size`, []), - `out of bounds memory access`, -); - -// ./test/core/memory_grow.wast:26 -assert_return(() => invoke($0, `grow`, [4]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:27 -assert_return(() => invoke($0, `size`, []), [value("i32", 5)]); - -// ./test/core/memory_grow.wast:28 -assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); - -// ./test/core/memory_grow.wast:29 -assert_return(() => invoke($0, `store_at_zero`, []), []); - -// ./test/core/memory_grow.wast:30 -assert_return(() => invoke($0, `load_at_zero`, []), [value("i32", 2)]); - -// ./test/core/memory_grow.wast:31 -assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:32 -assert_return(() => invoke($0, `store_at_page_size`, []), []); - -// ./test/core/memory_grow.wast:33 -assert_return(() => invoke($0, `load_at_page_size`, []), [value("i32", 3)]); - -// ./test/core/memory_grow.wast:36 -let $1 = instantiate(`(module - (memory 0) - (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) -)`); - -// ./test/core/memory_grow.wast:41 -assert_return(() => invoke($1, `grow`, [0]), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:42 -assert_return(() => invoke($1, `grow`, [1]), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:43 -assert_return(() => invoke($1, `grow`, [0]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:44 -assert_return(() => invoke($1, `grow`, [2]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:45 -assert_return(() => invoke($1, `grow`, [800]), [value("i32", 3)]); - -// ./test/core/memory_grow.wast:46 -assert_return(() => invoke($1, `grow`, [65536]), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:47 -assert_return(() => invoke($1, `grow`, [64736]), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:48 -assert_return(() => invoke($1, `grow`, [1]), [value("i32", 803)]); - -// ./test/core/memory_grow.wast:50 -let $2 = instantiate(`(module - (memory 0 10) - (func (export "grow") (param i32) (result i32) (memory.grow (local.get 0))) -)`); - -// ./test/core/memory_grow.wast:55 -assert_return(() => invoke($2, `grow`, [0]), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:56 -assert_return(() => invoke($2, `grow`, [1]), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:57 -assert_return(() => invoke($2, `grow`, [1]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:58 -assert_return(() => invoke($2, `grow`, [2]), [value("i32", 2)]); - -// ./test/core/memory_grow.wast:59 -assert_return(() => invoke($2, `grow`, [6]), [value("i32", 4)]); - -// ./test/core/memory_grow.wast:60 -assert_return(() => invoke($2, `grow`, [0]), [value("i32", 10)]); - -// ./test/core/memory_grow.wast:61 -assert_return(() => invoke($2, `grow`, [1]), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:62 -assert_return(() => invoke($2, `grow`, [65536]), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:66 -let $3 = instantiate(`(module - (memory 1) - (func (export "grow") (param i32) (result i32) - (memory.grow (local.get 0)) - ) - (func (export "check-memory-zero") (param i32 i32) (result i32) - (local i32) - (local.set 2 (i32.const 1)) - (block - (loop - (local.set 2 (i32.load8_u (local.get 0))) - (br_if 1 (i32.ne (local.get 2) (i32.const 0))) - (br_if 1 (i32.ge_u (local.get 0) (local.get 1))) - (local.set 0 (i32.add (local.get 0) (i32.const 1))) - (br_if 0 (i32.le_u (local.get 0) (local.get 1))) - ) - ) - (local.get 2) - ) -)`); - -// ./test/core/memory_grow.wast:87 -assert_return(() => invoke($3, `check-memory-zero`, [0, 65535]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:88 -assert_return(() => invoke($3, `grow`, [1]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:89 -assert_return(() => invoke($3, `check-memory-zero`, [65536, 131071]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:90 -assert_return(() => invoke($3, `grow`, [1]), [value("i32", 2)]); - -// ./test/core/memory_grow.wast:91 -assert_return(() => invoke($3, `check-memory-zero`, [131072, 196607]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:92 -assert_return(() => invoke($3, `grow`, [1]), [value("i32", 3)]); - -// ./test/core/memory_grow.wast:93 -assert_return(() => invoke($3, `check-memory-zero`, [196608, 262143]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:94 -assert_return(() => invoke($3, `grow`, [1]), [value("i32", 4)]); - -// ./test/core/memory_grow.wast:95 -assert_return(() => invoke($3, `check-memory-zero`, [262144, 327679]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:96 -assert_return(() => invoke($3, `grow`, [1]), [value("i32", 5)]); - -// ./test/core/memory_grow.wast:97 -assert_return(() => invoke($3, `check-memory-zero`, [327680, 393215]), [ - value("i32", 0), -]); - -// ./test/core/memory_grow.wast:101 -let $4 = instantiate(`(module - (memory 1) - - (func (export "as-br-value") (result i32) - (block (result i32) (br 0 (memory.grow (i32.const 0)))) - ) - - (func (export "as-br_if-cond") - (block (br_if 0 (memory.grow (i32.const 0)))) - ) - (func (export "as-br_if-value") (result i32) - (block (result i32) - (drop (br_if 0 (memory.grow (i32.const 0)) (i32.const 1))) (i32.const 7) - ) - ) - (func (export "as-br_if-value-cond") (result i32) - (block (result i32) - (drop (br_if 0 (i32.const 6) (memory.grow (i32.const 0)))) (i32.const 7) - ) - ) - - (func (export "as-br_table-index") - (block (br_table 0 0 0 (memory.grow (i32.const 0)))) - ) - (func (export "as-br_table-value") (result i32) - (block (result i32) - (br_table 0 0 0 (memory.grow (i32.const 0)) (i32.const 1)) (i32.const 7) - ) - ) - (func (export "as-br_table-value-index") (result i32) - (block (result i32) - (br_table 0 0 (i32.const 6) (memory.grow (i32.const 0))) (i32.const 7) - ) - ) - - (func (export "as-return-value") (result i32) - (return (memory.grow (i32.const 0))) - ) - - (func (export "as-if-cond") (result i32) - (if (result i32) (memory.grow (i32.const 0)) - (then (i32.const 0)) (else (i32.const 1)) - ) - ) - (func (export "as-if-then") (result i32) - (if (result i32) (i32.const 1) - (then (memory.grow (i32.const 0))) (else (i32.const 0)) - ) - ) - (func (export "as-if-else") (result i32) - (if (result i32) (i32.const 0) - (then (i32.const 0)) (else (memory.grow (i32.const 0))) - ) - ) - - (func (export "as-select-first") (param i32 i32) (result i32) - (select (memory.grow (i32.const 0)) (local.get 0) (local.get 1)) - ) - (func (export "as-select-second") (param i32 i32) (result i32) - (select (local.get 0) (memory.grow (i32.const 0)) (local.get 1)) - ) - (func (export "as-select-cond") (result i32) - (select (i32.const 0) (i32.const 1) (memory.grow (i32.const 0))) - ) - - (func $$f (param i32 i32 i32) (result i32) (i32.const -1)) - (func (export "as-call-first") (result i32) - (call $$f (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-call-mid") (result i32) - (call $$f (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3)) - ) - (func (export "as-call-last") (result i32) - (call $$f (i32.const 1) (i32.const 2) (memory.grow (i32.const 0))) - ) - - (type $$sig (func (param i32 i32 i32) (result i32))) - (table funcref (elem $$f)) - (func (export "as-call_indirect-first") (result i32) - (call_indirect (type $$sig) - (memory.grow (i32.const 0)) (i32.const 2) (i32.const 3) (i32.const 0) - ) - ) - (func (export "as-call_indirect-mid") (result i32) - (call_indirect (type $$sig) - (i32.const 1) (memory.grow (i32.const 0)) (i32.const 3) (i32.const 0) - ) - ) - (func (export "as-call_indirect-last") (result i32) - (call_indirect (type $$sig) - (i32.const 1) (i32.const 2) (memory.grow (i32.const 0)) (i32.const 0) - ) - ) - (func (export "as-call_indirect-index") (result i32) - (call_indirect (type $$sig) - (i32.const 1) (i32.const 2) (i32.const 3) (memory.grow (i32.const 0)) - ) - ) - - (func (export "as-local.set-value") (local i32) - (local.set 0 (memory.grow (i32.const 0))) - ) - (func (export "as-local.tee-value") (result i32) (local i32) - (local.tee 0 (memory.grow (i32.const 0))) - ) - (global $$g (mut i32) (i32.const 0)) - (func (export "as-global.set-value") (local i32) - (global.set $$g (memory.grow (i32.const 0))) - ) - - (func (export "as-load-address") (result i32) - (i32.load (memory.grow (i32.const 0))) - ) - (func (export "as-loadN-address") (result i32) - (i32.load8_s (memory.grow (i32.const 0))) - ) - - (func (export "as-store-address") - (i32.store (memory.grow (i32.const 0)) (i32.const 7)) - ) - (func (export "as-store-value") - (i32.store (i32.const 2) (memory.grow (i32.const 0))) - ) - - (func (export "as-storeN-address") - (i32.store8 (memory.grow (i32.const 0)) (i32.const 7)) - ) - (func (export "as-storeN-value") - (i32.store16 (i32.const 2) (memory.grow (i32.const 0))) - ) - - (func (export "as-unary-operand") (result i32) - (i32.clz (memory.grow (i32.const 0))) - ) - - (func (export "as-binary-left") (result i32) - (i32.add (memory.grow (i32.const 0)) (i32.const 10)) - ) - (func (export "as-binary-right") (result i32) - (i32.sub (i32.const 10) (memory.grow (i32.const 0))) - ) - - (func (export "as-test-operand") (result i32) - (i32.eqz (memory.grow (i32.const 0))) - ) - - (func (export "as-compare-left") (result i32) - (i32.le_s (memory.grow (i32.const 0)) (i32.const 10)) - ) - (func (export "as-compare-right") (result i32) - (i32.ne (i32.const 10) (memory.grow (i32.const 0))) - ) - - (func (export "as-memory.grow-size") (result i32) - (memory.grow (memory.grow (i32.const 0))) - ) -)`); - -// ./test/core/memory_grow.wast:259 -assert_return(() => invoke($4, `as-br-value`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:261 -assert_return(() => invoke($4, `as-br_if-cond`, []), []); - -// ./test/core/memory_grow.wast:262 -assert_return(() => invoke($4, `as-br_if-value`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:263 -assert_return(() => invoke($4, `as-br_if-value-cond`, []), [value("i32", 6)]); - -// ./test/core/memory_grow.wast:265 -assert_return(() => invoke($4, `as-br_table-index`, []), []); - -// ./test/core/memory_grow.wast:266 -assert_return(() => invoke($4, `as-br_table-value`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:267 -assert_return(() => invoke($4, `as-br_table-value-index`, []), [ - value("i32", 6), -]); - -// ./test/core/memory_grow.wast:269 -assert_return(() => invoke($4, `as-return-value`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:271 -assert_return(() => invoke($4, `as-if-cond`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:272 -assert_return(() => invoke($4, `as-if-then`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:273 -assert_return(() => invoke($4, `as-if-else`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:275 -assert_return(() => invoke($4, `as-select-first`, [0, 1]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:276 -assert_return(() => invoke($4, `as-select-second`, [0, 0]), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:277 -assert_return(() => invoke($4, `as-select-cond`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:279 -assert_return(() => invoke($4, `as-call-first`, []), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:280 -assert_return(() => invoke($4, `as-call-mid`, []), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:281 -assert_return(() => invoke($4, `as-call-last`, []), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:283 -assert_return(() => invoke($4, `as-call_indirect-first`, []), [ - value("i32", -1), -]); - -// ./test/core/memory_grow.wast:284 -assert_return(() => invoke($4, `as-call_indirect-mid`, []), [value("i32", -1)]); - -// ./test/core/memory_grow.wast:285 -assert_return(() => invoke($4, `as-call_indirect-last`, []), [ - value("i32", -1), -]); - -// ./test/core/memory_grow.wast:286 -assert_trap( - () => invoke($4, `as-call_indirect-index`, []), - `undefined element`, -); - -// ./test/core/memory_grow.wast:288 -assert_return(() => invoke($4, `as-local.set-value`, []), []); - -// ./test/core/memory_grow.wast:289 -assert_return(() => invoke($4, `as-local.tee-value`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:290 -assert_return(() => invoke($4, `as-global.set-value`, []), []); - -// ./test/core/memory_grow.wast:292 -assert_return(() => invoke($4, `as-load-address`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:293 -assert_return(() => invoke($4, `as-loadN-address`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:294 -assert_return(() => invoke($4, `as-store-address`, []), []); - -// ./test/core/memory_grow.wast:295 -assert_return(() => invoke($4, `as-store-value`, []), []); - -// ./test/core/memory_grow.wast:296 -assert_return(() => invoke($4, `as-storeN-address`, []), []); - -// ./test/core/memory_grow.wast:297 -assert_return(() => invoke($4, `as-storeN-value`, []), []); - -// ./test/core/memory_grow.wast:299 -assert_return(() => invoke($4, `as-unary-operand`, []), [value("i32", 31)]); - -// ./test/core/memory_grow.wast:301 -assert_return(() => invoke($4, `as-binary-left`, []), [value("i32", 11)]); - -// ./test/core/memory_grow.wast:302 -assert_return(() => invoke($4, `as-binary-right`, []), [value("i32", 9)]); - -// ./test/core/memory_grow.wast:304 -assert_return(() => invoke($4, `as-test-operand`, []), [value("i32", 0)]); - -// ./test/core/memory_grow.wast:306 -assert_return(() => invoke($4, `as-compare-left`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:307 -assert_return(() => invoke($4, `as-compare-right`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:309 -assert_return(() => invoke($4, `as-memory.grow-size`, []), [value("i32", 1)]); - -// ./test/core/memory_grow.wast:312 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-size-empty - (memory.grow) (drop) - ) - )`), `type mismatch`); - -// ./test/core/memory_grow.wast:321 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-size-empty-in-block - (i32.const 0) - (block (memory.grow) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/memory_grow.wast:331 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-size-empty-in-loop - (i32.const 0) - (loop (memory.grow) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/memory_grow.wast:341 -assert_invalid(() => - instantiate(`(module - (memory 0) - (func $$type-size-empty-in-then - (i32.const 0) (i32.const 0) - (if (then (memory.grow) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/memory_grow.wast:355 -assert_invalid( - () => - instantiate( - `(module (memory 1) (func (result i32) (memory.grow (f32.const 0))))`, - ), - `type mismatch`, -); diff --git a/js/src/jit-test/tests/wasm/spec/threads/select.wast.js b/js/src/jit-test/tests/wasm/spec/threads/select.wast.js deleted file mode 100644 index e0bfc0ba2c65..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/select.wast.js +++ /dev/null @@ -1,763 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/select.wast - -// ./test/core/select.wast:1 -let $0 = instantiate(`(module - - (memory 1) - - (func $$dummy) - - (func (export "select_i32") (param $$lhs i32) (param $$rhs i32) (param $$cond i32) (result i32) - (select (local.get $$lhs) (local.get $$rhs) (local.get $$cond))) - - (func (export "select_i64") (param $$lhs i64) (param $$rhs i64) (param $$cond i32) (result i64) - (select (local.get $$lhs) (local.get $$rhs) (local.get $$cond))) - - (func (export "select_f32") (param $$lhs f32) (param $$rhs f32) (param $$cond i32) (result f32) - (select (local.get $$lhs) (local.get $$rhs) (local.get $$cond))) - - (func (export "select_f64") (param $$lhs f64) (param $$rhs f64) (param $$cond i32) (result f64) - (select (local.get $$lhs) (local.get $$rhs) (local.get $$cond))) - - ;; Check that both sides of the select are evaluated - (func (export "select_trap_l") (param $$cond i32) (result i32) - (select (unreachable) (i32.const 0) (local.get $$cond)) - ) - (func (export "select_trap_r") (param $$cond i32) (result i32) - (select (i32.const 0) (unreachable) (local.get $$cond)) - ) - - (func (export "select_unreached") - (unreachable) (select) - (unreachable) (i32.const 0) (select) - (unreachable) (i32.const 0) (i32.const 0) (select) - (unreachable) (f32.const 0) (i32.const 0) (select) - (unreachable) - ) - - ;; As the argument of control constructs and instructions - - (func (export "as-select-first") (param i32) (result i32) - (select (select (i32.const 0) (i32.const 1) (local.get 0)) (i32.const 2) (i32.const 3)) - ) - (func (export "as-select-mid") (param i32) (result i32) - (select (i32.const 2) (select (i32.const 0) (i32.const 1) (local.get 0)) (i32.const 3)) - ) - (func (export "as-select-last") (param i32) (result i32) - (select (i32.const 2) (i32.const 3) (select (i32.const 0) (i32.const 1) (local.get 0))) - ) - - (func (export "as-loop-first") (param i32) (result i32) - (loop (result i32) (select (i32.const 2) (i32.const 3) (local.get 0)) (call $$dummy) (call $$dummy)) - ) - (func (export "as-loop-mid") (param i32) (result i32) - (loop (result i32) (call $$dummy) (select (i32.const 2) (i32.const 3) (local.get 0)) (call $$dummy)) - ) - (func (export "as-loop-last") (param i32) (result i32) - (loop (result i32) (call $$dummy) (call $$dummy) (select (i32.const 2) (i32.const 3) (local.get 0))) - ) - - (func (export "as-if-condition") (param i32) - (select (i32.const 2) (i32.const 3) (local.get 0)) (if (then (call $$dummy))) - ) - (func (export "as-if-then") (param i32) (result i32) - (if (result i32) (i32.const 1) (then (select (i32.const 2) (i32.const 3) (local.get 0))) (else (i32.const 4))) - ) - (func (export "as-if-else") (param i32) (result i32) - (if (result i32) (i32.const 0) (then (i32.const 2)) (else (select (i32.const 2) (i32.const 3) (local.get 0)))) - ) - - (func (export "as-br_if-first") (param i32) (result i32) - (block (result i32) (br_if 0 (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 4))) - ) - (func (export "as-br_if-last") (param i32) (result i32) - (block (result i32) (br_if 0 (i32.const 2) (select (i32.const 2) (i32.const 3) (local.get 0)))) - ) - - (func (export "as-br_table-first") (param i32) (result i32) - (block (result i32) (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 2) (br_table 0 0)) - ) - (func (export "as-br_table-last") (param i32) (result i32) - (block (result i32) (i32.const 2) (select (i32.const 2) (i32.const 3) (local.get 0)) (br_table 0 0)) - ) - - (func $$func (param i32 i32) (result i32) (local.get 0)) - (type $$check (func (param i32 i32) (result i32))) - (table funcref (elem $$func)) - (func (export "as-call_indirect-first") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 1) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-mid") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (select (i32.const 2) (i32.const 3) (local.get 0)) (i32.const 0) - ) - ) - ) - (func (export "as-call_indirect-last") (param i32) (result i32) - (block (result i32) - (call_indirect (type $$check) - (i32.const 1) (i32.const 4) (select (i32.const 2) (i32.const 3) (local.get 0)) - ) - ) - ) - - (func (export "as-store-first") (param i32) - (select (i32.const 0) (i32.const 4) (local.get 0)) (i32.const 1) (i32.store) - ) - (func (export "as-store-last") (param i32) - (i32.const 8) (select (i32.const 1) (i32.const 2) (local.get 0)) (i32.store) - ) - - (func (export "as-memory.grow-value") (param i32) (result i32) - (memory.grow (select (i32.const 1) (i32.const 2) (local.get 0))) - ) - - (func $$f (param i32) (result i32) (local.get 0)) - - (func (export "as-call-value") (param i32) (result i32) - (call $$f (select (i32.const 1) (i32.const 2) (local.get 0))) - ) - (func (export "as-return-value") (param i32) (result i32) - (select (i32.const 1) (i32.const 2) (local.get 0)) (return) - ) - (func (export "as-drop-operand") (param i32) - (drop (select (i32.const 1) (i32.const 2) (local.get 0))) - ) - (func (export "as-br-value") (param i32) (result i32) - (block (result i32) (br 0 (select (i32.const 1) (i32.const 2) (local.get 0)))) - ) - (func (export "as-local.set-value") (param i32) (result i32) - (local i32) (local.set 0 (select (i32.const 1) (i32.const 2) (local.get 0))) (local.get 0) - ) - (func (export "as-local.tee-value") (param i32) (result i32) - (local.tee 0 (select (i32.const 1) (i32.const 2) (local.get 0))) - ) - (global $$a (mut i32) (i32.const 10)) - (func (export "as-global.set-value") (param i32) (result i32) - (global.set $$a (select (i32.const 1) (i32.const 2) (local.get 0))) - (global.get $$a) - ) - (func (export "as-load-operand") (param i32) (result i32) - (i32.load (select (i32.const 0) (i32.const 4) (local.get 0))) - ) - - (func (export "as-unary-operand") (param i32) (result i32) - (i32.eqz (select (i32.const 0) (i32.const 1) (local.get 0))) - ) - (func (export "as-binary-operand") (param i32) (result i32) - (i32.mul - (select (i32.const 1) (i32.const 2) (local.get 0)) - (select (i32.const 1) (i32.const 2) (local.get 0)) - ) - ) - (func (export "as-test-operand") (param i32) (result i32) - (block (result i32) - (i32.eqz (select (i32.const 0) (i32.const 1) (local.get 0))) - ) - ) - - (func (export "as-compare-left") (param i32) (result i32) - (block (result i32) - (i32.le_s (select (i32.const 1) (i32.const 2) (local.get 0)) (i32.const 1)) - ) - ) - (func (export "as-compare-right") (param i32) (result i32) - (block (result i32) - (i32.ne (i32.const 1) (select (i32.const 0) (i32.const 1) (local.get 0))) - ) - ) - - (func (export "as-convert-operand") (param i32) (result i32) - (block (result i32) - (i32.wrap_i64 (select (i64.const 1) (i64.const 0) (local.get 0))) - ) - ) - -)`); - -// ./test/core/select.wast:180 -assert_return(() => invoke($0, `select_i32`, [1, 2, 1]), [value("i32", 1)]); - -// ./test/core/select.wast:181 -assert_return(() => invoke($0, `select_i64`, [2n, 1n, 1]), [value("i64", 2n)]); - -// ./test/core/select.wast:182 -assert_return( - () => invoke($0, `select_f32`, [value("f32", 1), value("f32", 2), 1]), - [value("f32", 1)], -); - -// ./test/core/select.wast:183 -assert_return( - () => invoke($0, `select_f64`, [value("f64", 1), value("f64", 2), 1]), - [value("f64", 1)], -); - -// ./test/core/select.wast:185 -assert_return(() => invoke($0, `select_i32`, [1, 2, 0]), [value("i32", 2)]); - -// ./test/core/select.wast:186 -assert_return(() => invoke($0, `select_i32`, [2, 1, 0]), [value("i32", 1)]); - -// ./test/core/select.wast:187 -assert_return(() => invoke($0, `select_i64`, [2n, 1n, -1]), [value("i64", 2n)]); - -// ./test/core/select.wast:188 -assert_return(() => invoke($0, `select_i64`, [2n, 1n, -252645136]), [ - value("i64", 2n), -]); - -// ./test/core/select.wast:190 -assert_return( - () => - invoke($0, `select_f32`, [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - value("f32", 1), - 1, - ]), - [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], -); - -// ./test/core/select.wast:191 -assert_return( - () => - invoke($0, `select_f32`, [ - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 1, - ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], -); - -// ./test/core/select.wast:192 -assert_return( - () => - invoke($0, `select_f32`, [ - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - value("f32", 1), - 0, - ]), - [value("f32", 1)], -); - -// ./test/core/select.wast:193 -assert_return( - () => - invoke($0, `select_f32`, [ - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - value("f32", 1), - 0, - ]), - [value("f32", 1)], -); - -// ./test/core/select.wast:194 -assert_return( - () => - invoke($0, `select_f32`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - 1, - ]), - [value("f32", 2)], -); - -// ./test/core/select.wast:195 -assert_return( - () => - invoke($0, `select_f32`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 1, - ]), - [value("f32", 2)], -); - -// ./test/core/select.wast:196 -assert_return( - () => - invoke($0, `select_f32`, [ - value("f32", 2), - bytes("f32", [0x0, 0x0, 0xc0, 0x7f]), - 0, - ]), - [bytes("f32", [0x0, 0x0, 0xc0, 0x7f])], -); - -// ./test/core/select.wast:197 -assert_return( - () => - invoke($0, `select_f32`, [ - value("f32", 2), - bytes("f32", [0x4, 0x3, 0x82, 0x7f]), - 0, - ]), - [bytes("f32", [0x4, 0x3, 0x82, 0x7f])], -); - -// ./test/core/select.wast:199 -assert_return( - () => - invoke($0, `select_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), - 1, - ]), - [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], -); - -// ./test/core/select.wast:200 -assert_return( - () => - invoke($0, `select_f64`, [ - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 1, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:201 -assert_return( - () => - invoke($0, `select_f64`, [ - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - value("f64", 1), - 0, - ]), - [value("f64", 1)], -); - -// ./test/core/select.wast:202 -assert_return( - () => - invoke($0, `select_f64`, [ - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - value("f64", 1), - 0, - ]), - [value("f64", 1)], -); - -// ./test/core/select.wast:203 -assert_return( - () => - invoke($0, `select_f64`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:204 -assert_return( - () => - invoke($0, `select_f64`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 1, - ]), - [value("f64", 2)], -); - -// ./test/core/select.wast:205 -assert_return( - () => - invoke($0, `select_f64`, [ - value("f64", 2), - bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f]), - 0, - ]), - [bytes("f64", [0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0xf8, 0x7f])], -); - -// ./test/core/select.wast:206 -assert_return( - () => - invoke($0, `select_f64`, [ - value("f64", 2), - bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f]), - 0, - ]), - [bytes("f64", [0x4, 0x3, 0x2, 0x0, 0x0, 0x0, 0xf0, 0x7f])], -); - -// ./test/core/select.wast:208 -assert_trap(() => invoke($0, `select_trap_l`, [1]), `unreachable`); - -// ./test/core/select.wast:209 -assert_trap(() => invoke($0, `select_trap_l`, [0]), `unreachable`); - -// ./test/core/select.wast:210 -assert_trap(() => invoke($0, `select_trap_r`, [1]), `unreachable`); - -// ./test/core/select.wast:211 -assert_trap(() => invoke($0, `select_trap_r`, [0]), `unreachable`); - -// ./test/core/select.wast:213 -assert_return(() => invoke($0, `as-select-first`, [0]), [value("i32", 1)]); - -// ./test/core/select.wast:214 -assert_return(() => invoke($0, `as-select-first`, [1]), [value("i32", 0)]); - -// ./test/core/select.wast:215 -assert_return(() => invoke($0, `as-select-mid`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:216 -assert_return(() => invoke($0, `as-select-mid`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:217 -assert_return(() => invoke($0, `as-select-last`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:218 -assert_return(() => invoke($0, `as-select-last`, [1]), [value("i32", 3)]); - -// ./test/core/select.wast:220 -assert_return(() => invoke($0, `as-loop-first`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:221 -assert_return(() => invoke($0, `as-loop-first`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:222 -assert_return(() => invoke($0, `as-loop-mid`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:223 -assert_return(() => invoke($0, `as-loop-mid`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:224 -assert_return(() => invoke($0, `as-loop-last`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:225 -assert_return(() => invoke($0, `as-loop-last`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:227 -assert_return(() => invoke($0, `as-if-condition`, [0]), []); - -// ./test/core/select.wast:228 -assert_return(() => invoke($0, `as-if-condition`, [1]), []); - -// ./test/core/select.wast:229 -assert_return(() => invoke($0, `as-if-then`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:230 -assert_return(() => invoke($0, `as-if-then`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:231 -assert_return(() => invoke($0, `as-if-else`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:232 -assert_return(() => invoke($0, `as-if-else`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:234 -assert_return(() => invoke($0, `as-br_if-first`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:235 -assert_return(() => invoke($0, `as-br_if-first`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:236 -assert_return(() => invoke($0, `as-br_if-last`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:237 -assert_return(() => invoke($0, `as-br_if-last`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:239 -assert_return(() => invoke($0, `as-br_table-first`, [0]), [value("i32", 3)]); - -// ./test/core/select.wast:240 -assert_return(() => invoke($0, `as-br_table-first`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:241 -assert_return(() => invoke($0, `as-br_table-last`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:242 -assert_return(() => invoke($0, `as-br_table-last`, [1]), [value("i32", 2)]); - -// ./test/core/select.wast:244 -assert_return(() => invoke($0, `as-call_indirect-first`, [0]), [ - value("i32", 3), -]); - -// ./test/core/select.wast:245 -assert_return(() => invoke($0, `as-call_indirect-first`, [1]), [ - value("i32", 2), -]); - -// ./test/core/select.wast:246 -assert_return(() => invoke($0, `as-call_indirect-mid`, [0]), [value("i32", 1)]); - -// ./test/core/select.wast:247 -assert_return(() => invoke($0, `as-call_indirect-mid`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:248 -assert_trap( - () => invoke($0, `as-call_indirect-last`, [0]), - `undefined element`, -); - -// ./test/core/select.wast:249 -assert_trap( - () => invoke($0, `as-call_indirect-last`, [1]), - `undefined element`, -); - -// ./test/core/select.wast:251 -assert_return(() => invoke($0, `as-store-first`, [0]), []); - -// ./test/core/select.wast:252 -assert_return(() => invoke($0, `as-store-first`, [1]), []); - -// ./test/core/select.wast:253 -assert_return(() => invoke($0, `as-store-last`, [0]), []); - -// ./test/core/select.wast:254 -assert_return(() => invoke($0, `as-store-last`, [1]), []); - -// ./test/core/select.wast:256 -assert_return(() => invoke($0, `as-memory.grow-value`, [0]), [value("i32", 1)]); - -// ./test/core/select.wast:257 -assert_return(() => invoke($0, `as-memory.grow-value`, [1]), [value("i32", 3)]); - -// ./test/core/select.wast:259 -assert_return(() => invoke($0, `as-call-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:260 -assert_return(() => invoke($0, `as-call-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:261 -assert_return(() => invoke($0, `as-return-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:262 -assert_return(() => invoke($0, `as-return-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:263 -assert_return(() => invoke($0, `as-drop-operand`, [0]), []); - -// ./test/core/select.wast:264 -assert_return(() => invoke($0, `as-drop-operand`, [1]), []); - -// ./test/core/select.wast:265 -assert_return(() => invoke($0, `as-br-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:266 -assert_return(() => invoke($0, `as-br-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:267 -assert_return(() => invoke($0, `as-local.set-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:268 -assert_return(() => invoke($0, `as-local.set-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:269 -assert_return(() => invoke($0, `as-local.tee-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:270 -assert_return(() => invoke($0, `as-local.tee-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:271 -assert_return(() => invoke($0, `as-global.set-value`, [0]), [value("i32", 2)]); - -// ./test/core/select.wast:272 -assert_return(() => invoke($0, `as-global.set-value`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:273 -assert_return(() => invoke($0, `as-load-operand`, [0]), [value("i32", 1)]); - -// ./test/core/select.wast:274 -assert_return(() => invoke($0, `as-load-operand`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:276 -assert_return(() => invoke($0, `as-unary-operand`, [0]), [value("i32", 0)]); - -// ./test/core/select.wast:277 -assert_return(() => invoke($0, `as-unary-operand`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:278 -assert_return(() => invoke($0, `as-binary-operand`, [0]), [value("i32", 4)]); - -// ./test/core/select.wast:279 -assert_return(() => invoke($0, `as-binary-operand`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:280 -assert_return(() => invoke($0, `as-test-operand`, [0]), [value("i32", 0)]); - -// ./test/core/select.wast:281 -assert_return(() => invoke($0, `as-test-operand`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:282 -assert_return(() => invoke($0, `as-compare-left`, [0]), [value("i32", 0)]); - -// ./test/core/select.wast:283 -assert_return(() => invoke($0, `as-compare-left`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:284 -assert_return(() => invoke($0, `as-compare-right`, [0]), [value("i32", 0)]); - -// ./test/core/select.wast:285 -assert_return(() => invoke($0, `as-compare-right`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:286 -assert_return(() => invoke($0, `as-convert-operand`, [0]), [value("i32", 0)]); - -// ./test/core/select.wast:287 -assert_return(() => invoke($0, `as-convert-operand`, [1]), [value("i32", 1)]); - -// ./test/core/select.wast:289 -assert_invalid( - () => - instantiate(`(module (func $$arity-0 (select (nop) (nop) (i32.const 1))))`), - `type mismatch`, -); - -// ./test/core/select.wast:296 -assert_invalid( - () => - instantiate( - `(module (func $$type-num-vs-num (select (i32.const 1) (i64.const 1) (i32.const 1))))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:300 -assert_invalid( - () => - instantiate( - `(module (func $$type-num-vs-num (select (i32.const 1) (f32.const 1.0) (i32.const 1))))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:304 -assert_invalid( - () => - instantiate( - `(module (func $$type-num-vs-num (select (i32.const 1) (f64.const 1.0) (i32.const 1))))`, - ), - `type mismatch`, -); - -// ./test/core/select.wast:310 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-operand-empty - (select) (drop) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:318 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-operand-empty - (i32.const 0) (select) (drop) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:326 -assert_invalid(() => - instantiate(`(module - (func $$type-3rd-operand-empty - (i32.const 0) (i32.const 0) (select) (drop) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:334 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-operand-empty-in-block - (i32.const 0) (i32.const 0) (i32.const 0) - (block (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:343 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-operand-empty-in-block - (i32.const 0) (i32.const 0) - (block (i32.const 0) (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:352 -assert_invalid(() => - instantiate(`(module - (func $$type-3rd-operand-empty-in-block - (i32.const 0) - (block (i32.const 0) (i32.const 0) (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:361 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-operand-empty-in-loop - (i32.const 0) (i32.const 0) (i32.const 0) - (loop (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:370 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-operand-empty-in-loop - (i32.const 0) (i32.const 0) - (loop (i32.const 0) (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:379 -assert_invalid(() => - instantiate(`(module - (func $$type-3rd-operand-empty-in-loop - (i32.const 0) - (loop (i32.const 0) (i32.const 0) (select) (drop)) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:388 -assert_invalid(() => - instantiate(`(module - (func $$type-1st-operand-empty-in-then - (i32.const 0) (i32.const 0) (i32.const 0) - (if (then (select) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:397 -assert_invalid(() => - instantiate(`(module - (func $$type-2nd-operand-empty-in-then - (i32.const 0) (i32.const 0) - (if (then (i32.const 0) (select) (drop))) - ) - )`), `type mismatch`); - -// ./test/core/select.wast:406 -assert_invalid(() => - instantiate(`(module - (func $$type-3rd-operand-empty-in-then - (i32.const 0) - (if (then (i32.const 0) (i32.const 0) (select) (drop))) - ) - )`), `type mismatch`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/stack.wast.js b/js/src/jit-test/tests/wasm/spec/threads/stack.wast.js deleted file mode 100644 index 55f095169583..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/stack.wast.js +++ /dev/null @@ -1,247 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/stack.wast - -// ./test/core/stack.wast:1 -let $0 = instantiate(`(module - (func (export "fac-expr") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - (local.set $$i (local.get $$n)) - (local.set $$res (i64.const 1)) - (block $$done - (loop $$loop - (if - (i64.eq (local.get $$i) (i64.const 0)) - (then (br $$done)) - (else - (local.set $$res (i64.mul (local.get $$i) (local.get $$res))) - (local.set $$i (i64.sub (local.get $$i) (i64.const 1))) - ) - ) - (br $$loop) - ) - ) - (local.get $$res) - ) - - (func (export "fac-stack") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - (local.get $$n) - (local.set $$i) - (i64.const 1) - (local.set $$res) - (block $$done - (loop $$loop - (local.get $$i) - (i64.const 0) - (i64.eq) - (if - (then (br $$done)) - (else - (local.get $$i) - (local.get $$res) - (i64.mul) - (local.set $$res) - (local.get $$i) - (i64.const 1) - (i64.sub) - (local.set $$i) - ) - ) - (br $$loop) - ) - ) - (local.get $$res) - ) - - (func (export "fac-stack-raw") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - local.get $$n - local.set $$i - i64.const 1 - local.set $$res - block $$done - loop $$loop - local.get $$i - i64.const 0 - i64.eq - if $$body - br $$done - else $$body - local.get $$i - local.get $$res - i64.mul - local.set $$res - local.get $$i - i64.const 1 - i64.sub - local.set $$i - end $$body - br $$loop - end $$loop - end $$done - local.get $$res - ) - - (func (export "fac-mixed") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - (local.set $$i (local.get $$n)) - (local.set $$res (i64.const 1)) - (block $$done - (loop $$loop - (i64.eq (local.get $$i) (i64.const 0)) - (if - (then (br $$done)) - (else - (i64.mul (local.get $$i) (local.get $$res)) - (local.set $$res) - (i64.sub (local.get $$i) (i64.const 1)) - (local.set $$i) - ) - ) - (br $$loop) - ) - ) - (local.get $$res) - ) - - (func (export "fac-mixed-raw") (param $$n i64) (result i64) - (local $$i i64) - (local $$res i64) - (local.set $$i (local.get $$n)) - (local.set $$res (i64.const 1)) - block $$done - loop $$loop - (i64.eq (local.get $$i) (i64.const 0)) - if - br $$done - else - (i64.mul (local.get $$i) (local.get $$res)) - local.set $$res - (i64.sub (local.get $$i) (i64.const 1)) - local.set $$i - end - br $$loop - end - end - local.get $$res - ) -)`); - -// ./test/core/stack.wast:130 -assert_return(() => invoke($0, `fac-expr`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/stack.wast:131 -assert_return(() => invoke($0, `fac-stack`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/stack.wast:132 -assert_return(() => invoke($0, `fac-mixed`, [25n]), [ - value("i64", 7034535277573963776n), -]); - -// ./test/core/stack.wast:137 -let $1 = instantiate(`(module - (type $$proc (func)) - (table 1 funcref) - - (func - (block i32.const 0 call_indirect) - (loop i32.const 0 call_indirect) - (if (i32.const 0) (then i32.const 0 call_indirect)) - (if (i32.const 0) - (then i32.const 0 call_indirect) - (else i32.const 0 call_indirect) - ) - (block i32.const 0 call_indirect (type $$proc)) - (loop i32.const 0 call_indirect (type $$proc)) - (if (i32.const 0) (then i32.const 0 call_indirect (type $$proc))) - (if (i32.const 0) - (then i32.const 0 call_indirect (type $$proc)) - (else i32.const 0 call_indirect (type $$proc)) - ) - (block i32.const 0 i32.const 0 call_indirect (param i32)) - (loop i32.const 0 i32.const 0 call_indirect (param i32)) - (if (i32.const 0) (then i32.const 0 i32.const 0 call_indirect (param i32))) - (if (i32.const 0) - (then i32.const 0 i32.const 0 call_indirect (param i32)) - (else i32.const 0 i32.const 0 call_indirect (param i32)) - ) - (block (result i32) i32.const 0 call_indirect (result i32)) (drop) - (loop (result i32) i32.const 0 call_indirect (result i32)) (drop) - (if (result i32) (i32.const 0) - (then i32.const 0 call_indirect (result i32)) - (else i32.const 0 call_indirect (result i32)) - ) (drop) - (block i32.const 0 call_indirect (type $$proc) (param) (result)) - (loop i32.const 0 call_indirect (type $$proc) (param) (result)) - (if (i32.const 0) - (then i32.const 0 call_indirect (type $$proc) (param) (result)) - ) - (if (i32.const 0) - (then i32.const 0 call_indirect (type $$proc) (param) (param) (result)) - (else i32.const 0 call_indirect (type $$proc) (param) (result) (result)) - ) - - block i32.const 0 call_indirect end - loop i32.const 0 call_indirect end - i32.const 0 if i32.const 0 call_indirect end - i32.const 0 if i32.const 0 call_indirect else i32.const 0 call_indirect end - block i32.const 0 call_indirect (type $$proc) end - loop i32.const 0 call_indirect (type $$proc) end - i32.const 0 if i32.const 0 call_indirect (type $$proc) end - i32.const 0 - if - i32.const 0 call_indirect (type $$proc) - else - i32.const 0 call_indirect (type $$proc) - end - block i32.const 0 i32.const 0 call_indirect (param i32) end - loop i32.const 0 i32.const 0 call_indirect (param i32) end - i32.const 0 if i32.const 0 i32.const 0 call_indirect (param i32) end - i32.const 0 - if - i32.const 0 i32.const 0 call_indirect (param i32) - else - i32.const 0 i32.const 0 call_indirect (param i32) - end - block (result i32) i32.const 0 call_indirect (result i32) end drop - loop (result i32) i32.const 0 call_indirect (result i32) end drop - i32.const 0 - if (result i32) - i32.const 0 call_indirect (result i32) - else - i32.const 0 call_indirect (result i32) - end drop - block i32.const 0 call_indirect (type $$proc) (param) (result) end - loop i32.const 0 call_indirect (type $$proc) (param) (result) end - i32.const 0 if i32.const 0 call_indirect (type $$proc) (param) (result) end - i32.const 0 - if - i32.const 0 call_indirect (type $$proc) (param) (result) - else - i32.const 0 call_indirect (type $$proc) (param) (param) (result) (result) - end - i32.const 0 call_indirect - ) -)`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/utf8-import-field.wast.js b/js/src/jit-test/tests/wasm/spec/threads/utf8-import-field.wast.js deleted file mode 100644 index 40bafe57ede2..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/utf8-import-field.wast.js +++ /dev/null @@ -1,2304 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/utf8-import-field.wast - -// ./test/core/utf8-import-field.wast:6 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\80" ;; "\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:21 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\8f" ;; "\\8f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:36 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\90" ;; "\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:51 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\9f" ;; "\\9f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:66 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\a0" ;; "\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:81 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\bf" ;; "\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:98 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\c2\\80\\80" ;; "\\c2\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:113 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\c2" ;; "\\c2" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:128 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c2\\2e" ;; "\\c2." - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:145 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c0\\80" ;; "\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:160 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c0\\bf" ;; "\\c0\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:175 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c1\\80" ;; "\\c1\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:190 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c1\\bf" ;; "\\c1\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:205 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c2\\00" ;; "\\c2\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:220 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c2\\7f" ;; "\\c2\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:235 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c2\\c0" ;; "\\c2\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:250 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\c2\\fd" ;; "\\c2\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:265 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\df\\00" ;; "\\df\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:280 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\df\\7f" ;; "\\df\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:295 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\df\\c0" ;; "\\df\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:310 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\df\\fd" ;; "\\df\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:327 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\e1\\80\\80\\80" ;; "\\e1\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:342 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\e1\\80" ;; "\\e1\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:357 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\80\\2e" ;; "\\e1\\80." - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:372 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\e1" ;; "\\e1" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:387 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\e1\\2e" ;; "\\e1." - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:404 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\00\\a0" ;; "\\e0\\00\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:419 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\7f\\a0" ;; "\\e0\\7f\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:434 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\80\\80" ;; "\\e0\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:449 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\80\\a0" ;; "\\e0\\80\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:464 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\9f\\a0" ;; "\\e0\\9f\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:479 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\9f\\bf" ;; "\\e0\\9f\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:494 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\c0\\a0" ;; "\\e0\\c0\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:509 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\fd\\a0" ;; "\\e0\\fd\\a0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:524 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\00\\80" ;; "\\e1\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:539 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\7f\\80" ;; "\\e1\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:554 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\c0\\80" ;; "\\e1\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:569 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\fd\\80" ;; "\\e1\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:584 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\00\\80" ;; "\\ec\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:599 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\7f\\80" ;; "\\ec\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:614 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\c0\\80" ;; "\\ec\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:629 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\fd\\80" ;; "\\ec\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:644 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\00\\80" ;; "\\ed\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:659 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\7f\\80" ;; "\\ed\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:674 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\a0\\80" ;; "\\ed\\a0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:689 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\a0\\bf" ;; "\\ed\\a0\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:704 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\bf\\80" ;; "\\ed\\bf\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:719 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\bf\\bf" ;; "\\ed\\bf\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:734 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\c0\\80" ;; "\\ed\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:749 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\fd\\80" ;; "\\ed\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:764 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\00\\80" ;; "\\ee\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:779 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\7f\\80" ;; "\\ee\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:794 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\c0\\80" ;; "\\ee\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:809 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\fd\\80" ;; "\\ee\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:824 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\00\\80" ;; "\\ef\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:839 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\7f\\80" ;; "\\ef\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:854 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\c0\\80" ;; "\\ef\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:869 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\fd\\80" ;; "\\ef\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:886 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\a0\\00" ;; "\\e0\\a0\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:901 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\a0\\7f" ;; "\\e0\\a0\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:916 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\a0\\c0" ;; "\\e0\\a0\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:931 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e0\\a0\\fd" ;; "\\e0\\a0\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:946 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\80\\00" ;; "\\e1\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:961 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\80\\7f" ;; "\\e1\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:976 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\80\\c0" ;; "\\e1\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:991 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\e1\\80\\fd" ;; "\\e1\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1006 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\80\\00" ;; "\\ec\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1021 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\80\\7f" ;; "\\ec\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1036 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\80\\c0" ;; "\\ec\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1051 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ec\\80\\fd" ;; "\\ec\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1066 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\80\\00" ;; "\\ed\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1081 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\80\\7f" ;; "\\ed\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1096 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\80\\c0" ;; "\\ed\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1111 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ed\\80\\fd" ;; "\\ed\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1126 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\80\\00" ;; "\\ee\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1141 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\80\\7f" ;; "\\ee\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1156 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\80\\c0" ;; "\\ee\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1171 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ee\\80\\fd" ;; "\\ee\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1186 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\80\\00" ;; "\\ef\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1201 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\80\\7f" ;; "\\ef\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1216 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\80\\c0" ;; "\\ef\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1231 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\ef\\80\\fd" ;; "\\ef\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1248 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\f1\\80\\80\\80\\80" ;; "\\f1\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1263 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\f1\\80\\80" ;; "\\f1\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1278 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\80\\23" ;; "\\f1\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1293 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\f1\\80" ;; "\\f1\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1308 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\f1\\80\\23" ;; "\\f1\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1323 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\f1" ;; "\\f1" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1338 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\f1\\23" ;; "\\f1#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1355 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\00\\90\\90" ;; "\\f0\\00\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1370 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\7f\\90\\90" ;; "\\f0\\7f\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1385 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\80\\80\\80" ;; "\\f0\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1400 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\80\\90\\90" ;; "\\f0\\80\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1415 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\8f\\90\\90" ;; "\\f0\\8f\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1430 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\8f\\bf\\bf" ;; "\\f0\\8f\\bf\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1445 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\c0\\90\\90" ;; "\\f0\\c0\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1460 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\fd\\90\\90" ;; "\\f0\\fd\\90\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1475 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\00\\80\\80" ;; "\\f1\\00\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1490 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\7f\\80\\80" ;; "\\f1\\7f\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1505 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\c0\\80\\80" ;; "\\f1\\c0\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1520 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\fd\\80\\80" ;; "\\f1\\fd\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1535 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\00\\80\\80" ;; "\\f3\\00\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1550 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\7f\\80\\80" ;; "\\f3\\7f\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1565 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\c0\\80\\80" ;; "\\f3\\c0\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1580 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\fd\\80\\80" ;; "\\f3\\fd\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1595 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\00\\80\\80" ;; "\\f4\\00\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1610 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\7f\\80\\80" ;; "\\f4\\7f\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1625 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\90\\80\\80" ;; "\\f4\\90\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1640 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\bf\\80\\80" ;; "\\f4\\bf\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1655 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\c0\\80\\80" ;; "\\f4\\c0\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1670 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\fd\\80\\80" ;; "\\f4\\fd\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1685 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f5\\80\\80\\80" ;; "\\f5\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1700 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f7\\80\\80\\80" ;; "\\f7\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1715 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f7\\bf\\bf\\bf" ;; "\\f7\\bf\\bf\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1732 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\00\\90" ;; "\\f0\\90\\00\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1747 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\7f\\90" ;; "\\f0\\90\\7f\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1762 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\c0\\90" ;; "\\f0\\90\\c0\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1777 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\fd\\90" ;; "\\f0\\90\\fd\\90" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1792 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\00\\80" ;; "\\f1\\80\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1807 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\7f\\80" ;; "\\f1\\80\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1822 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\c0\\80" ;; "\\f1\\80\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1837 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\fd\\80" ;; "\\f1\\80\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1852 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\00\\80" ;; "\\f3\\80\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1867 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\7f\\80" ;; "\\f3\\80\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1882 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\c0\\80" ;; "\\f3\\80\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1897 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\fd\\80" ;; "\\f3\\80\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1912 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\00\\80" ;; "\\f4\\80\\00\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1927 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\7f\\80" ;; "\\f4\\80\\7f\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1942 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\c0\\80" ;; "\\f4\\80\\c0\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1957 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\fd\\80" ;; "\\f4\\80\\fd\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1974 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\90\\00" ;; "\\f0\\90\\90\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:1989 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\90\\7f" ;; "\\f0\\90\\90\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2004 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\90\\c0" ;; "\\f0\\90\\90\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2019 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f0\\90\\90\\fd" ;; "\\f0\\90\\90\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2034 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\80\\00" ;; "\\f1\\80\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2049 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\80\\7f" ;; "\\f1\\80\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2064 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\80\\c0" ;; "\\f1\\80\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2079 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f1\\80\\80\\fd" ;; "\\f1\\80\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2094 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\80\\00" ;; "\\f3\\80\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2109 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\80\\7f" ;; "\\f3\\80\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2124 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\80\\c0" ;; "\\f3\\80\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2139 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f3\\80\\80\\fd" ;; "\\f3\\80\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2154 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\80\\00" ;; "\\f4\\80\\80\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2169 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\80\\7f" ;; "\\f4\\80\\80\\7f" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2184 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\80\\c0" ;; "\\f4\\80\\80\\c0" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2199 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f4\\80\\80\\fd" ;; "\\f4\\80\\80\\fd" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2216 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\06\\f8\\80\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2231 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f8\\80\\80\\80" ;; "\\f8\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2246 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\f8\\80\\80\\80\\23" ;; "\\f8\\80\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2261 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\f8\\80\\80" ;; "\\f8\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2276 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\f8\\80\\80\\23" ;; "\\f8\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2291 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\f8\\80" ;; "\\f8\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2306 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\f8\\80\\23" ;; "\\f8\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2321 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\f8" ;; "\\f8" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2336 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\f8\\23" ;; "\\f8#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2353 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\f8\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2368 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\fb\\bf\\bf\\bf\\bf" ;; "\\fb\\bf\\bf\\bf\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2385 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\11" ;; import section - "\\01" ;; length 1 - "\\07\\fc\\80\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2400 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\fc\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2415 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\06\\fc\\80\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2430 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\fc\\80\\80\\80" ;; "\\fc\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2445 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\05\\fc\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2460 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\fc\\80\\80" ;; "\\fc\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2475 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\fc\\80\\80\\23" ;; "\\fc\\80\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2490 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\fc\\80" ;; "\\fc\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2505 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\03\\fc\\80\\23" ;; "\\fc\\80#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2520 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\fc" ;; "\\fc" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2535 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\fc\\23" ;; "\\fc#" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2552 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\06\\fc\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2567 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\06\\fd\\bf\\bf\\bf\\bf\\bf" ;; "\\fd\\bf\\bf\\bf\\bf\\bf" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2584 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\fe" ;; "\\fe" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2599 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\01\\ff" ;; "\\ff" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2614 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\fe\\ff" ;; "\\fe\\ff" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2629 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\00\\00\\fe\\ff" ;; "\\00\\00\\fe\\ff" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2644 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\02\\ff\\fe" ;; "\\ff\\fe" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-field.wast:2659 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\ff\\fe\\00\\00" ;; "\\ff\\fe\\00\\00" - "\\04\\74\\65\\73\\74" ;; "test" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/utf8-import-module.wast.js b/js/src/jit-test/tests/wasm/spec/threads/utf8-import-module.wast.js deleted file mode 100644 index 47a9cc9cae2f..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/utf8-import-module.wast.js +++ /dev/null @@ -1,2304 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/utf8-import-module.wast - -// ./test/core/utf8-import-module.wast:6 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\80" ;; "\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:21 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\8f" ;; "\\8f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:36 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\90" ;; "\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:51 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\9f" ;; "\\9f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:66 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\a0" ;; "\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:81 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\bf" ;; "\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:98 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\c2\\80\\80" ;; "\\c2\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:113 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\c2" ;; "\\c2" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:128 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c2\\2e" ;; "\\c2." - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:145 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c0\\80" ;; "\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:160 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c0\\bf" ;; "\\c0\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:175 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c1\\80" ;; "\\c1\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:190 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c1\\bf" ;; "\\c1\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:205 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c2\\00" ;; "\\c2\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:220 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c2\\7f" ;; "\\c2\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:235 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c2\\c0" ;; "\\c2\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:250 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\c2\\fd" ;; "\\c2\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:265 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\df\\00" ;; "\\df\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:280 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\df\\7f" ;; "\\df\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:295 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\df\\c0" ;; "\\df\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:310 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\df\\fd" ;; "\\df\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:327 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\e1\\80\\80\\80" ;; "\\e1\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:342 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\e1\\80" ;; "\\e1\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:357 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\80\\2e" ;; "\\e1\\80." - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:372 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\e1" ;; "\\e1" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:387 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\e1\\2e" ;; "\\e1." - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:404 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\00\\a0" ;; "\\e0\\00\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:419 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\7f\\a0" ;; "\\e0\\7f\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:434 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\80\\80" ;; "\\e0\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:449 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\80\\a0" ;; "\\e0\\80\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:464 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\9f\\a0" ;; "\\e0\\9f\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:479 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\9f\\bf" ;; "\\e0\\9f\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:494 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\c0\\a0" ;; "\\e0\\c0\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:509 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\fd\\a0" ;; "\\e0\\fd\\a0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:524 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\00\\80" ;; "\\e1\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:539 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\7f\\80" ;; "\\e1\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:554 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\c0\\80" ;; "\\e1\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:569 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\fd\\80" ;; "\\e1\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:584 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\00\\80" ;; "\\ec\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:599 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\7f\\80" ;; "\\ec\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:614 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\c0\\80" ;; "\\ec\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:629 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\fd\\80" ;; "\\ec\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:644 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\00\\80" ;; "\\ed\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:659 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\7f\\80" ;; "\\ed\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:674 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\a0\\80" ;; "\\ed\\a0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:689 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\a0\\bf" ;; "\\ed\\a0\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:704 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\bf\\80" ;; "\\ed\\bf\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:719 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\bf\\bf" ;; "\\ed\\bf\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:734 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\c0\\80" ;; "\\ed\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:749 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\fd\\80" ;; "\\ed\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:764 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\00\\80" ;; "\\ee\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:779 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\7f\\80" ;; "\\ee\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:794 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\c0\\80" ;; "\\ee\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:809 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\fd\\80" ;; "\\ee\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:824 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\00\\80" ;; "\\ef\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:839 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\7f\\80" ;; "\\ef\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:854 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\c0\\80" ;; "\\ef\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:869 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\fd\\80" ;; "\\ef\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:886 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\a0\\00" ;; "\\e0\\a0\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:901 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\a0\\7f" ;; "\\e0\\a0\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:916 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\a0\\c0" ;; "\\e0\\a0\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:931 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e0\\a0\\fd" ;; "\\e0\\a0\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:946 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\80\\00" ;; "\\e1\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:961 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\80\\7f" ;; "\\e1\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:976 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\80\\c0" ;; "\\e1\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:991 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\e1\\80\\fd" ;; "\\e1\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1006 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\80\\00" ;; "\\ec\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1021 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\80\\7f" ;; "\\ec\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1036 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\80\\c0" ;; "\\ec\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1051 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ec\\80\\fd" ;; "\\ec\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1066 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\80\\00" ;; "\\ed\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1081 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\80\\7f" ;; "\\ed\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1096 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\80\\c0" ;; "\\ed\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1111 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ed\\80\\fd" ;; "\\ed\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1126 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\80\\00" ;; "\\ee\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1141 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\80\\7f" ;; "\\ee\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1156 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\80\\c0" ;; "\\ee\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1171 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ee\\80\\fd" ;; "\\ee\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1186 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\80\\00" ;; "\\ef\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1201 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\80\\7f" ;; "\\ef\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1216 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\80\\c0" ;; "\\ef\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1231 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\ef\\80\\fd" ;; "\\ef\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1248 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\f1\\80\\80\\80\\80" ;; "\\f1\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1263 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\f1\\80\\80" ;; "\\f1\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1278 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\80\\23" ;; "\\f1\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1293 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\f1\\80" ;; "\\f1\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1308 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\f1\\80\\23" ;; "\\f1\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1323 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\f1" ;; "\\f1" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1338 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\f1\\23" ;; "\\f1#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1355 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\00\\90\\90" ;; "\\f0\\00\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1370 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\7f\\90\\90" ;; "\\f0\\7f\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1385 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\80\\80\\80" ;; "\\f0\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1400 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\80\\90\\90" ;; "\\f0\\80\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1415 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\8f\\90\\90" ;; "\\f0\\8f\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1430 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\8f\\bf\\bf" ;; "\\f0\\8f\\bf\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1445 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\c0\\90\\90" ;; "\\f0\\c0\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1460 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\fd\\90\\90" ;; "\\f0\\fd\\90\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1475 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\00\\80\\80" ;; "\\f1\\00\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1490 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\7f\\80\\80" ;; "\\f1\\7f\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1505 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\c0\\80\\80" ;; "\\f1\\c0\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1520 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\fd\\80\\80" ;; "\\f1\\fd\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1535 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\00\\80\\80" ;; "\\f3\\00\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1550 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\7f\\80\\80" ;; "\\f3\\7f\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1565 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\c0\\80\\80" ;; "\\f3\\c0\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1580 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\fd\\80\\80" ;; "\\f3\\fd\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1595 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\00\\80\\80" ;; "\\f4\\00\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1610 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\7f\\80\\80" ;; "\\f4\\7f\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1625 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\90\\80\\80" ;; "\\f4\\90\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1640 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\bf\\80\\80" ;; "\\f4\\bf\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1655 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\c0\\80\\80" ;; "\\f4\\c0\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1670 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\fd\\80\\80" ;; "\\f4\\fd\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1685 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f5\\80\\80\\80" ;; "\\f5\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1700 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f7\\80\\80\\80" ;; "\\f7\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1715 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f7\\bf\\bf\\bf" ;; "\\f7\\bf\\bf\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1732 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\00\\90" ;; "\\f0\\90\\00\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1747 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\7f\\90" ;; "\\f0\\90\\7f\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1762 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\c0\\90" ;; "\\f0\\90\\c0\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1777 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\fd\\90" ;; "\\f0\\90\\fd\\90" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1792 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\00\\80" ;; "\\f1\\80\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1807 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\7f\\80" ;; "\\f1\\80\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1822 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\c0\\80" ;; "\\f1\\80\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1837 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\fd\\80" ;; "\\f1\\80\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1852 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\00\\80" ;; "\\f3\\80\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1867 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\7f\\80" ;; "\\f3\\80\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1882 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\c0\\80" ;; "\\f3\\80\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1897 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\fd\\80" ;; "\\f3\\80\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1912 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\00\\80" ;; "\\f4\\80\\00\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1927 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\7f\\80" ;; "\\f4\\80\\7f\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1942 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\c0\\80" ;; "\\f4\\80\\c0\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1957 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\fd\\80" ;; "\\f4\\80\\fd\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1974 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\90\\00" ;; "\\f0\\90\\90\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:1989 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\90\\7f" ;; "\\f0\\90\\90\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2004 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\90\\c0" ;; "\\f0\\90\\90\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2019 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f0\\90\\90\\fd" ;; "\\f0\\90\\90\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2034 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\80\\00" ;; "\\f1\\80\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2049 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\80\\7f" ;; "\\f1\\80\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2064 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\80\\c0" ;; "\\f1\\80\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2079 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f1\\80\\80\\fd" ;; "\\f1\\80\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2094 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\80\\00" ;; "\\f3\\80\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2109 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\80\\7f" ;; "\\f3\\80\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2124 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\80\\c0" ;; "\\f3\\80\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2139 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f3\\80\\80\\fd" ;; "\\f3\\80\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2154 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\80\\00" ;; "\\f4\\80\\80\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2169 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\80\\7f" ;; "\\f4\\80\\80\\7f" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2184 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\80\\c0" ;; "\\f4\\80\\80\\c0" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2199 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f4\\80\\80\\fd" ;; "\\f4\\80\\80\\fd" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2216 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\06\\f8\\80\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2231 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f8\\80\\80\\80" ;; "\\f8\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2246 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\f8\\80\\80\\80\\23" ;; "\\f8\\80\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2261 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\f8\\80\\80" ;; "\\f8\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2276 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\f8\\80\\80\\23" ;; "\\f8\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2291 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\f8\\80" ;; "\\f8\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2306 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\f8\\80\\23" ;; "\\f8\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2321 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\f8" ;; "\\f8" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2336 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\f8\\23" ;; "\\f8#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2353 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\f8\\80\\80\\80\\80" ;; "\\f8\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2368 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\fb\\bf\\bf\\bf\\bf" ;; "\\fb\\bf\\bf\\bf\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2385 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\11" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\07\\fc\\80\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2400 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\fc\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2415 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\06\\fc\\80\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2430 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\fc\\80\\80\\80" ;; "\\fc\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2445 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0f" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\05\\fc\\80\\80\\80\\23" ;; "\\fc\\80\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2460 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\fc\\80\\80" ;; "\\fc\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2475 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\fc\\80\\80\\23" ;; "\\fc\\80\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2490 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\fc\\80" ;; "\\fc\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2505 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0d" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\03\\fc\\80\\23" ;; "\\fc\\80#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2520 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\fc" ;; "\\fc" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2535 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\fc\\23" ;; "\\fc#" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2552 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\06\\fc\\80\\80\\80\\80\\80" ;; "\\fc\\80\\80\\80\\80\\80" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2567 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\10" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\06\\fd\\bf\\bf\\bf\\bf\\bf" ;; "\\fd\\bf\\bf\\bf\\bf\\bf" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2584 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\fe" ;; "\\fe" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2599 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0b" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\01\\ff" ;; "\\ff" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2614 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\fe\\ff" ;; "\\fe\\ff" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2629 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\00\\00\\fe\\ff" ;; "\\00\\00\\fe\\ff" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2644 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0c" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\02\\ff\\fe" ;; "\\ff\\fe" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); - -// ./test/core/utf8-import-module.wast:2659 -assert_malformed(() => - instantiate(`(module binary - "\\00asm" "\\01\\00\\00\\00" - "\\02\\0e" ;; import section - "\\01" ;; length 1 - "\\04\\74\\65\\73\\74" ;; "test" - "\\04\\ff\\fe\\00\\00" ;; "\\ff\\fe\\00\\00" - "\\03" ;; GlobalImport - "\\7f" ;; i32 - "\\00" ;; immutable - )`), `invalid UTF-8 encoding`); diff --git a/js/src/jit-test/tests/wasm/spec/threads/utf8-invalid-encoding.wast.js b/js/src/jit-test/tests/wasm/spec/threads/utf8-invalid-encoding.wast.js deleted file mode 100644 index a4b5acdfd428..000000000000 --- a/js/src/jit-test/tests/wasm/spec/threads/utf8-invalid-encoding.wast.js +++ /dev/null @@ -1,1072 +0,0 @@ -/* Copyright 2021 Mozilla Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// ./test/core/utf8-invalid-encoding.wast - -// ./test/core/utf8-invalid-encoding.wast:1 -assert_malformed( - () => instantiate(`(func (export "\\00\\00\\fe\\ff")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:2 -assert_malformed( - () => instantiate(`(func (export "\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:3 -assert_malformed( - () => instantiate(`(func (export "\\8f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:4 -assert_malformed( - () => instantiate(`(func (export "\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:5 -assert_malformed( - () => instantiate(`(func (export "\\9f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:6 -assert_malformed( - () => instantiate(`(func (export "\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:7 -assert_malformed( - () => instantiate(`(func (export "\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:8 -assert_malformed( - () => instantiate(`(func (export "\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:9 -assert_malformed( - () => instantiate(`(func (export "\\c0\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:10 -assert_malformed( - () => instantiate(`(func (export "\\c1\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:11 -assert_malformed( - () => instantiate(`(func (export "\\c1\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:12 -assert_malformed( - () => instantiate(`(func (export "\\c2\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:13 -assert_malformed( - () => instantiate(`(func (export "\\c2\\2e")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:14 -assert_malformed( - () => instantiate(`(func (export "\\c2\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:15 -assert_malformed( - () => instantiate(`(func (export "\\c2\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:16 -assert_malformed( - () => instantiate(`(func (export "\\c2\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:17 -assert_malformed( - () => instantiate(`(func (export "\\c2")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:18 -assert_malformed( - () => instantiate(`(func (export "\\c2\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:19 -assert_malformed( - () => instantiate(`(func (export "\\df\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:20 -assert_malformed( - () => instantiate(`(func (export "\\df\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:21 -assert_malformed( - () => instantiate(`(func (export "\\df\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:22 -assert_malformed( - () => instantiate(`(func (export "\\df\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:23 -assert_malformed( - () => instantiate(`(func (export "\\e0\\00\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:24 -assert_malformed( - () => instantiate(`(func (export "\\e0\\7f\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:25 -assert_malformed( - () => instantiate(`(func (export "\\e0\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:26 -assert_malformed( - () => instantiate(`(func (export "\\e0\\80\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:27 -assert_malformed( - () => instantiate(`(func (export "\\e0\\9f\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:28 -assert_malformed( - () => instantiate(`(func (export "\\e0\\9f\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:29 -assert_malformed( - () => instantiate(`(func (export "\\e0\\a0\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:30 -assert_malformed( - () => instantiate(`(func (export "\\e0\\a0\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:31 -assert_malformed( - () => instantiate(`(func (export "\\e0\\a0\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:32 -assert_malformed( - () => instantiate(`(func (export "\\e0\\a0\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:33 -assert_malformed( - () => instantiate(`(func (export "\\e0\\c0\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:34 -assert_malformed( - () => instantiate(`(func (export "\\e0\\fd\\a0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:35 -assert_malformed( - () => instantiate(`(func (export "\\e1\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:36 -assert_malformed( - () => instantiate(`(func (export "\\e1\\2e")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:37 -assert_malformed( - () => instantiate(`(func (export "\\e1\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:38 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:39 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\2e")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:40 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:41 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:42 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:43 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:44 -assert_malformed( - () => instantiate(`(func (export "\\e1\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:45 -assert_malformed( - () => instantiate(`(func (export "\\e1\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:46 -assert_malformed( - () => instantiate(`(func (export "\\e1")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:47 -assert_malformed( - () => instantiate(`(func (export "\\e1\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:48 -assert_malformed( - () => instantiate(`(func (export "\\ec\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:49 -assert_malformed( - () => instantiate(`(func (export "\\ec\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:50 -assert_malformed( - () => instantiate(`(func (export "\\ec\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:51 -assert_malformed( - () => instantiate(`(func (export "\\ec\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:52 -assert_malformed( - () => instantiate(`(func (export "\\ec\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:53 -assert_malformed( - () => instantiate(`(func (export "\\ec\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:54 -assert_malformed( - () => instantiate(`(func (export "\\ec\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:55 -assert_malformed( - () => instantiate(`(func (export "\\ec\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:56 -assert_malformed( - () => instantiate(`(func (export "\\ed\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:57 -assert_malformed( - () => instantiate(`(func (export "\\ed\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:58 -assert_malformed( - () => instantiate(`(func (export "\\ed\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:59 -assert_malformed( - () => instantiate(`(func (export "\\ed\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:60 -assert_malformed( - () => instantiate(`(func (export "\\ed\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:61 -assert_malformed( - () => instantiate(`(func (export "\\ed\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:62 -assert_malformed( - () => instantiate(`(func (export "\\ed\\a0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:63 -assert_malformed( - () => instantiate(`(func (export "\\ed\\a0\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:64 -assert_malformed( - () => instantiate(`(func (export "\\ed\\bf\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:65 -assert_malformed( - () => instantiate(`(func (export "\\ed\\bf\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:66 -assert_malformed( - () => instantiate(`(func (export "\\ed\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:67 -assert_malformed( - () => instantiate(`(func (export "\\ed\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:68 -assert_malformed( - () => instantiate(`(func (export "\\ee\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:69 -assert_malformed( - () => instantiate(`(func (export "\\ee\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:70 -assert_malformed( - () => instantiate(`(func (export "\\ee\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:71 -assert_malformed( - () => instantiate(`(func (export "\\ee\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:72 -assert_malformed( - () => instantiate(`(func (export "\\ee\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:73 -assert_malformed( - () => instantiate(`(func (export "\\ee\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:74 -assert_malformed( - () => instantiate(`(func (export "\\ee\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:75 -assert_malformed( - () => instantiate(`(func (export "\\ee\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:76 -assert_malformed( - () => instantiate(`(func (export "\\ef\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:77 -assert_malformed( - () => instantiate(`(func (export "\\ef\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:78 -assert_malformed( - () => instantiate(`(func (export "\\ef\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:79 -assert_malformed( - () => instantiate(`(func (export "\\ef\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:80 -assert_malformed( - () => instantiate(`(func (export "\\ef\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:81 -assert_malformed( - () => instantiate(`(func (export "\\ef\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:82 -assert_malformed( - () => instantiate(`(func (export "\\ef\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:83 -assert_malformed( - () => instantiate(`(func (export "\\ef\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:84 -assert_malformed( - () => instantiate(`(func (export "\\f0\\00\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:85 -assert_malformed( - () => instantiate(`(func (export "\\f0\\7f\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:86 -assert_malformed( - () => instantiate(`(func (export "\\f0\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:87 -assert_malformed( - () => instantiate(`(func (export "\\f0\\80\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:88 -assert_malformed( - () => instantiate(`(func (export "\\f0\\8f\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:89 -assert_malformed( - () => instantiate(`(func (export "\\f0\\8f\\bf\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:90 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\00\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:91 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\7f\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:92 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\90\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:93 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\90\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:94 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\90\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:95 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\90\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:96 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\c0\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:97 -assert_malformed( - () => instantiate(`(func (export "\\f0\\90\\fd\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:98 -assert_malformed( - () => instantiate(`(func (export "\\f0\\c0\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:99 -assert_malformed( - () => instantiate(`(func (export "\\f0\\fd\\90\\90")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:100 -assert_malformed( - () => instantiate(`(func (export "\\f1\\00\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:101 -assert_malformed( - () => instantiate(`(func (export "\\f1\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:102 -assert_malformed( - () => instantiate(`(func (export "\\f1\\7f\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:103 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:104 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:105 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:106 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:107 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:108 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:109 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:110 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:111 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:112 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:113 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:114 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:115 -assert_malformed( - () => instantiate(`(func (export "\\f1\\80\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:116 -assert_malformed( - () => instantiate(`(func (export "\\f1\\c0\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:117 -assert_malformed( - () => instantiate(`(func (export "\\f1")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:118 -assert_malformed( - () => instantiate(`(func (export "\\f1\\fd\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:119 -assert_malformed( - () => instantiate(`(func (export "\\f3\\00\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:120 -assert_malformed( - () => instantiate(`(func (export "\\f3\\7f\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:121 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:122 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:123 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:124 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:125 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:126 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:127 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:128 -assert_malformed( - () => instantiate(`(func (export "\\f3\\80\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:129 -assert_malformed( - () => instantiate(`(func (export "\\f3\\c0\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:130 -assert_malformed( - () => instantiate(`(func (export "\\f3\\fd\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:131 -assert_malformed( - () => instantiate(`(func (export "\\f4\\00\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:132 -assert_malformed( - () => instantiate(`(func (export "\\f4\\7f\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:133 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\00\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:134 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\7f\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:135 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\80\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:136 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\80\\7f")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:137 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\80\\c0")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:138 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\80\\fd")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:139 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\c0\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:140 -assert_malformed( - () => instantiate(`(func (export "\\f4\\80\\fd\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:141 -assert_malformed( - () => instantiate(`(func (export "\\f4\\90\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:142 -assert_malformed( - () => instantiate(`(func (export "\\f4\\bf\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:143 -assert_malformed( - () => instantiate(`(func (export "\\f4\\c0\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:144 -assert_malformed( - () => instantiate(`(func (export "\\f4\\fd\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:145 -assert_malformed( - () => instantiate(`(func (export "\\f5\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:146 -assert_malformed( - () => instantiate(`(func (export "\\f7\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:147 -assert_malformed( - () => instantiate(`(func (export "\\f7\\bf\\bf\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:148 -assert_malformed( - () => instantiate(`(func (export "\\f8\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:149 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:150 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:151 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:152 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:153 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:154 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:155 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:156 -assert_malformed( - () => instantiate(`(func (export "\\f8\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:157 -assert_malformed( - () => instantiate(`(func (export "\\f8")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:158 -assert_malformed( - () => instantiate(`(func (export "\\fb\\bf\\bf\\bf\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:159 -assert_malformed( - () => instantiate(`(func (export "\\fc\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:160 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:161 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:162 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:163 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\23")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:164 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:165 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:166 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:167 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:168 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:169 -assert_malformed( - () => instantiate(`(func (export "\\fc\\80")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:170 -assert_malformed( - () => instantiate(`(func (export "\\fc")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:171 -assert_malformed( - () => instantiate(`(func (export "\\fd\\bf\\bf\\bf\\bf\\bf")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:172 -assert_malformed( - () => instantiate(`(func (export "\\fe")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:173 -assert_malformed( - () => instantiate(`(func (export "\\fe\\ff")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:174 -assert_malformed( - () => instantiate(`(func (export "\\ff")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:175 -assert_malformed( - () => instantiate(`(func (export "\\ff\\fe\\00\\00")) `), - `invalid UTF-8 encoding`, -); - -// ./test/core/utf8-invalid-encoding.wast:176 -assert_malformed( - () => instantiate(`(func (export "\\ff\\fe")) `), - `invalid UTF-8 encoding`, -);