[wasm][bulk-memory] Add bulk memory spec tests
These are added as mjsunit tests for now since they haven't been merged to the spec repo. When that happens, the wasm-spec-tests testsuite can be updated to include these tests, and the tests in this directory can be removed. This CL also adds the test/mjsunit/wasm/bulk-memory-spec directory to a list of directories that aren't checked for copyright (since these files are auto-generated). Bug: v8:7747 Change-Id: I906f2ca45f497a6728f94afb9b3330971e1d3fd5 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1600363 Commit-Queue: Ben Smith <binji@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Reviewed-by: Sergiy Belozorov <sergiyb@chromium.org> Cr-Commit-Position: refs/heads/master@{#61395}
This commit is contained in:
parent
5a56664273
commit
3c7bc08aec
19
test/mjsunit/wasm/bulk-memory-spec/README
Normal file
19
test/mjsunit/wasm/bulk-memory-spec/README
Normal file
@ -0,0 +1,19 @@
|
||||
This directory contains the bulk-memory proposal tests, converted to JS using
|
||||
the reference interpreter using the following shell command:
|
||||
|
||||
```
|
||||
for f in *.wast; do wasm $f -o $f.js; done
|
||||
```
|
||||
|
||||
Where `wasm` is the reference interpreter compiled from the bulk memory
|
||||
proposal (https://github.com/WebAssembly/bulk-memory-operations).
|
||||
|
||||
This only includes the tests that are different than the spec repo. The
|
||||
testsuite repo (https://github.com/WebAssembly/testsuite) has a tool which
|
||||
calculates this, see
|
||||
https://github.com/WebAssembly/testsuite/tree/master/proposals/bulk-memory-operations
|
||||
|
||||
The contents are copied from the following revisions:
|
||||
|
||||
WebAssembly/testsuite: 2a2099d52103215962707fbe9f44cd51fd146636
|
||||
WebAssembly/bulk-memory-operations: 47b4ae718b42081a220ac7f405bed1391661a635
|
1047
test/mjsunit/wasm/bulk-memory-spec/binary.wast
Normal file
1047
test/mjsunit/wasm/bulk-memory-spec/binary.wast
Normal file
File diff suppressed because it is too large
Load Diff
445
test/mjsunit/wasm/bulk-memory-spec/binary.wast.js
Normal file
445
test/mjsunit/wasm/bulk-memory-spec/binary.wast.js
Normal file
@ -0,0 +1,445 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// binary.wast:1
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:2
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:3
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
let $M1 = $3;
|
||||
|
||||
// binary.wast:4
|
||||
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
let $M2 = $4;
|
||||
|
||||
// binary.wast:6
|
||||
assert_malformed("");
|
||||
|
||||
// binary.wast:7
|
||||
assert_malformed("\x01");
|
||||
|
||||
// binary.wast:8
|
||||
assert_malformed("\x00\x61\x73");
|
||||
|
||||
// binary.wast:9
|
||||
assert_malformed("\x61\x73\x6d\x00");
|
||||
|
||||
// binary.wast:10
|
||||
assert_malformed("\x6d\x73\x61\x00");
|
||||
|
||||
// binary.wast:11
|
||||
assert_malformed("\x6d\x73\x61\x00\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:12
|
||||
assert_malformed("\x6d\x73\x61\x00\x00\x00\x00\x01");
|
||||
|
||||
// binary.wast:13
|
||||
assert_malformed("\x61\x73\x6d\x01\x00\x00\x00\x00");
|
||||
|
||||
// binary.wast:14
|
||||
assert_malformed("\x77\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:15
|
||||
assert_malformed("\x7f\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:16
|
||||
assert_malformed("\x80\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:17
|
||||
assert_malformed("\x82\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:18
|
||||
assert_malformed("\xff\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:21
|
||||
assert_malformed("\x00\x00\x00\x01\x6d\x73\x61\x00");
|
||||
|
||||
// binary.wast:24
|
||||
assert_malformed("\x61\x00\x6d\x73\x00\x01\x00\x00");
|
||||
|
||||
// binary.wast:25
|
||||
assert_malformed("\x73\x6d\x00\x61\x00\x00\x01\x00");
|
||||
|
||||
// binary.wast:28
|
||||
assert_malformed("\x00\x41\x53\x4d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:31
|
||||
assert_malformed("\x00\x81\xa2\x94\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:34
|
||||
assert_malformed("\xef\xbb\xbf\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// binary.wast:36
|
||||
assert_malformed("\x00\x61\x73\x6d");
|
||||
|
||||
// binary.wast:37
|
||||
assert_malformed("\x00\x61\x73\x6d\x01");
|
||||
|
||||
// binary.wast:38
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00");
|
||||
|
||||
// binary.wast:39
|
||||
assert_malformed("\x00\x61\x73\x6d\x00\x00\x00\x00");
|
||||
|
||||
// binary.wast:40
|
||||
assert_malformed("\x00\x61\x73\x6d\x0d\x00\x00\x00");
|
||||
|
||||
// binary.wast:41
|
||||
assert_malformed("\x00\x61\x73\x6d\x0e\x00\x00\x00");
|
||||
|
||||
// binary.wast:42
|
||||
assert_malformed("\x00\x61\x73\x6d\x00\x01\x00\x00");
|
||||
|
||||
// binary.wast:43
|
||||
assert_malformed("\x00\x61\x73\x6d\x00\x00\x01\x00");
|
||||
|
||||
// binary.wast:44
|
||||
assert_malformed("\x00\x61\x73\x6d\x00\x00\x00\x01");
|
||||
|
||||
// binary.wast:47
|
||||
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x04\x01\x00\x82\x00");
|
||||
|
||||
// binary.wast:52
|
||||
let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x00");
|
||||
|
||||
// binary.wast:59
|
||||
let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7f\x00\x41\x80\x00\x0b");
|
||||
|
||||
// binary.wast:66
|
||||
let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7f\x00\x41\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:73
|
||||
let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:80
|
||||
let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:88
|
||||
let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7e\x00\x42\x80\x00\x0b");
|
||||
|
||||
// binary.wast:95
|
||||
let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x07\x01\x7e\x00\x42\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:102
|
||||
let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:109
|
||||
let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:118
|
||||
let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x00\x0b\x07\x01\x80\x00\x41\x00\x0b\x00");
|
||||
|
||||
// binary.wast:128
|
||||
let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x04\x04\x01\x70\x00\x00\x09\x07\x01\x80\x00\x41\x00\x0b\x00");
|
||||
|
||||
// binary.wast:138
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x08\x01\x00\x82\x80\x80\x80\x80\x00");
|
||||
|
||||
// binary.wast:146
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:165
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x80\x00\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:184
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x12\x01\x10\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x80\x00\x03\x0b");
|
||||
|
||||
// binary.wast:203
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x12\x01\x10\x01\x01\x7f\x41\x00\x41\x03\x36\x02\x82\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:224
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0b\x01\x7f\x00\x41\x80\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:234
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0b\x01\x7f\x00\x41\xff\xff\xff\xff\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:245
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x10\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:255
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x10\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\x7f\x0b");
|
||||
|
||||
// binary.wast:267
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x70");
|
||||
|
||||
// binary.wast:275
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x07\x01\x00\x82\x80\x80\x80\x40");
|
||||
|
||||
// binary.wast:283
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x10\x1a\x0b");
|
||||
|
||||
// binary.wast:302
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x02\x82\x80\x80\x80\x40\x1a\x0b");
|
||||
|
||||
// binary.wast:321
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x10\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:339
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x10\x01\x0e\x01\x01\x7f\x41\x00\x28\x82\x80\x80\x80\x40\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:358
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x10\x03\x0b");
|
||||
|
||||
// binary.wast:377
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x82\x80\x80\x80\x40\x03\x0b");
|
||||
|
||||
// binary.wast:396
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x03\x82\x80\x80\x80\x10\x0b");
|
||||
|
||||
// binary.wast:415
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x01\x0a\x11\x01\x0f\x01\x01\x7f\x41\x00\x41\x03\x36\x02\x82\x80\x80\x80\x40\x0b");
|
||||
|
||||
// binary.wast:437
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x70\x0b");
|
||||
|
||||
// binary.wast:447
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x0f\x0b");
|
||||
|
||||
// binary.wast:457
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\x80\x80\x80\x80\x1f\x0b");
|
||||
|
||||
// binary.wast:467
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0a\x01\x7f\x00\x41\xff\xff\xff\xff\x4f\x0b");
|
||||
|
||||
// binary.wast:478
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x7e\x0b");
|
||||
|
||||
// binary.wast:488
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01\x0b");
|
||||
|
||||
// binary.wast:498
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\x80\x80\x80\x80\x80\x80\x80\x80\x80\x02\x0b");
|
||||
|
||||
// binary.wast:508
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x0f\x01\x7e\x00\x42\xff\xff\xff\xff\xff\xff\xff\xff\xff\x41\x0b");
|
||||
|
||||
// binary.wast:520
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x09\x01\x07\x00\x41\x00\x11\x00\x01\x0b");
|
||||
|
||||
// binary.wast:539
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0a\x01\x07\x00\x41\x00\x11\x00\x80\x00\x0b");
|
||||
|
||||
// binary.wast:558
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0b\x01\x08\x00\x41\x00\x11\x00\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:576
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0c\x01\x09\x00\x41\x00\x11\x00\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:594
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x0a\x0d\x01\x0a\x00\x41\x00\x11\x00\x80\x80\x80\x80\x00\x0b");
|
||||
|
||||
// binary.wast:613
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x09\x01\x07\x00\x41\x00\x40\x01\x1a\x0b");
|
||||
|
||||
// binary.wast:633
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0a\x01\x08\x00\x41\x00\x40\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:653
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0b\x01\x09\x00\x41\x00\x40\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:672
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0c\x01\x0a\x00\x41\x00\x40\x80\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:691
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0d\x01\x0b\x00\x41\x00\x40\x80\x80\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:711
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x07\x01\x05\x00\x3f\x01\x1a\x0b");
|
||||
|
||||
// binary.wast:730
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x08\x01\x06\x00\x3f\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:749
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x09\x01\x07\x00\x3f\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:767
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0a\x01\x08\x00\x3f\x80\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:785
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0b\x01\x09\x00\x3f\x80\x80\x80\x80\x00\x1a\x0b");
|
||||
|
||||
// binary.wast:804
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x0c\x01\x0a\x02\xff\xff\xff\xff\x0f\x7f\x02\x7e\x0b");
|
||||
|
||||
// binary.wast:821
|
||||
let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x0a\x01\x08\x03\x00\x7f\x00\x7e\x02\x7d\x0b");
|
||||
|
||||
// binary.wast:836
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x03\x02\x00\x00");
|
||||
|
||||
// binary.wast:846
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0a\x04\x01\x02\x00\x0b");
|
||||
|
||||
// binary.wast:855
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x03\x02\x00\x00\x0a\x04\x01\x02\x00\x0b");
|
||||
|
||||
// binary.wast:866
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x0a\x07\x02\x02\x00\x0b\x02\x00\x0b");
|
||||
|
||||
// binary.wast:877
|
||||
let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x03\x01\x00");
|
||||
|
||||
// binary.wast:883
|
||||
let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x0a\x01\x00");
|
||||
|
||||
// binary.wast:889
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0c\x01\x03\x0b\x05\x02\x01\x00\x01\x00");
|
||||
|
||||
// binary.wast:899
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x0c\x01\x01\x0b\x05\x02\x01\x00\x01\x00");
|
||||
|
||||
// binary.wast:909
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x0e\x01\x0c\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x00\x00\x0b\x0b\x03\x01\x01\x00");
|
||||
|
||||
// binary.wast:931
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x05\x03\x01\x00\x00\x0a\x07\x01\x05\x00\xfc\x09\x00\x0b\x0b\x03\x01\x01\x00");
|
||||
|
||||
// binary.wast:950
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x70\x01\xd3\x00\x0b\x0a\x04\x01\x02\x00\x0b");
|
||||
|
||||
// binary.wast:976
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x7f\x01\xd2\x00\x0b\x0a\x04\x01\x02\x00\x0b");
|
||||
|
||||
// binary.wast:1002
|
||||
let $20 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x07\x01\x01\x70\x01\xd2\x00\x0b\x0a\x04\x01\x02\x00\x0b");
|
||||
|
||||
// binary.wast:1026
|
||||
let $21 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x04\x01\x60\x00\x00\x03\x02\x01\x00\x04\x04\x01\x70\x00\x00\x05\x03\x01\x00\x00\x09\x06\x01\x01\x70\x01\xd0\x0b\x0a\x04\x01\x02\x00\x0b");
|
308
test/mjsunit/wasm/bulk-memory-spec/bulk.wast
Normal file
308
test/mjsunit/wasm/bulk-memory-spec/bulk.wast
Normal file
@ -0,0 +1,308 @@
|
||||
;; Passive segment syntax
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "foo"))
|
||||
|
||||
(module
|
||||
(table 3 funcref)
|
||||
(elem passive funcref (ref.func 0) (ref.null) (ref.func 1))
|
||||
(func)
|
||||
(func))
|
||||
|
||||
;; memory.fill
|
||||
(module
|
||||
(memory 1)
|
||||
|
||||
(func (export "fill") (param i32 i32 i32)
|
||||
(memory.fill
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
(local.get 2)))
|
||||
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0)))
|
||||
)
|
||||
|
||||
;; Basic fill test.
|
||||
(invoke "fill" (i32.const 1) (i32.const 0xff) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xff))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 0xff))
|
||||
(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 0xff))
|
||||
(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 0))
|
||||
|
||||
;; Fill value is stored as a byte.
|
||||
(invoke "fill" (i32.const 0) (i32.const 0xbbaa) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xaa))
|
||||
|
||||
;; Fill all of memory
|
||||
(invoke "fill" (i32.const 0) (i32.const 0) (i32.const 0x10000))
|
||||
|
||||
;; Out-of-bounds writes trap, but all previous writes succeed.
|
||||
(assert_trap (invoke "fill" (i32.const 0xff00) (i32.const 1) (i32.const 0x101))
|
||||
"out of bounds memory access")
|
||||
(assert_return (invoke "load8_u" (i32.const 0xff00)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 1))
|
||||
|
||||
;; Succeed when writing 0 bytes at the end of the region.
|
||||
(invoke "fill" (i32.const 0x10000) (i32.const 0) (i32.const 0))
|
||||
|
||||
;; Fail on out-of-bounds when writing 0 bytes outside of memory.
|
||||
(assert_trap (invoke "fill" (i32.const 0x10001) (i32.const 0) (i32.const 0))
|
||||
"out of bounds memory access")
|
||||
|
||||
|
||||
;; memory.copy
|
||||
(module
|
||||
(memory (data "\aa\bb\cc\dd"))
|
||||
|
||||
(func (export "copy") (param i32 i32 i32)
|
||||
(memory.copy
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
(local.get 2)))
|
||||
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0)))
|
||||
)
|
||||
|
||||
;; Non-overlapping copy.
|
||||
(invoke "copy" (i32.const 10) (i32.const 0) (i32.const 4))
|
||||
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xbb))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xdd))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 0))
|
||||
|
||||
;; Overlap, source > dest
|
||||
(invoke "copy" (i32.const 8) (i32.const 10) (i32.const 4))
|
||||
(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0xbb))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xdd))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xdd))
|
||||
|
||||
;; Overlap, source < dest
|
||||
(invoke "copy" (i32.const 10) (i32.const 7) (i32.const 6))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 0xbb))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 0xdd))
|
||||
(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 0))
|
||||
|
||||
;; Copy ending at memory limit is ok.
|
||||
(invoke "copy" (i32.const 0xff00) (i32.const 0) (i32.const 0x100))
|
||||
(invoke "copy" (i32.const 0xfe00) (i32.const 0xff00) (i32.const 0x100))
|
||||
|
||||
;; Out-of-bounds writes trap, but all previous writes succeed.
|
||||
(assert_trap (invoke "copy" (i32.const 0xfffe) (i32.const 0) (i32.const 3))
|
||||
"out of bounds memory access")
|
||||
(assert_return (invoke "load8_u" (i32.const 0xfffe)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 0xbb))
|
||||
|
||||
;; Succeed when copying 0 bytes at the end of the region.
|
||||
(invoke "copy" (i32.const 0x10000) (i32.const 0) (i32.const 0))
|
||||
(invoke "copy" (i32.const 0) (i32.const 0x10000) (i32.const 0))
|
||||
|
||||
;; Fail on out-of-bounds when copying 0 bytes outside of memory.
|
||||
(assert_trap (invoke "copy" (i32.const 0x10001) (i32.const 0) (i32.const 0))
|
||||
"out of bounds memory access")
|
||||
(assert_trap (invoke "copy" (i32.const 0) (i32.const 0x10001) (i32.const 0))
|
||||
"out of bounds memory access")
|
||||
|
||||
|
||||
;; memory.init
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\aa\bb\cc\dd")
|
||||
|
||||
(func (export "init") (param i32 i32 i32)
|
||||
(memory.init 0
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
(local.get 2)))
|
||||
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0)))
|
||||
)
|
||||
|
||||
(invoke "init" (i32.const 0) (i32.const 1) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0xbb))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0xcc))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 0))
|
||||
|
||||
;; Init ending at memory limit and segment limit is ok.
|
||||
(invoke "init" (i32.const 0xfffc) (i32.const 0) (i32.const 4))
|
||||
|
||||
;; Out-of-bounds writes trap, but all previous writes succeed.
|
||||
(assert_trap (invoke "init" (i32.const 0xfffe) (i32.const 0) (i32.const 3))
|
||||
"out of bounds memory access")
|
||||
(assert_return (invoke "load8_u" (i32.const 0xfffe)) (i32.const 0xaa))
|
||||
(assert_return (invoke "load8_u" (i32.const 0xffff)) (i32.const 0xbb))
|
||||
|
||||
;; Succeed when writing 0 bytes at the end of either region.
|
||||
(invoke "init" (i32.const 0x10000) (i32.const 0) (i32.const 0))
|
||||
(invoke "init" (i32.const 0) (i32.const 4) (i32.const 0))
|
||||
|
||||
;; Fail on out-of-bounds when writing 0 bytes outside of memory or segment.
|
||||
(assert_trap (invoke "init" (i32.const 0x10001) (i32.const 0) (i32.const 0))
|
||||
"out of bounds memory access")
|
||||
(assert_trap (invoke "init" (i32.const 0) (i32.const 5) (i32.const 0))
|
||||
"out of bounds memory access")
|
||||
|
||||
;; data.drop
|
||||
(module
|
||||
(memory 1)
|
||||
(data $p passive "")
|
||||
(data $a 0 (i32.const 0) "")
|
||||
|
||||
(func (export "drop_passive") (data.drop $p))
|
||||
(func (export "init_passive")
|
||||
(memory.init $p (i32.const 0) (i32.const 0) (i32.const 0)))
|
||||
|
||||
(func (export "drop_active") (data.drop $a))
|
||||
(func (export "init_active")
|
||||
(memory.init $a (i32.const 0) (i32.const 0) (i32.const 0)))
|
||||
)
|
||||
|
||||
(invoke "init_passive")
|
||||
(invoke "drop_passive")
|
||||
(assert_trap (invoke "drop_passive") "data segment dropped")
|
||||
(assert_trap (invoke "init_passive") "data segment dropped")
|
||||
(assert_trap (invoke "drop_active") "data segment dropped")
|
||||
(assert_trap (invoke "init_active") "data segment dropped")
|
||||
|
||||
|
||||
;; table.init
|
||||
(module
|
||||
(table 3 funcref)
|
||||
(elem passive funcref
|
||||
(ref.func $zero) (ref.func $one) (ref.func $zero) (ref.func $one))
|
||||
|
||||
(func $zero (result i32) (i32.const 0))
|
||||
(func $one (result i32) (i32.const 1))
|
||||
|
||||
(func (export "init") (param i32 i32 i32)
|
||||
(table.init 0
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
(local.get 2)))
|
||||
|
||||
(func (export "call") (param i32) (result i32)
|
||||
(call_indirect (result i32)
|
||||
(local.get 0)))
|
||||
)
|
||||
|
||||
(invoke "init" (i32.const 0) (i32.const 1) (i32.const 2))
|
||||
(assert_return (invoke "call" (i32.const 0)) (i32.const 1))
|
||||
(assert_return (invoke "call" (i32.const 1)) (i32.const 0))
|
||||
(assert_trap (invoke "call" (i32.const 2)) "uninitialized element")
|
||||
|
||||
;; Init ending at table limit and segment limit is ok.
|
||||
(invoke "init" (i32.const 1) (i32.const 2) (i32.const 2))
|
||||
|
||||
;; Out-of-bounds stores trap, but all previous stores succeed.
|
||||
(assert_trap (invoke "init" (i32.const 2) (i32.const 0) (i32.const 2))
|
||||
"out of bounds table access")
|
||||
(assert_return (invoke "call" (i32.const 2)) (i32.const 0))
|
||||
|
||||
;; Succeed when storing 0 elements at the end of either region.
|
||||
(invoke "init" (i32.const 3) (i32.const 0) (i32.const 0))
|
||||
(invoke "init" (i32.const 0) (i32.const 4) (i32.const 0))
|
||||
|
||||
;; Fail on out-of-bounds when storing 0 elements outside of table or segment.
|
||||
(assert_trap (invoke "init" (i32.const 4) (i32.const 0) (i32.const 0))
|
||||
"out of bounds table access")
|
||||
(assert_trap (invoke "init" (i32.const 0) (i32.const 5) (i32.const 0))
|
||||
"out of bounds table access")
|
||||
|
||||
|
||||
;; elem.drop
|
||||
(module
|
||||
(table 1 funcref)
|
||||
(func $f)
|
||||
(elem $p passive funcref (ref.func $f))
|
||||
(elem $a 0 (i32.const 0) $f)
|
||||
|
||||
(func (export "drop_passive") (elem.drop $p))
|
||||
(func (export "init_passive")
|
||||
(table.init $p (i32.const 0) (i32.const 0) (i32.const 0)))
|
||||
|
||||
(func (export "drop_active") (elem.drop $a))
|
||||
(func (export "init_active")
|
||||
(table.init $a (i32.const 0) (i32.const 0) (i32.const 0)))
|
||||
)
|
||||
|
||||
(invoke "init_passive")
|
||||
(invoke "drop_passive")
|
||||
(assert_trap (invoke "drop_passive") "element segment dropped")
|
||||
(assert_trap (invoke "init_passive") "element segment dropped")
|
||||
(assert_trap (invoke "drop_active") "element segment dropped")
|
||||
(assert_trap (invoke "init_active") "element segment dropped")
|
||||
|
||||
|
||||
;; table.copy
|
||||
(module
|
||||
(table 10 funcref)
|
||||
(elem (i32.const 0) $zero $one $two)
|
||||
(func $zero (result i32) (i32.const 0))
|
||||
(func $one (result i32) (i32.const 1))
|
||||
(func $two (result i32) (i32.const 2))
|
||||
|
||||
(func (export "copy") (param i32 i32 i32)
|
||||
(table.copy
|
||||
(local.get 0)
|
||||
(local.get 1)
|
||||
(local.get 2)))
|
||||
|
||||
(func (export "call") (param i32) (result i32)
|
||||
(call_indirect (result i32)
|
||||
(local.get 0)))
|
||||
)
|
||||
|
||||
;; Non-overlapping copy.
|
||||
(invoke "copy" (i32.const 3) (i32.const 0) (i32.const 3))
|
||||
;; Now [$zero, $one, $two, $zero, $one, $two, ...]
|
||||
(assert_return (invoke "call" (i32.const 3)) (i32.const 0))
|
||||
(assert_return (invoke "call" (i32.const 4)) (i32.const 1))
|
||||
(assert_return (invoke "call" (i32.const 5)) (i32.const 2))
|
||||
|
||||
;; Overlap, source > dest
|
||||
(invoke "copy" (i32.const 0) (i32.const 1) (i32.const 3))
|
||||
;; Now [$one, $two, $zero, $zero, $one, $two, ...]
|
||||
(assert_return (invoke "call" (i32.const 0)) (i32.const 1))
|
||||
(assert_return (invoke "call" (i32.const 1)) (i32.const 2))
|
||||
(assert_return (invoke "call" (i32.const 2)) (i32.const 0))
|
||||
|
||||
;; Overlap, source < dest
|
||||
(invoke "copy" (i32.const 2) (i32.const 0) (i32.const 3))
|
||||
;; Now [$one, $two, $one, $two, $zero, $two, ...]
|
||||
(assert_return (invoke "call" (i32.const 2)) (i32.const 1))
|
||||
(assert_return (invoke "call" (i32.const 3)) (i32.const 2))
|
||||
(assert_return (invoke "call" (i32.const 4)) (i32.const 0))
|
||||
|
||||
;; Copy ending at table limit is ok.
|
||||
(invoke "copy" (i32.const 6) (i32.const 8) (i32.const 2))
|
||||
(invoke "copy" (i32.const 8) (i32.const 6) (i32.const 2))
|
||||
|
||||
;; Out-of-bounds writes trap, but all previous writes succeed.
|
||||
(assert_trap (invoke "call" (i32.const 9)) "uninitialized element")
|
||||
(assert_trap (invoke "copy" (i32.const 9) (i32.const 0) (i32.const 2))
|
||||
"out of bounds table access")
|
||||
(assert_return (invoke "call" (i32.const 9)) (i32.const 1))
|
||||
|
||||
;; Succeed when copying 0 elements at the end of the region.
|
||||
(invoke "copy" (i32.const 10) (i32.const 0) (i32.const 0))
|
||||
(invoke "copy" (i32.const 0) (i32.const 10) (i32.const 0))
|
||||
|
||||
;; Fail on out-of-bounds when copying 0 elements outside of table.
|
||||
(assert_trap (invoke "copy" (i32.const 11) (i32.const 0) (i32.const 0))
|
||||
"out of bounds table access")
|
||||
(assert_trap (invoke "copy" (i32.const 0) (i32.const 11) (i32.const 0))
|
||||
"out of bounds table access")
|
470
test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js
Normal file
470
test/mjsunit/wasm/bulk-memory-spec/bulk.wast.js
Normal file
@ -0,0 +1,470 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// bulk.wast:2
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x0b\x86\x80\x80\x80\x00\x01\x01\x03\x66\x6f\x6f");
|
||||
|
||||
// bulk.wast:6
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x03\x09\x8c\x80\x80\x80\x00\x01\x01\x70\x03\xd2\x00\x0b\xd0\x0b\xd2\x01\x0b\x0a\x8f\x80\x80\x80\x00\x02\x82\x80\x80\x80\x00\x00\x0b\x82\x80\x80\x80\x00\x00\x0b");
|
||||
|
||||
// bulk.wast:13
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x04\x66\x69\x6c\x6c\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9d\x80\x80\x80\x00\x02\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b");
|
||||
|
||||
// bulk.wast:27
|
||||
run(() => call($3, "fill", [1, 255, 3]));
|
||||
|
||||
// bulk.wast:28
|
||||
assert_return(() => call($3, "load8_u", [0]), 0);
|
||||
|
||||
// bulk.wast:29
|
||||
assert_return(() => call($3, "load8_u", [1]), 255);
|
||||
|
||||
// bulk.wast:30
|
||||
assert_return(() => call($3, "load8_u", [2]), 255);
|
||||
|
||||
// bulk.wast:31
|
||||
assert_return(() => call($3, "load8_u", [3]), 255);
|
||||
|
||||
// bulk.wast:32
|
||||
assert_return(() => call($3, "load8_u", [4]), 0);
|
||||
|
||||
// bulk.wast:35
|
||||
run(() => call($3, "fill", [0, 48042, 2]));
|
||||
|
||||
// bulk.wast:36
|
||||
assert_return(() => call($3, "load8_u", [0]), 170);
|
||||
|
||||
// bulk.wast:37
|
||||
assert_return(() => call($3, "load8_u", [1]), 170);
|
||||
|
||||
// bulk.wast:40
|
||||
run(() => call($3, "fill", [0, 0, 65536]));
|
||||
|
||||
// bulk.wast:43
|
||||
assert_trap(() => call($3, "fill", [65280, 1, 257]));
|
||||
|
||||
// bulk.wast:45
|
||||
assert_return(() => call($3, "load8_u", [65280]), 1);
|
||||
|
||||
// bulk.wast:46
|
||||
assert_return(() => call($3, "load8_u", [65535]), 1);
|
||||
|
||||
// bulk.wast:49
|
||||
run(() => call($3, "fill", [65536, 0, 0]));
|
||||
|
||||
// bulk.wast:52
|
||||
assert_trap(() => call($3, "fill", [65537, 0, 0]));
|
||||
|
||||
// bulk.wast:57
|
||||
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x92\x80\x80\x80\x00\x02\x04\x63\x6f\x70\x79\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8a\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x04\xaa\xbb\xcc\xdd");
|
||||
|
||||
// bulk.wast:71
|
||||
run(() => call($4, "copy", [10, 0, 4]));
|
||||
|
||||
// bulk.wast:73
|
||||
assert_return(() => call($4, "load8_u", [9]), 0);
|
||||
|
||||
// bulk.wast:74
|
||||
assert_return(() => call($4, "load8_u", [10]), 170);
|
||||
|
||||
// bulk.wast:75
|
||||
assert_return(() => call($4, "load8_u", [11]), 187);
|
||||
|
||||
// bulk.wast:76
|
||||
assert_return(() => call($4, "load8_u", [12]), 204);
|
||||
|
||||
// bulk.wast:77
|
||||
assert_return(() => call($4, "load8_u", [13]), 221);
|
||||
|
||||
// bulk.wast:78
|
||||
assert_return(() => call($4, "load8_u", [14]), 0);
|
||||
|
||||
// bulk.wast:81
|
||||
run(() => call($4, "copy", [8, 10, 4]));
|
||||
|
||||
// bulk.wast:82
|
||||
assert_return(() => call($4, "load8_u", [8]), 170);
|
||||
|
||||
// bulk.wast:83
|
||||
assert_return(() => call($4, "load8_u", [9]), 187);
|
||||
|
||||
// bulk.wast:84
|
||||
assert_return(() => call($4, "load8_u", [10]), 204);
|
||||
|
||||
// bulk.wast:85
|
||||
assert_return(() => call($4, "load8_u", [11]), 221);
|
||||
|
||||
// bulk.wast:86
|
||||
assert_return(() => call($4, "load8_u", [12]), 204);
|
||||
|
||||
// bulk.wast:87
|
||||
assert_return(() => call($4, "load8_u", [13]), 221);
|
||||
|
||||
// bulk.wast:90
|
||||
run(() => call($4, "copy", [10, 7, 6]));
|
||||
|
||||
// bulk.wast:91
|
||||
assert_return(() => call($4, "load8_u", [10]), 0);
|
||||
|
||||
// bulk.wast:92
|
||||
assert_return(() => call($4, "load8_u", [11]), 170);
|
||||
|
||||
// bulk.wast:93
|
||||
assert_return(() => call($4, "load8_u", [12]), 187);
|
||||
|
||||
// bulk.wast:94
|
||||
assert_return(() => call($4, "load8_u", [13]), 204);
|
||||
|
||||
// bulk.wast:95
|
||||
assert_return(() => call($4, "load8_u", [14]), 221);
|
||||
|
||||
// bulk.wast:96
|
||||
assert_return(() => call($4, "load8_u", [15]), 204);
|
||||
|
||||
// bulk.wast:97
|
||||
assert_return(() => call($4, "load8_u", [16]), 0);
|
||||
|
||||
// bulk.wast:100
|
||||
run(() => call($4, "copy", [65280, 0, 256]));
|
||||
|
||||
// bulk.wast:101
|
||||
run(() => call($4, "copy", [65024, 65280, 256]));
|
||||
|
||||
// bulk.wast:104
|
||||
assert_trap(() => call($4, "copy", [65534, 0, 3]));
|
||||
|
||||
// bulk.wast:106
|
||||
assert_return(() => call($4, "load8_u", [65534]), 170);
|
||||
|
||||
// bulk.wast:107
|
||||
assert_return(() => call($4, "load8_u", [65535]), 187);
|
||||
|
||||
// bulk.wast:110
|
||||
run(() => call($4, "copy", [65536, 0, 0]));
|
||||
|
||||
// bulk.wast:111
|
||||
run(() => call($4, "copy", [0, 65536, 0]));
|
||||
|
||||
// bulk.wast:114
|
||||
assert_trap(() => call($4, "copy", [65537, 0, 0]));
|
||||
|
||||
// bulk.wast:116
|
||||
assert_trap(() => call($4, "copy", [0, 65537, 0]));
|
||||
|
||||
// bulk.wast:121
|
||||
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8c\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x04\x69\x6e\x69\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x08\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x87\x80\x80\x80\x00\x01\x01\x04\xaa\xbb\xcc\xdd");
|
||||
|
||||
// bulk.wast:135
|
||||
run(() => call($5, "init", [0, 1, 2]));
|
||||
|
||||
// bulk.wast:136
|
||||
assert_return(() => call($5, "load8_u", [0]), 187);
|
||||
|
||||
// bulk.wast:137
|
||||
assert_return(() => call($5, "load8_u", [1]), 204);
|
||||
|
||||
// bulk.wast:138
|
||||
assert_return(() => call($5, "load8_u", [2]), 0);
|
||||
|
||||
// bulk.wast:141
|
||||
run(() => call($5, "init", [65532, 0, 4]));
|
||||
|
||||
// bulk.wast:144
|
||||
assert_trap(() => call($5, "init", [65534, 0, 3]));
|
||||
|
||||
// bulk.wast:146
|
||||
assert_return(() => call($5, "load8_u", [65534]), 170);
|
||||
|
||||
// bulk.wast:147
|
||||
assert_return(() => call($5, "load8_u", [65535]), 187);
|
||||
|
||||
// bulk.wast:150
|
||||
run(() => call($5, "init", [65536, 0, 0]));
|
||||
|
||||
// bulk.wast:151
|
||||
run(() => call($5, "init", [0, 4, 0]));
|
||||
|
||||
// bulk.wast:154
|
||||
assert_trap(() => call($5, "init", [65537, 0, 0]));
|
||||
|
||||
// bulk.wast:156
|
||||
assert_trap(() => call($5, "init", [0, 5, 0]));
|
||||
|
||||
// bulk.wast:160
|
||||
let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x85\x80\x80\x80\x00\x04\x00\x00\x00\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\xbb\x80\x80\x80\x00\x04\x0c\x64\x72\x6f\x70\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x00\x0c\x69\x6e\x69\x74\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x01\x0b\x64\x72\x6f\x70\x5f\x61\x63\x74\x69\x76\x65\x00\x02\x0b\x69\x6e\x69\x74\x5f\x61\x63\x74\x69\x76\x65\x00\x03\x0c\x81\x80\x80\x80\x00\x02\x0a\xb7\x80\x80\x80\x00\x04\x85\x80\x80\x80\x00\x00\xfc\x09\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x09\x01\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x08\x01\x00\x0b\x0b\x88\x80\x80\x80\x00\x02\x01\x00\x00\x41\x00\x0b\x00");
|
||||
|
||||
// bulk.wast:174
|
||||
run(() => call($6, "init_passive", []));
|
||||
|
||||
// bulk.wast:175
|
||||
run(() => call($6, "drop_passive", []));
|
||||
|
||||
// bulk.wast:176
|
||||
assert_trap(() => call($6, "drop_passive", []));
|
||||
|
||||
// bulk.wast:177
|
||||
assert_trap(() => call($6, "init_passive", []));
|
||||
|
||||
// bulk.wast:178
|
||||
assert_trap(() => call($6, "drop_active", []));
|
||||
|
||||
// bulk.wast:179
|
||||
assert_trap(() => call($6, "init_active", []));
|
||||
|
||||
// bulk.wast:183
|
||||
let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x85\x80\x80\x80\x00\x04\x00\x00\x01\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x03\x07\x8f\x80\x80\x80\x00\x02\x04\x69\x6e\x69\x74\x00\x02\x04\x63\x61\x6c\x6c\x00\x03\x09\x90\x80\x80\x80\x00\x01\x01\x70\x04\xd2\x00\x0b\xd2\x01\x0b\xd2\x00\x0b\xd2\x01\x0b\x0a\xb0\x80\x80\x80\x00\x04\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0c\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
|
||||
|
||||
// bulk.wast:202
|
||||
run(() => call($7, "init", [0, 1, 2]));
|
||||
|
||||
// bulk.wast:203
|
||||
assert_return(() => call($7, "call", [0]), 1);
|
||||
|
||||
// bulk.wast:204
|
||||
assert_return(() => call($7, "call", [1]), 0);
|
||||
|
||||
// bulk.wast:205
|
||||
assert_trap(() => call($7, "call", [2]));
|
||||
|
||||
// bulk.wast:208
|
||||
run(() => call($7, "init", [1, 2, 2]));
|
||||
|
||||
// bulk.wast:211
|
||||
assert_trap(() => call($7, "init", [2, 0, 2]));
|
||||
|
||||
// bulk.wast:213
|
||||
assert_return(() => call($7, "call", [2]), 0);
|
||||
|
||||
// bulk.wast:216
|
||||
run(() => call($7, "init", [3, 0, 0]));
|
||||
|
||||
// bulk.wast:217
|
||||
run(() => call($7, "init", [0, 4, 0]));
|
||||
|
||||
// bulk.wast:220
|
||||
assert_trap(() => call($7, "init", [4, 0, 0]));
|
||||
|
||||
// bulk.wast:222
|
||||
assert_trap(() => call($7, "init", [0, 5, 0]));
|
||||
|
||||
// bulk.wast:227
|
||||
let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x01\x07\xbb\x80\x80\x80\x00\x04\x0c\x64\x72\x6f\x70\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x01\x0c\x69\x6e\x69\x74\x5f\x70\x61\x73\x73\x69\x76\x65\x00\x02\x0b\x64\x72\x6f\x70\x5f\x61\x63\x74\x69\x76\x65\x00\x03\x0b\x69\x6e\x69\x74\x5f\x61\x63\x74\x69\x76\x65\x00\x04\x09\x8d\x80\x80\x80\x00\x02\x01\x70\x01\xd2\x00\x0b\x00\x41\x00\x0b\x01\x00\x0a\xbe\x80\x80\x80\x00\x05\x82\x80\x80\x80\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x00\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x0c\x00\x00\x0b\x85\x80\x80\x80\x00\x00\xfc\x0d\x01\x0b\x8c\x80\x80\x80\x00\x00\x41\x00\x41\x00\x41\x00\xfc\x0c\x01\x00\x0b");
|
||||
|
||||
// bulk.wast:242
|
||||
run(() => call($8, "init_passive", []));
|
||||
|
||||
// bulk.wast:243
|
||||
run(() => call($8, "drop_passive", []));
|
||||
|
||||
// bulk.wast:244
|
||||
assert_trap(() => call($8, "drop_passive", []));
|
||||
|
||||
// bulk.wast:245
|
||||
assert_trap(() => call($8, "init_passive", []));
|
||||
|
||||
// bulk.wast:246
|
||||
assert_trap(() => call($8, "drop_active", []));
|
||||
|
||||
// bulk.wast:247
|
||||
assert_trap(() => call($8, "init_active", []));
|
||||
|
||||
// bulk.wast:251
|
||||
let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x90\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x60\x01\x7f\x01\x7f\x03\x86\x80\x80\x80\x00\x05\x00\x00\x00\x01\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x8f\x80\x80\x80\x00\x02\x04\x63\x6f\x70\x79\x00\x03\x04\x63\x61\x6c\x6c\x00\x04\x09\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x00\x01\x02\x0a\xb9\x80\x80\x80\x00\x05\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x84\x80\x80\x80\x00\x00\x41\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0e\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
|
||||
|
||||
// bulk.wast:270
|
||||
run(() => call($9, "copy", [3, 0, 3]));
|
||||
|
||||
// bulk.wast:272
|
||||
assert_return(() => call($9, "call", [3]), 0);
|
||||
|
||||
// bulk.wast:273
|
||||
assert_return(() => call($9, "call", [4]), 1);
|
||||
|
||||
// bulk.wast:274
|
||||
assert_return(() => call($9, "call", [5]), 2);
|
||||
|
||||
// bulk.wast:277
|
||||
run(() => call($9, "copy", [0, 1, 3]));
|
||||
|
||||
// bulk.wast:279
|
||||
assert_return(() => call($9, "call", [0]), 1);
|
||||
|
||||
// bulk.wast:280
|
||||
assert_return(() => call($9, "call", [1]), 2);
|
||||
|
||||
// bulk.wast:281
|
||||
assert_return(() => call($9, "call", [2]), 0);
|
||||
|
||||
// bulk.wast:284
|
||||
run(() => call($9, "copy", [2, 0, 3]));
|
||||
|
||||
// bulk.wast:286
|
||||
assert_return(() => call($9, "call", [2]), 1);
|
||||
|
||||
// bulk.wast:287
|
||||
assert_return(() => call($9, "call", [3]), 2);
|
||||
|
||||
// bulk.wast:288
|
||||
assert_return(() => call($9, "call", [4]), 0);
|
||||
|
||||
// bulk.wast:291
|
||||
run(() => call($9, "copy", [6, 8, 2]));
|
||||
|
||||
// bulk.wast:292
|
||||
run(() => call($9, "copy", [8, 6, 2]));
|
||||
|
||||
// bulk.wast:295
|
||||
assert_trap(() => call($9, "call", [9]));
|
||||
|
||||
// bulk.wast:296
|
||||
assert_trap(() => call($9, "copy", [9, 0, 2]));
|
||||
|
||||
// bulk.wast:298
|
||||
assert_return(() => call($9, "call", [9]), 1);
|
||||
|
||||
// bulk.wast:301
|
||||
run(() => call($9, "copy", [10, 0, 0]));
|
||||
|
||||
// bulk.wast:302
|
||||
run(() => call($9, "copy", [0, 10, 0]));
|
||||
|
||||
// bulk.wast:305
|
||||
assert_trap(() => call($9, "copy", [11, 0, 0]));
|
||||
|
||||
// bulk.wast:307
|
||||
assert_trap(() => call($9, "copy", [0, 11, 0]));
|
130
test/mjsunit/wasm/bulk-memory-spec/custom.wast
Normal file
130
test/mjsunit/wasm/bulk-memory-spec/custom.wast
Normal file
@ -0,0 +1,130 @@
|
||||
(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"
|
||||
)
|
||||
|
||||
(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"
|
||||
)
|
||||
|
||||
(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
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm" "\01\00\00\00"
|
||||
"\00"
|
||||
)
|
||||
"unexpected end"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm" "\01\00\00\00"
|
||||
"\00\00"
|
||||
)
|
||||
"unexpected end"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm" "\01\00\00\00"
|
||||
"\00\00\00\05\01\00\07\00\00"
|
||||
)
|
||||
"unexpected end"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm" "\01\00\00\00"
|
||||
"\00\26\10" "a custom section" "this is the payload"
|
||||
)
|
||||
"unexpected end"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(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"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(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 concatenated modules.
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm\01\00\00\00"
|
||||
"\00asm\01\00\00\00"
|
||||
)
|
||||
"length out of bounds"
|
||||
)
|
||||
|
||||
(assert_malformed
|
||||
(module binary
|
||||
"\00asm" "\01\00\00\00"
|
||||
"\05\03\01\00\01" ;; memory section
|
||||
"\0c\01\02" ;; data count section (2 segments)
|
||||
"\0b\06\01\00\41\00\0b\00" ;; data section (1 segment)
|
||||
)
|
||||
"data count and data section have inconsistent lengths"
|
||||
)
|
170
test/mjsunit/wasm/bulk-memory-spec/custom.wast.js
Normal file
170
test/mjsunit/wasm/bulk-memory-spec/custom.wast.js
Normal file
@ -0,0 +1,170 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// custom.wast:1
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x20\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x11\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x00\x10\x00\x74\x68\x69\x73\x20\x69\x73\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x01\x00\x00\x24\x10\x00\x00\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x00\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\xef\xbb\xbf\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\xe2\x8c\xa3\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x1f\x16\x6d\x6f\x64\x75\x6c\x65\x20\x77\x69\x74\x68\x69\x6e\x20\x61\x20\x6d\x6f\x64\x75\x6c\x65\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// custom.wast:14
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x01\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x02\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x03\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x04\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x05\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x06\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x07\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x09\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x0a\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x0b\x01\x00\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64\x00\x0e\x06\x63\x75\x73\x74\x6f\x6d\x70\x61\x79\x6c\x6f\x61\x64");
|
||||
|
||||
// custom.wast:50
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x07\x01\x60\x02\x7f\x7f\x01\x7f\x00\x1a\x06\x63\x75\x73\x74\x6f\x6d\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x03\x02\x01\x00\x07\x0a\x01\x06\x61\x64\x64\x54\x77\x6f\x00\x00\x0a\x09\x01\x07\x00\x20\x00\x20\x01\x6a\x0b\x00\x1b\x07\x63\x75\x73\x74\x6f\x6d\x32\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
|
||||
|
||||
// custom.wast:60
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00");
|
||||
|
||||
// custom.wast:68
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x00");
|
||||
|
||||
// custom.wast:76
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x00\x00\x05\x01\x00\x07\x00\x00");
|
||||
|
||||
// custom.wast:84
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x26\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
|
||||
|
||||
// custom.wast:92
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x25\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x00\x24\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
|
||||
|
||||
// custom.wast:101
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x07\x01\x60\x02\x7f\x7f\x01\x7f\x00\x25\x10\x61\x20\x63\x75\x73\x74\x6f\x6d\x20\x73\x65\x63\x74\x69\x6f\x6e\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64\x03\x02\x01\x00\x0a\x09\x01\x07\x00\x20\x00\x20\x01\x6a\x0b\x00\x1b\x07\x63\x75\x73\x74\x6f\x6d\x32\x74\x68\x69\x73\x20\x69\x73\x20\x74\x68\x65\x20\x70\x61\x79\x6c\x6f\x61\x64");
|
||||
|
||||
// custom.wast:114
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x00\x61\x73\x6d\x01\x00\x00\x00");
|
||||
|
||||
// custom.wast:122
|
||||
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x05\x03\x01\x00\x01\x0c\x01\x02\x0b\x06\x01\x00\x41\x00\x0b\x00");
|
392
test/mjsunit/wasm/bulk-memory-spec/linking.wast
Normal file
392
test/mjsunit/wasm/bulk-memory-spec/linking.wast
Normal file
@ -0,0 +1,392 @@
|
||||
;; Functions
|
||||
|
||||
(module $Mf
|
||||
(func (export "call") (result i32) (call $g))
|
||||
(func $g (result i32) (i32.const 2))
|
||||
)
|
||||
(register "Mf" $Mf)
|
||||
|
||||
(module $Nf
|
||||
(func $f (import "Mf" "call") (result i32))
|
||||
(export "Mf.call" (func $f))
|
||||
(func (export "call Mf.call") (result i32) (call $f))
|
||||
(func (export "call") (result i32) (call $g))
|
||||
(func $g (result i32) (i32.const 3))
|
||||
)
|
||||
|
||||
(assert_return (invoke $Mf "call") (i32.const 2))
|
||||
(assert_return (invoke $Nf "Mf.call") (i32.const 2))
|
||||
(assert_return (invoke $Nf "call") (i32.const 3))
|
||||
(assert_return (invoke $Nf "call Mf.call") (i32.const 2))
|
||||
|
||||
(module
|
||||
(import "spectest" "print_i32" (func $f (param i32)))
|
||||
(export "print" (func $f))
|
||||
)
|
||||
(register "reexport_f")
|
||||
(assert_unlinkable
|
||||
(module (import "reexport_f" "print" (func (param i64))))
|
||||
"incompatible import type"
|
||||
)
|
||||
(assert_unlinkable
|
||||
(module (import "reexport_f" "print" (func (param i32) (result i32))))
|
||||
"incompatible import type"
|
||||
)
|
||||
|
||||
|
||||
;; Globals
|
||||
|
||||
(module $Mg
|
||||
(global $glob (export "glob") i32 (i32.const 42))
|
||||
(func (export "get") (result i32) (global.get $glob))
|
||||
|
||||
;; export mutable globals
|
||||
(global $mut_glob (export "mut_glob") (mut i32) (i32.const 142))
|
||||
(func (export "get_mut") (result i32) (global.get $mut_glob))
|
||||
(func (export "set_mut") (param i32) (global.set $mut_glob (local.get 0)))
|
||||
)
|
||||
(register "Mg" $Mg)
|
||||
|
||||
(module $Ng
|
||||
(global $x (import "Mg" "glob") i32)
|
||||
(global $mut_glob (import "Mg" "mut_glob") (mut i32))
|
||||
(func $f (import "Mg" "get") (result i32))
|
||||
(func $get_mut (import "Mg" "get_mut") (result i32))
|
||||
(func $set_mut (import "Mg" "set_mut") (param i32))
|
||||
|
||||
(export "Mg.glob" (global $x))
|
||||
(export "Mg.get" (func $f))
|
||||
(global $glob (export "glob") i32 (i32.const 43))
|
||||
(func (export "get") (result i32) (global.get $glob))
|
||||
|
||||
(export "Mg.mut_glob" (global $mut_glob))
|
||||
(export "Mg.get_mut" (func $get_mut))
|
||||
(export "Mg.set_mut" (func $set_mut))
|
||||
)
|
||||
|
||||
(assert_return (get $Mg "glob") (i32.const 42))
|
||||
(assert_return (get $Ng "Mg.glob") (i32.const 42))
|
||||
(assert_return (get $Ng "glob") (i32.const 43))
|
||||
(assert_return (invoke $Mg "get") (i32.const 42))
|
||||
(assert_return (invoke $Ng "Mg.get") (i32.const 42))
|
||||
(assert_return (invoke $Ng "get") (i32.const 43))
|
||||
|
||||
(assert_return (get $Mg "mut_glob") (i32.const 142))
|
||||
(assert_return (get $Ng "Mg.mut_glob") (i32.const 142))
|
||||
(assert_return (invoke $Mg "get_mut") (i32.const 142))
|
||||
(assert_return (invoke $Ng "Mg.get_mut") (i32.const 142))
|
||||
|
||||
(assert_return (invoke $Mg "set_mut" (i32.const 241)))
|
||||
(assert_return (get $Mg "mut_glob") (i32.const 241))
|
||||
(assert_return (get $Ng "Mg.mut_glob") (i32.const 241))
|
||||
(assert_return (invoke $Mg "get_mut") (i32.const 241))
|
||||
(assert_return (invoke $Ng "Mg.get_mut") (i32.const 241))
|
||||
|
||||
|
||||
(assert_unlinkable
|
||||
(module (import "Mg" "mut_glob" (global i32)))
|
||||
"incompatible import type"
|
||||
)
|
||||
(assert_unlinkable
|
||||
(module (import "Mg" "glob" (global (mut i32))))
|
||||
"incompatible import type"
|
||||
)
|
||||
|
||||
;; Tables
|
||||
|
||||
(module $Mt
|
||||
(type (func (result i32)))
|
||||
(type (func))
|
||||
|
||||
(table (export "tab") 10 funcref)
|
||||
(elem (i32.const 2) $g $g $g $g)
|
||||
(func $g (result i32) (i32.const 4))
|
||||
(func (export "h") (result i32) (i32.const -4))
|
||||
|
||||
(func (export "call") (param i32) (result i32)
|
||||
(call_indirect (type 0) (local.get 0))
|
||||
)
|
||||
)
|
||||
(register "Mt" $Mt)
|
||||
|
||||
(module $Nt
|
||||
(type (func))
|
||||
(type (func (result i32)))
|
||||
|
||||
(func $f (import "Mt" "call") (param i32) (result i32))
|
||||
(func $h (import "Mt" "h") (result i32))
|
||||
|
||||
(table funcref (elem $g $g $g $h $f))
|
||||
(func $g (result i32) (i32.const 5))
|
||||
|
||||
(export "Mt.call" (func $f))
|
||||
(func (export "call Mt.call") (param i32) (result i32)
|
||||
(call $f (local.get 0))
|
||||
)
|
||||
(func (export "call") (param i32) (result i32)
|
||||
(call_indirect (type 1) (local.get 0))
|
||||
)
|
||||
)
|
||||
|
||||
(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
|
||||
(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const 4))
|
||||
|
||||
(assert_trap (invoke $Mt "call" (i32.const 1)) "uninitialized")
|
||||
(assert_trap (invoke $Nt "Mt.call" (i32.const 1)) "uninitialized")
|
||||
(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5))
|
||||
(assert_trap (invoke $Nt "call Mt.call" (i32.const 1)) "uninitialized")
|
||||
|
||||
(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized")
|
||||
(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized")
|
||||
(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5))
|
||||
(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized")
|
||||
|
||||
(assert_trap (invoke $Mt "call" (i32.const 20)) "undefined")
|
||||
(assert_trap (invoke $Nt "Mt.call" (i32.const 20)) "undefined")
|
||||
(assert_trap (invoke $Nt "call" (i32.const 7)) "undefined")
|
||||
(assert_trap (invoke $Nt "call Mt.call" (i32.const 20)) "undefined")
|
||||
|
||||
(assert_return (invoke $Nt "call" (i32.const 3)) (i32.const -4))
|
||||
(assert_trap (invoke $Nt "call" (i32.const 4)) "indirect call")
|
||||
|
||||
(module $Ot
|
||||
(type (func (result i32)))
|
||||
|
||||
(func $h (import "Mt" "h") (result i32))
|
||||
(table (import "Mt" "tab") 5 funcref)
|
||||
(elem (i32.const 1) $i $h)
|
||||
(func $i (result i32) (i32.const 6))
|
||||
|
||||
(func (export "call") (param i32) (result i32)
|
||||
(call_indirect (type 0) (local.get 0))
|
||||
)
|
||||
)
|
||||
|
||||
(assert_return (invoke $Mt "call" (i32.const 3)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 3)) (i32.const 4))
|
||||
(assert_return (invoke $Nt "call Mt.call" (i32.const 3)) (i32.const 4))
|
||||
(assert_return (invoke $Ot "call" (i32.const 3)) (i32.const 4))
|
||||
|
||||
(assert_return (invoke $Mt "call" (i32.const 2)) (i32.const -4))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 2)) (i32.const -4))
|
||||
(assert_return (invoke $Nt "call" (i32.const 2)) (i32.const 5))
|
||||
(assert_return (invoke $Nt "call Mt.call" (i32.const 2)) (i32.const -4))
|
||||
(assert_return (invoke $Ot "call" (i32.const 2)) (i32.const -4))
|
||||
|
||||
(assert_return (invoke $Mt "call" (i32.const 1)) (i32.const 6))
|
||||
(assert_return (invoke $Nt "Mt.call" (i32.const 1)) (i32.const 6))
|
||||
(assert_return (invoke $Nt "call" (i32.const 1)) (i32.const 5))
|
||||
(assert_return (invoke $Nt "call Mt.call" (i32.const 1)) (i32.const 6))
|
||||
(assert_return (invoke $Ot "call" (i32.const 1)) (i32.const 6))
|
||||
|
||||
(assert_trap (invoke $Mt "call" (i32.const 0)) "uninitialized")
|
||||
(assert_trap (invoke $Nt "Mt.call" (i32.const 0)) "uninitialized")
|
||||
(assert_return (invoke $Nt "call" (i32.const 0)) (i32.const 5))
|
||||
(assert_trap (invoke $Nt "call Mt.call" (i32.const 0)) "uninitialized")
|
||||
(assert_trap (invoke $Ot "call" (i32.const 0)) "uninitialized")
|
||||
|
||||
(assert_trap (invoke $Ot "call" (i32.const 20)) "undefined")
|
||||
|
||||
(module
|
||||
(table (import "Mt" "tab") 0 funcref)
|
||||
(elem (i32.const 9) $f)
|
||||
(func $f)
|
||||
)
|
||||
|
||||
(module $G1 (global (export "g") i32 (i32.const 5)))
|
||||
(register "G1" $G1)
|
||||
(module $G2
|
||||
(global (import "G1" "g") i32)
|
||||
(global (export "g") i32 (global.get 0))
|
||||
)
|
||||
(assert_return (get $G2 "g") (i32.const 5))
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(table (import "Mt" "tab") 0 funcref)
|
||||
(elem (i32.const 10) $f)
|
||||
(func $f)
|
||||
)
|
||||
"elements segment does not fit"
|
||||
)
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(table (import "Mt" "tab") 10 funcref)
|
||||
(memory (import "Mt" "mem") 1) ;; does not exist
|
||||
(func $f (result i32) (i32.const 0))
|
||||
(elem (i32.const 7) $f)
|
||||
(elem (i32.const 9) $f)
|
||||
)
|
||||
"unknown import"
|
||||
)
|
||||
(assert_trap (invoke $Mt "call" (i32.const 7)) "uninitialized")
|
||||
|
||||
;; Unlike in the v1 spec, the elements stored before an out-of-bounds access
|
||||
;; persist after the instantiation failure.
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(table (import "Mt" "tab") 10 funcref)
|
||||
(func $f (result i32) (i32.const 0))
|
||||
(elem (i32.const 7) $f)
|
||||
(elem (i32.const 12) $f) ;; out of bounds
|
||||
)
|
||||
"elements segment does not fit"
|
||||
)
|
||||
(assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(table (import "Mt" "tab") 10 funcref)
|
||||
(func $f (result i32) (i32.const 0))
|
||||
(elem (i32.const 7) $f)
|
||||
(memory 1)
|
||||
(data (i32.const 0x10000) "d") ;; out of bounds
|
||||
)
|
||||
"data segment does not fit"
|
||||
)
|
||||
(assert_return (invoke $Mt "call" (i32.const 7)) (i32.const 0))
|
||||
|
||||
|
||||
;; Memories
|
||||
|
||||
(module $Mm
|
||||
(memory (export "mem") 1 5)
|
||||
(data (i32.const 10) "\00\01\02\03\04\05\06\07\08\09")
|
||||
|
||||
(func (export "load") (param $a i32) (result i32)
|
||||
(i32.load8_u (local.get 0))
|
||||
)
|
||||
)
|
||||
(register "Mm" $Mm)
|
||||
|
||||
(module $Nm
|
||||
(func $loadM (import "Mm" "load") (param i32) (result i32))
|
||||
|
||||
(memory 1)
|
||||
(data (i32.const 10) "\f0\f1\f2\f3\f4\f5")
|
||||
|
||||
(export "Mm.load" (func $loadM))
|
||||
(func (export "load") (param $a i32) (result i32)
|
||||
(i32.load8_u (local.get 0))
|
||||
)
|
||||
)
|
||||
|
||||
(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 2))
|
||||
(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 2))
|
||||
(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
|
||||
|
||||
(module $Om
|
||||
(memory (import "Mm" "mem") 1)
|
||||
(data (i32.const 5) "\a0\a1\a2\a3\a4\a5\a6\a7")
|
||||
|
||||
(func (export "load") (param $a i32) (result i32)
|
||||
(i32.load8_u (local.get 0))
|
||||
)
|
||||
)
|
||||
|
||||
(assert_return (invoke $Mm "load" (i32.const 12)) (i32.const 0xa7))
|
||||
(assert_return (invoke $Nm "Mm.load" (i32.const 12)) (i32.const 0xa7))
|
||||
(assert_return (invoke $Nm "load" (i32.const 12)) (i32.const 0xf2))
|
||||
(assert_return (invoke $Om "load" (i32.const 12)) (i32.const 0xa7))
|
||||
|
||||
(module
|
||||
(memory (import "Mm" "mem") 0)
|
||||
(data (i32.const 0xffff) "a")
|
||||
)
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(memory (import "Mm" "mem") 0)
|
||||
(data (i32.const 0x10000) "a")
|
||||
)
|
||||
"data segment does not fit"
|
||||
)
|
||||
|
||||
(module $Pm
|
||||
(memory (import "Mm" "mem") 1 8)
|
||||
|
||||
(func (export "grow") (param $a i32) (result i32)
|
||||
(memory.grow (local.get 0))
|
||||
)
|
||||
)
|
||||
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 1))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 2)) (i32.const 1))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 3))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 3))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const 4))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 1)) (i32.const -1))
|
||||
(assert_return (invoke $Pm "grow" (i32.const 0)) (i32.const 5))
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(func $host (import "spectest" "print"))
|
||||
(memory (import "Mm" "mem") 1)
|
||||
(table (import "Mm" "tab") 0 funcref) ;; does not exist
|
||||
(data (i32.const 0) "abc")
|
||||
)
|
||||
"unknown import"
|
||||
)
|
||||
(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 0))
|
||||
|
||||
;; Unlike in v1 spec, bytes written before an out-of-bounds access persist
|
||||
;; after the instantiation failure.
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(memory (import "Mm" "mem") 1)
|
||||
(data (i32.const 0) "abc")
|
||||
(data (i32.const 0x50000) "d") ;; out of bounds
|
||||
)
|
||||
"data segment does not fit"
|
||||
)
|
||||
(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
|
||||
|
||||
(assert_unlinkable
|
||||
(module
|
||||
(memory (import "Mm" "mem") 1)
|
||||
(data (i32.const 0) "abc")
|
||||
(table 0 funcref)
|
||||
(func)
|
||||
(elem (i32.const 0) 0) ;; out of bounds
|
||||
)
|
||||
"elements segment does not fit"
|
||||
)
|
||||
(assert_return (invoke $Mm "load" (i32.const 0)) (i32.const 97))
|
||||
|
||||
;; Store is modified if the start function traps.
|
||||
(module $Ms
|
||||
(type $t (func (result i32)))
|
||||
(memory (export "memory") 1)
|
||||
(table (export "table") 1 funcref)
|
||||
(func (export "get memory[0]") (type $t)
|
||||
(i32.load8_u (i32.const 0))
|
||||
)
|
||||
(func (export "get table[0]") (type $t)
|
||||
(call_indirect (type $t) (i32.const 0))
|
||||
)
|
||||
)
|
||||
(register "Ms" $Ms)
|
||||
|
||||
(assert_trap
|
||||
(module
|
||||
(import "Ms" "memory" (memory 1))
|
||||
(import "Ms" "table" (table 1 funcref))
|
||||
(data (i32.const 0) "hello")
|
||||
(elem (i32.const 0) $f)
|
||||
(func $f (result i32)
|
||||
(i32.const 0xdead)
|
||||
)
|
||||
(func $main
|
||||
(unreachable)
|
||||
)
|
||||
(start $main)
|
||||
)
|
||||
"unreachable"
|
||||
)
|
||||
|
||||
(assert_return (invoke $Ms "get memory[0]") (i32.const 104)) ;; 'h'
|
||||
(assert_return (invoke $Ms "get table[0]") (i32.const 0xdead))
|
505
test/mjsunit/wasm/bulk-memory-spec/linking.wast.js
Normal file
505
test/mjsunit/wasm/bulk-memory-spec/linking.wast.js
Normal file
@ -0,0 +1,505 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// linking.wast:3
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x00\x07\x88\x80\x80\x80\x00\x01\x04\x63\x61\x6c\x6c\x00\x00\x0a\x93\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x10\x01\x0b\x84\x80\x80\x80\x00\x00\x41\x02\x0b");
|
||||
let $Mf = $1;
|
||||
|
||||
// linking.wast:7
|
||||
register("Mf", $Mf)
|
||||
|
||||
// linking.wast:9
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x66\x04\x63\x61\x6c\x6c\x00\x00\x03\x84\x80\x80\x80\x00\x03\x00\x00\x00\x07\xa1\x80\x80\x80\x00\x03\x07\x4d\x66\x2e\x63\x61\x6c\x6c\x00\x00\x0c\x63\x61\x6c\x6c\x20\x4d\x66\x2e\x63\x61\x6c\x6c\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x0a\x9c\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x10\x00\x0b\x84\x80\x80\x80\x00\x00\x10\x03\x0b\x84\x80\x80\x80\x00\x00\x41\x03\x0b");
|
||||
let $Nf = $2;
|
||||
|
||||
// linking.wast:17
|
||||
assert_return(() => call($Mf, "call", []), 2);
|
||||
|
||||
// linking.wast:18
|
||||
assert_return(() => call($Nf, "Mf.call", []), 2);
|
||||
|
||||
// linking.wast:19
|
||||
assert_return(() => call($Nf, "call", []), 3);
|
||||
|
||||
// linking.wast:20
|
||||
assert_return(() => call($Nf, "call Mf.call", []), 2);
|
||||
|
||||
// linking.wast:22
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x01\x7f\x00\x02\x96\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x09\x70\x72\x69\x6e\x74\x5f\x69\x33\x32\x00\x00\x07\x89\x80\x80\x80\x00\x01\x05\x70\x72\x69\x6e\x74\x00\x00");
|
||||
|
||||
// linking.wast:26
|
||||
register("reexport_f", $3)
|
||||
|
||||
// linking.wast:27
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x01\x7e\x00\x02\x94\x80\x80\x80\x00\x01\x0a\x72\x65\x65\x78\x70\x6f\x72\x74\x5f\x66\x05\x70\x72\x69\x6e\x74\x00\x00");
|
||||
|
||||
// linking.wast:31
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x94\x80\x80\x80\x00\x01\x0a\x72\x65\x65\x78\x70\x6f\x72\x74\x5f\x66\x05\x70\x72\x69\x6e\x74\x00\x00");
|
||||
|
||||
// linking.wast:39
|
||||
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x00\x03\x84\x80\x80\x80\x00\x03\x00\x00\x01\x06\x8c\x80\x80\x80\x00\x02\x7f\x00\x41\x2a\x0b\x7f\x01\x41\x8e\x01\x0b\x07\xad\x80\x80\x80\x00\x05\x04\x67\x6c\x6f\x62\x03\x00\x03\x67\x65\x74\x00\x00\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x01\x07\x67\x65\x74\x5f\x6d\x75\x74\x00\x01\x07\x73\x65\x74\x5f\x6d\x75\x74\x00\x02\x0a\x9e\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x23\x00\x0b\x84\x80\x80\x80\x00\x00\x23\x01\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x01\x0b");
|
||||
let $Mg = $4;
|
||||
|
||||
// linking.wast:48
|
||||
register("Mg", $Mg)
|
||||
|
||||
// linking.wast:50
|
||||
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x00\x02\xbe\x80\x80\x80\x00\x05\x02\x4d\x67\x04\x67\x6c\x6f\x62\x03\x7f\x00\x02\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x02\x4d\x67\x03\x67\x65\x74\x00\x00\x02\x4d\x67\x07\x67\x65\x74\x5f\x6d\x75\x74\x00\x00\x02\x4d\x67\x07\x73\x65\x74\x5f\x6d\x75\x74\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x2b\x0b\x07\xc9\x80\x80\x80\x00\x07\x07\x4d\x67\x2e\x67\x6c\x6f\x62\x03\x00\x06\x4d\x67\x2e\x67\x65\x74\x00\x00\x04\x67\x6c\x6f\x62\x03\x02\x03\x67\x65\x74\x00\x03\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x01\x0a\x4d\x67\x2e\x67\x65\x74\x5f\x6d\x75\x74\x00\x01\x0a\x4d\x67\x2e\x73\x65\x74\x5f\x6d\x75\x74\x00\x02\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x23\x02\x0b");
|
||||
let $Ng = $5;
|
||||
|
||||
// linking.wast:67
|
||||
assert_return(() => get($Mg, "glob"), 42);
|
||||
|
||||
// linking.wast:68
|
||||
assert_return(() => get($Ng, "Mg.glob"), 42);
|
||||
|
||||
// linking.wast:69
|
||||
assert_return(() => get($Ng, "glob"), 43);
|
||||
|
||||
// linking.wast:70
|
||||
assert_return(() => call($Mg, "get", []), 42);
|
||||
|
||||
// linking.wast:71
|
||||
assert_return(() => call($Ng, "Mg.get", []), 42);
|
||||
|
||||
// linking.wast:72
|
||||
assert_return(() => call($Ng, "get", []), 43);
|
||||
|
||||
// linking.wast:74
|
||||
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x91\x80\x80\x80\x00\x01\x03\x24\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\x8e\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Mg", $Mg)), "run", [])); // assert_return(() => get($Mg, "mut_glob"), 142)
|
||||
|
||||
// linking.wast:75
|
||||
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x94\x80\x80\x80\x00\x01\x03\x24\x4e\x67\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\x8e\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Ng", $Ng)), "run", [])); // assert_return(() => get($Ng, "Mg.mut_glob"), 142)
|
||||
|
||||
// linking.wast:76
|
||||
assert_return(() => call($Mg, "get_mut", []), 142);
|
||||
|
||||
// linking.wast:77
|
||||
assert_return(() => call($Ng, "Mg.get_mut", []), 142);
|
||||
|
||||
// linking.wast:79
|
||||
assert_return(() => call($Mg, "set_mut", [241]));
|
||||
|
||||
// linking.wast:80
|
||||
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x91\x80\x80\x80\x00\x01\x03\x24\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\xf1\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Mg", $Mg)), "run", [])); // assert_return(() => get($Mg, "mut_glob"), 241)
|
||||
|
||||
// linking.wast:81
|
||||
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x94\x80\x80\x80\x00\x01\x03\x24\x4e\x67\x0b\x4d\x67\x2e\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x23\x00\x01\x41\xf1\x01\x01\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$Ng", $Ng)), "run", [])); // assert_return(() => get($Ng, "Mg.mut_glob"), 241)
|
||||
|
||||
// linking.wast:82
|
||||
assert_return(() => call($Mg, "get_mut", []), 241);
|
||||
|
||||
// linking.wast:83
|
||||
assert_return(() => call($Ng, "Mg.get_mut", []), 241);
|
||||
|
||||
// linking.wast:86
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x90\x80\x80\x80\x00\x01\x02\x4d\x67\x08\x6d\x75\x74\x5f\x67\x6c\x6f\x62\x03\x7f\x00");
|
||||
|
||||
// linking.wast:90
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x67\x04\x67\x6c\x6f\x62\x03\x7f\x01");
|
||||
|
||||
// linking.wast:97
|
||||
let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x01\x7f\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x84\x80\x80\x80\x00\x03\x00\x00\x02\x04\x84\x80\x80\x80\x00\x01\x70\x00\x0a\x07\x92\x80\x80\x80\x00\x03\x03\x74\x61\x62\x01\x00\x01\x68\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x09\x8a\x80\x80\x80\x00\x01\x00\x41\x02\x0b\x04\x00\x00\x00\x00\x0a\x9f\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x41\x04\x0b\x84\x80\x80\x80\x00\x00\x41\x7c\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
|
||||
let $Mt = $6;
|
||||
|
||||
// linking.wast:110
|
||||
register("Mt", $Mt)
|
||||
|
||||
// linking.wast:112
|
||||
let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x03\x60\x00\x00\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x02\x92\x80\x80\x80\x00\x02\x02\x4d\x74\x04\x63\x61\x6c\x6c\x00\x02\x02\x4d\x74\x01\x68\x00\x01\x03\x84\x80\x80\x80\x00\x03\x01\x02\x02\x04\x85\x80\x80\x80\x00\x01\x70\x01\x05\x05\x07\xa1\x80\x80\x80\x00\x03\x07\x4d\x74\x2e\x63\x61\x6c\x6c\x00\x00\x0c\x63\x61\x6c\x6c\x20\x4d\x74\x2e\x63\x61\x6c\x6c\x00\x03\x04\x63\x61\x6c\x6c\x00\x04\x09\x8b\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x05\x02\x02\x02\x01\x00\x0a\xa1\x80\x80\x80\x00\x03\x84\x80\x80\x80\x00\x00\x41\x05\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x10\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x01\x00\x0b");
|
||||
let $Nt = $7;
|
||||
|
||||
// linking.wast:131
|
||||
assert_return(() => call($Mt, "call", [2]), 4);
|
||||
|
||||
// linking.wast:132
|
||||
assert_return(() => call($Nt, "Mt.call", [2]), 4);
|
||||
|
||||
// linking.wast:133
|
||||
assert_return(() => call($Nt, "call", [2]), 5);
|
||||
|
||||
// linking.wast:134
|
||||
assert_return(() => call($Nt, "call Mt.call", [2]), 4);
|
||||
|
||||
// linking.wast:136
|
||||
assert_trap(() => call($Mt, "call", [1]));
|
||||
|
||||
// linking.wast:137
|
||||
assert_trap(() => call($Nt, "Mt.call", [1]));
|
||||
|
||||
// linking.wast:138
|
||||
assert_return(() => call($Nt, "call", [1]), 5);
|
||||
|
||||
// linking.wast:139
|
||||
assert_trap(() => call($Nt, "call Mt.call", [1]));
|
||||
|
||||
// linking.wast:141
|
||||
assert_trap(() => call($Mt, "call", [0]));
|
||||
|
||||
// linking.wast:142
|
||||
assert_trap(() => call($Nt, "Mt.call", [0]));
|
||||
|
||||
// linking.wast:143
|
||||
assert_return(() => call($Nt, "call", [0]), 5);
|
||||
|
||||
// linking.wast:144
|
||||
assert_trap(() => call($Nt, "call Mt.call", [0]));
|
||||
|
||||
// linking.wast:146
|
||||
assert_trap(() => call($Mt, "call", [20]));
|
||||
|
||||
// linking.wast:147
|
||||
assert_trap(() => call($Nt, "Mt.call", [20]));
|
||||
|
||||
// linking.wast:148
|
||||
assert_trap(() => call($Nt, "call", [7]));
|
||||
|
||||
// linking.wast:149
|
||||
assert_trap(() => call($Nt, "call Mt.call", [20]));
|
||||
|
||||
// linking.wast:151
|
||||
assert_return(() => call($Nt, "call", [3]), -4);
|
||||
|
||||
// linking.wast:152
|
||||
assert_trap(() => call($Nt, "call", [4]));
|
||||
|
||||
// linking.wast:154
|
||||
let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8a\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x01\x7f\x01\x7f\x02\x93\x80\x80\x80\x00\x02\x02\x4d\x74\x01\x68\x00\x00\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x05\x03\x83\x80\x80\x80\x00\x02\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x63\x61\x6c\x6c\x00\x02\x09\x88\x80\x80\x80\x00\x01\x00\x41\x01\x0b\x02\x01\x00\x0a\x96\x80\x80\x80\x00\x02\x84\x80\x80\x80\x00\x00\x41\x06\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x11\x00\x00\x0b");
|
||||
let $Ot = $8;
|
||||
|
||||
// linking.wast:167
|
||||
assert_return(() => call($Mt, "call", [3]), 4);
|
||||
|
||||
// linking.wast:168
|
||||
assert_return(() => call($Nt, "Mt.call", [3]), 4);
|
||||
|
||||
// linking.wast:169
|
||||
assert_return(() => call($Nt, "call Mt.call", [3]), 4);
|
||||
|
||||
// linking.wast:170
|
||||
assert_return(() => call($Ot, "call", [3]), 4);
|
||||
|
||||
// linking.wast:172
|
||||
assert_return(() => call($Mt, "call", [2]), -4);
|
||||
|
||||
// linking.wast:173
|
||||
assert_return(() => call($Nt, "Mt.call", [2]), -4);
|
||||
|
||||
// linking.wast:174
|
||||
assert_return(() => call($Nt, "call", [2]), 5);
|
||||
|
||||
// linking.wast:175
|
||||
assert_return(() => call($Nt, "call Mt.call", [2]), -4);
|
||||
|
||||
// linking.wast:176
|
||||
assert_return(() => call($Ot, "call", [2]), -4);
|
||||
|
||||
// linking.wast:178
|
||||
assert_return(() => call($Mt, "call", [1]), 6);
|
||||
|
||||
// linking.wast:179
|
||||
assert_return(() => call($Nt, "Mt.call", [1]), 6);
|
||||
|
||||
// linking.wast:180
|
||||
assert_return(() => call($Nt, "call", [1]), 5);
|
||||
|
||||
// linking.wast:181
|
||||
assert_return(() => call($Nt, "call Mt.call", [1]), 6);
|
||||
|
||||
// linking.wast:182
|
||||
assert_return(() => call($Ot, "call", [1]), 6);
|
||||
|
||||
// linking.wast:184
|
||||
assert_trap(() => call($Mt, "call", [0]));
|
||||
|
||||
// linking.wast:185
|
||||
assert_trap(() => call($Nt, "Mt.call", [0]));
|
||||
|
||||
// linking.wast:186
|
||||
assert_return(() => call($Nt, "call", [0]), 5);
|
||||
|
||||
// linking.wast:187
|
||||
assert_trap(() => call($Nt, "call Mt.call", [0]));
|
||||
|
||||
// linking.wast:188
|
||||
assert_trap(() => call($Ot, "call", [0]));
|
||||
|
||||
// linking.wast:190
|
||||
assert_trap(() => call($Ot, "call", [20]));
|
||||
|
||||
// linking.wast:192
|
||||
let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x09\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b");
|
||||
|
||||
// linking.wast:198
|
||||
let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x05\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x67\x03\x00");
|
||||
let $G1 = $10;
|
||||
|
||||
// linking.wast:199
|
||||
register("G1", $G1)
|
||||
|
||||
// linking.wast:200
|
||||
let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x89\x80\x80\x80\x00\x01\x02\x47\x31\x01\x67\x03\x7f\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x23\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x67\x03\x01");
|
||||
let $G2 = $11;
|
||||
|
||||
// linking.wast:204
|
||||
assert_return(() => get($G2, "g"), 5);
|
||||
|
||||
// linking.wast:206
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b");
|
||||
|
||||
// linking.wast:215
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x96\x80\x80\x80\x00\x02\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x02\x4d\x74\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x09\x8d\x80\x80\x80\x00\x02\x00\x41\x07\x0b\x01\x00\x00\x41\x09\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b");
|
||||
|
||||
// linking.wast:225
|
||||
assert_trap(() => call($Mt, "call", [7]));
|
||||
|
||||
// linking.wast:229
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x03\x82\x80\x80\x80\x00\x01\x00\x09\x8d\x80\x80\x80\x00\x02\x00\x41\x07\x0b\x01\x00\x00\x41\x0c\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b");
|
||||
|
||||
// linking.wast:238
|
||||
assert_return(() => call($Mt, "call", [7]), 0);
|
||||
|
||||
// linking.wast:240
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x74\x03\x74\x61\x62\x01\x70\x00\x0a\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x09\x87\x80\x80\x80\x00\x01\x00\x41\x07\x0b\x01\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x41\x00\x0b\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x80\x80\x04\x0b\x01\x64");
|
||||
|
||||
// linking.wast:250
|
||||
assert_return(() => call($Mt, "call", [7]), 0);
|
||||
|
||||
// linking.wast:255
|
||||
let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x05\x07\x8e\x80\x80\x80\x00\x02\x03\x6d\x65\x6d\x02\x00\x04\x6c\x6f\x61\x64\x00\x00\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x90\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x0a\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09");
|
||||
let $Mm = $12;
|
||||
|
||||
// linking.wast:263
|
||||
register("Mm", $Mm)
|
||||
|
||||
// linking.wast:265
|
||||
let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x04\x6c\x6f\x61\x64\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x92\x80\x80\x80\x00\x02\x07\x4d\x6d\x2e\x6c\x6f\x61\x64\x00\x00\x04\x6c\x6f\x61\x64\x00\x01\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8c\x80\x80\x80\x00\x01\x00\x41\x0a\x0b\x06\xf0\xf1\xf2\xf3\xf4\xf5");
|
||||
let $Nm = $13;
|
||||
|
||||
// linking.wast:277
|
||||
assert_return(() => call($Mm, "load", [12]), 2);
|
||||
|
||||
// linking.wast:278
|
||||
assert_return(() => call($Nm, "Mm.load", [12]), 2);
|
||||
|
||||
// linking.wast:279
|
||||
assert_return(() => call($Nm, "load", [12]), 242);
|
||||
|
||||
// linking.wast:281
|
||||
let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x6c\x6f\x61\x64\x00\x00\x0a\x8d\x80\x80\x80\x00\x01\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\x8e\x80\x80\x80\x00\x01\x00\x41\x05\x0b\x08\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7");
|
||||
let $Om = $14;
|
||||
|
||||
// linking.wast:290
|
||||
assert_return(() => call($Mm, "load", [12]), 167);
|
||||
|
||||
// linking.wast:291
|
||||
assert_return(() => call($Nm, "Mm.load", [12]), 167);
|
||||
|
||||
// linking.wast:292
|
||||
assert_return(() => call($Nm, "load", [12]), 242);
|
||||
|
||||
// linking.wast:293
|
||||
assert_return(() => call($Om, "load", [12]), 167);
|
||||
|
||||
// linking.wast:295
|
||||
let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\xff\xff\x03\x0b\x01\x61");
|
||||
|
||||
// linking.wast:300
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x80\x80\x04\x0b\x01\x61");
|
||||
|
||||
// linking.wast:308
|
||||
let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x86\x80\x80\x80\x00\x01\x60\x01\x7f\x01\x7f\x02\x8c\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x01\x01\x08\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x67\x72\x6f\x77\x00\x00\x0a\x8c\x80\x80\x80\x00\x01\x86\x80\x80\x80\x00\x00\x20\x00\x40\x00\x0b");
|
||||
let $Pm = $16;
|
||||
|
||||
// linking.wast:316
|
||||
assert_return(() => call($Pm, "grow", [0]), 1);
|
||||
|
||||
// linking.wast:317
|
||||
assert_return(() => call($Pm, "grow", [2]), 1);
|
||||
|
||||
// linking.wast:318
|
||||
assert_return(() => call($Pm, "grow", [0]), 3);
|
||||
|
||||
// linking.wast:319
|
||||
assert_return(() => call($Pm, "grow", [1]), 3);
|
||||
|
||||
// linking.wast:320
|
||||
assert_return(() => call($Pm, "grow", [1]), 4);
|
||||
|
||||
// linking.wast:321
|
||||
assert_return(() => call($Pm, "grow", [0]), 5);
|
||||
|
||||
// linking.wast:322
|
||||
assert_return(() => call($Pm, "grow", [1]), -1);
|
||||
|
||||
// linking.wast:323
|
||||
assert_return(() => call($Pm, "grow", [0]), 5);
|
||||
|
||||
// linking.wast:325
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\xa7\x80\x80\x80\x00\x03\x08\x73\x70\x65\x63\x74\x65\x73\x74\x05\x70\x72\x69\x6e\x74\x00\x00\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x02\x4d\x6d\x03\x74\x61\x62\x01\x70\x00\x00\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x61\x62\x63");
|
||||
|
||||
// linking.wast:334
|
||||
assert_return(() => call($Mm, "load", [0]), 0);
|
||||
|
||||
// linking.wast:338
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x0b\x91\x80\x80\x80\x00\x02\x00\x41\x00\x0b\x03\x61\x62\x63\x00\x41\x80\x80\x14\x0b\x01\x64");
|
||||
|
||||
// linking.wast:346
|
||||
assert_return(() => call($Mm, "load", [0]), 97);
|
||||
|
||||
// linking.wast:348
|
||||
assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x02\x8b\x80\x80\x80\x00\x01\x02\x4d\x6d\x03\x6d\x65\x6d\x02\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x00\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x00\x0a\x88\x80\x80\x80\x00\x01\x82\x80\x80\x80\x00\x00\x0b\x0b\x89\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x03\x61\x62\x63");
|
||||
|
||||
// linking.wast:358
|
||||
assert_return(() => call($Mm, "load", [0]), 97);
|
||||
|
||||
// linking.wast:361
|
||||
let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x00\x04\x84\x80\x80\x80\x00\x01\x70\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\xb1\x80\x80\x80\x00\x04\x06\x6d\x65\x6d\x6f\x72\x79\x02\x00\x05\x74\x61\x62\x6c\x65\x01\x00\x0d\x67\x65\x74\x20\x6d\x65\x6d\x6f\x72\x79\x5b\x30\x5d\x00\x00\x0c\x67\x65\x74\x20\x74\x61\x62\x6c\x65\x5b\x30\x5d\x00\x01\x0a\x99\x80\x80\x80\x00\x02\x87\x80\x80\x80\x00\x00\x41\x00\x2d\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x41\x00\x11\x00\x00\x0b");
|
||||
let $Ms = $17;
|
||||
|
||||
// linking.wast:372
|
||||
register("Ms", $Ms)
|
||||
|
||||
// linking.wast:374
|
||||
assert_uninstantiable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x01\x7f\x60\x00\x00\x02\x9b\x80\x80\x80\x00\x02\x02\x4d\x73\x06\x6d\x65\x6d\x6f\x72\x79\x02\x00\x01\x02\x4d\x73\x05\x74\x61\x62\x6c\x65\x01\x70\x00\x01\x03\x83\x80\x80\x80\x00\x02\x00\x01\x08\x81\x80\x80\x80\x00\x01\x09\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x00\x0a\x94\x80\x80\x80\x00\x02\x86\x80\x80\x80\x00\x00\x41\xad\xbd\x03\x0b\x83\x80\x80\x80\x00\x00\x00\x0b\x0b\x8b\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x05\x68\x65\x6c\x6c\x6f");
|
||||
|
||||
// linking.wast:391
|
||||
assert_return(() => call($Ms, "get memory[0]", []), 104);
|
||||
|
||||
// linking.wast:392
|
||||
assert_return(() => call($Ms, "get table[0]", []), 57005);
|
5685
test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast
Normal file
5685
test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast
Normal file
File diff suppressed because it is too large
Load Diff
13859
test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js
Normal file
13859
test/mjsunit/wasm/bulk-memory-spec/memory_copy.wast.js
Normal file
File diff suppressed because one or more lines are too long
673
test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast
Normal file
673
test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast
Normal file
@ -0,0 +1,673 @@
|
||||
;;
|
||||
;; Generated by ../meta/generate_memory_fill.js
|
||||
;;
|
||||
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 256))))
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65280) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65280) (i32.const 65536) (i32.const 85))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0xFF00) (i32.const 0x55) (i32.const 257))))
|
||||
(assert_trap (invoke "test") "out of bounds memory access")
|
||||
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0xFFFFFF00) (i32.const 0x55) (i32.const 257))))
|
||||
(assert_trap (invoke "test") "out of bounds memory access")
|
||||
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 0))))
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0x10000) (i32.const 0x55) (i32.const 0))))
|
||||
(invoke "test")
|
||||
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0x1) (i32.const 0xAA) (i32.const 0xFFFE))))
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 1) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 1) (i32.const 65535) (i32.const 170))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65535) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
|
||||
(module
|
||||
(memory 1 1)
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "test")
|
||||
(memory.fill (i32.const 0x12) (i32.const 0x55) (i32.const 10))
|
||||
(memory.fill (i32.const 0x15) (i32.const 0xAA) (i32.const 4))))
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 18) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 18) (i32.const 21) (i32.const 85))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 21) (i32.const 25) (i32.const 170))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 25) (i32.const 28) (i32.const 85))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 28) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_invalid
|
||||
(module
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i32.const 20) (i32.const 30))))
|
||||
"unknown memory 0")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (i64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i32.const 10) (f64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (i64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f32.const 10) (f64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (i64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (i64.const 10) (f64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f32.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f32.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f32.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f32.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (i64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f64.const 20) (i32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f64.const 20) (f32.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f64.const 20) (i64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1 1)
|
||||
(func (export "testfn")
|
||||
(memory.fill (f64.const 10) (f64.const 20) (f64.const 30))))
|
||||
"type mismatch")
|
||||
|
||||
(module
|
||||
(memory 1 1 )
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $val i32) (param $len i32)
|
||||
(memory.fill (local.get $offs) (local.get $val) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65280) (i32.const 37) (i32.const 512))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 65280) (i32.const 65536) (i32.const 37))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65280) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1 )
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $val i32) (param $len i32)
|
||||
(memory.fill (local.get $offs) (local.get $val) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65279) (i32.const 37) (i32.const 514))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 65279) (i32.const 65536) (i32.const 37))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65279) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1 )
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $val i32) (param $len i32)
|
||||
(memory.fill (local.get $offs) (local.get $val) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65279) (i32.const 37) (i32.const 4294967295))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 65279) (i32.const 65536) (i32.const 37))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65279) (i32.const 0))
|
||||
(i32.const -1))
|
440
test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js
Normal file
440
test/mjsunit/wasm/bulk-memory-spec/memory_fill.wast.js
Normal file
@ -0,0 +1,440 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// memory_fill.wast:5
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc1\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8f\x80\x80\x80\x00\x00\x41\x80\xfe\x03\x41\xd5\x00\x41\x80\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:21
|
||||
run(() => call($1, "test", []));
|
||||
|
||||
// memory_fill.wast:23
|
||||
assert_return(() => call($1, "checkRange", [0, 65280, 0]), -1);
|
||||
|
||||
// memory_fill.wast:25
|
||||
assert_return(() => call($1, "checkRange", [65280, 65536, 85]), -1);
|
||||
|
||||
// memory_fill.wast:27
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc1\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8f\x80\x80\x80\x00\x00\x41\x80\xfe\x03\x41\xd5\x00\x41\x81\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:43
|
||||
assert_trap(() => call($2, "test", []));
|
||||
|
||||
// memory_fill.wast:45
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x80\x7e\x41\xd5\x00\x41\x81\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:61
|
||||
assert_trap(() => call($3, "test", []));
|
||||
|
||||
// memory_fill.wast:63
|
||||
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x41\x12\x41\xd5\x00\x41\x00\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:79
|
||||
run(() => call($4, "test", []));
|
||||
|
||||
// memory_fill.wast:81
|
||||
assert_return(() => call($4, "checkRange", [0, 65536, 0]), -1);
|
||||
|
||||
// memory_fill.wast:83
|
||||
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x80\x80\x04\x41\xd5\x00\x41\x00\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:99
|
||||
run(() => call($5, "test", []));
|
||||
|
||||
// memory_fill.wast:101
|
||||
let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc0\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8e\x80\x80\x80\x00\x00\x41\x01\x41\xaa\x01\x41\xfe\xff\x03\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:117
|
||||
run(() => call($6, "test", []));
|
||||
|
||||
// memory_fill.wast:119
|
||||
assert_return(() => call($6, "checkRange", [0, 1, 0]), -1);
|
||||
|
||||
// memory_fill.wast:121
|
||||
assert_return(() => call($6, "checkRange", [1, 65535, 170]), -1);
|
||||
|
||||
// memory_fill.wast:123
|
||||
assert_return(() => call($6, "checkRange", [65535, 65536, 0]), -1);
|
||||
|
||||
// memory_fill.wast:126
|
||||
let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8b\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x00\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x95\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x04\x74\x65\x73\x74\x00\x01\x0a\xc8\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x96\x80\x80\x80\x00\x00\x41\x12\x41\xd5\x00\x41\x0a\xfc\x0b\x00\x41\x15\x41\xaa\x01\x41\x04\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:143
|
||||
run(() => call($7, "test", []));
|
||||
|
||||
// memory_fill.wast:145
|
||||
assert_return(() => call($7, "checkRange", [0, 18, 0]), -1);
|
||||
|
||||
// memory_fill.wast:147
|
||||
assert_return(() => call($7, "checkRange", [18, 21, 85]), -1);
|
||||
|
||||
// memory_fill.wast:149
|
||||
assert_return(() => call($7, "checkRange", [21, 25, 170]), -1);
|
||||
|
||||
// memory_fill.wast:151
|
||||
assert_return(() => call($7, "checkRange", [25, 28, 85]), -1);
|
||||
|
||||
// memory_fill.wast:153
|
||||
assert_return(() => call($7, "checkRange", [28, 65536, 0]), -1);
|
||||
|
||||
// memory_fill.wast:155
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:161
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:168
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:175
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:182
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:189
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:196
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:203
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x41\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:210
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:217
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:224
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:231
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:238
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:245
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:252
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:259
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x41\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:266
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:273
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:280
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:287
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:294
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:301
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:308
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:315
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:322
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:329
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:336
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:343
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:350
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:357
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:364
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:371
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x43\x00\x00\x20\x41\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:378
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:385
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:392
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:399
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:406
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:413
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:420
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:427
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x42\x0a\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:434
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:441
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:448
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:455
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:462
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:469
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:476
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:483
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x42\x0a\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:490
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:497
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:504
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:511
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x41\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:518
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:525
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:532
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:539
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x43\x00\x00\xa0\x41\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:546
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:553
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:560
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:567
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x42\x14\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:574
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x41\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:581
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa2\x80\x80\x80\x00\x01\x9c\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x43\x00\x00\xf0\x41\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:588
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x42\x1e\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:595
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x8a\x80\x80\x80\x00\x01\x06\x74\x65\x73\x74\x66\x6e\x00\x00\x0a\xa6\x80\x80\x80\x00\x01\xa0\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\x24\x40\x44\x00\x00\x00\x00\x00\x00\x34\x40\x44\x00\x00\x00\x00\x00\x00\x3e\x40\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:602
|
||||
let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:619
|
||||
assert_trap(() => call($8, "run", [65280, 37, 512]));
|
||||
|
||||
// memory_fill.wast:622
|
||||
assert_return(() => call($8, "checkRange", [65280, 65536, 37]), -1);
|
||||
|
||||
// memory_fill.wast:624
|
||||
assert_return(() => call($8, "checkRange", [0, 65280, 0]), -1);
|
||||
|
||||
// memory_fill.wast:626
|
||||
let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:643
|
||||
assert_trap(() => call($9, "run", [65279, 37, 514]));
|
||||
|
||||
// memory_fill.wast:646
|
||||
assert_return(() => call($9, "checkRange", [65279, 65536, 37]), -1);
|
||||
|
||||
// memory_fill.wast:648
|
||||
assert_return(() => call($9, "checkRange", [0, 65279, 0]), -1);
|
||||
|
||||
// memory_fill.wast:650
|
||||
let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8e\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x03\x7f\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0a\xbd\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8b\x80\x80\x80\x00\x00\x20\x00\x20\x01\x20\x02\xfc\x0b\x00\x0b");
|
||||
|
||||
// memory_fill.wast:667
|
||||
assert_trap(() => call($10, "run", [65279, 37, -1]));
|
||||
|
||||
// memory_fill.wast:670
|
||||
assert_return(() => call($10, "checkRange", [65279, 65536, 37]), -1);
|
||||
|
||||
// memory_fill.wast:672
|
||||
assert_return(() => call($10, "checkRange", [0, 65279, 0]), -1);
|
947
test/mjsunit/wasm/bulk-memory-spec/memory_init.wast
Normal file
947
test/mjsunit/wasm/bulk-memory-spec/memory_init.wast
Normal file
@ -0,0 +1,947 @@
|
||||
;;
|
||||
;; Generated by ../meta/generate_memory_init.js
|
||||
;;
|
||||
|
||||
(module
|
||||
(memory (export "memory0") 1 1)
|
||||
(data (i32.const 2) "\03\01\04\01")
|
||||
(data passive "\02\07\01\08")
|
||||
(data (i32.const 12) "\07\05\02\03\06")
|
||||
(data passive "\05\09\02\07\06")
|
||||
(func (export "test")
|
||||
(nop))
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0))))
|
||||
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
|
||||
(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
|
||||
(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
|
||||
|
||||
(module
|
||||
(memory (export "memory0") 1 1)
|
||||
(data (i32.const 2) "\03\01\04\01")
|
||||
(data passive "\02\07\01\08")
|
||||
(data (i32.const 12) "\07\05\02\03\06")
|
||||
(data passive "\05\09\02\07\06")
|
||||
(func (export "test")
|
||||
(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4)))
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0))))
|
||||
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
|
||||
(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 6))
|
||||
(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
|
||||
|
||||
(module
|
||||
(memory (export "memory0") 1 1)
|
||||
(data (i32.const 2) "\03\01\04\01")
|
||||
(data passive "\02\07\01\08")
|
||||
(data (i32.const 12) "\07\05\02\03\06")
|
||||
(data passive "\05\09\02\07\06")
|
||||
(func (export "test")
|
||||
(memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3)))
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0))))
|
||||
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
|
||||
(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 5))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 9))
|
||||
(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
|
||||
|
||||
(module
|
||||
(memory (export "memory0") 1 1)
|
||||
(data (i32.const 2) "\03\01\04\01")
|
||||
(data passive "\02\07\01\08")
|
||||
(data (i32.const 12) "\07\05\02\03\06")
|
||||
(data passive "\05\09\02\07\06")
|
||||
(func (export "test")
|
||||
(memory.init 1 (i32.const 7) (i32.const 0) (i32.const 4))
|
||||
(data.drop 1)
|
||||
(memory.init 3 (i32.const 15) (i32.const 1) (i32.const 3))
|
||||
(data.drop 3)
|
||||
(memory.copy (i32.const 20) (i32.const 15) (i32.const 5))
|
||||
(memory.copy (i32.const 21) (i32.const 29) (i32.const 1))
|
||||
(memory.copy (i32.const 24) (i32.const 10) (i32.const 1))
|
||||
(memory.copy (i32.const 13) (i32.const 11) (i32.const 4))
|
||||
(memory.copy (i32.const 19) (i32.const 20) (i32.const 5)))
|
||||
(func (export "load8_u") (param i32) (result i32)
|
||||
(i32.load8_u (local.get 0))))
|
||||
|
||||
(invoke "test")
|
||||
|
||||
(assert_return (invoke "load8_u" (i32.const 0)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 1)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 2)) (i32.const 3))
|
||||
(assert_return (invoke "load8_u" (i32.const 3)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 4)) (i32.const 4))
|
||||
(assert_return (invoke "load8_u" (i32.const 5)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 6)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 7)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 8)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 9)) (i32.const 1))
|
||||
(assert_return (invoke "load8_u" (i32.const 10)) (i32.const 8))
|
||||
(assert_return (invoke "load8_u" (i32.const 11)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 12)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 13)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 14)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 15)) (i32.const 5))
|
||||
(assert_return (invoke "load8_u" (i32.const 16)) (i32.const 2))
|
||||
(assert_return (invoke "load8_u" (i32.const 17)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 18)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 19)) (i32.const 9))
|
||||
(assert_return (invoke "load8_u" (i32.const 20)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 21)) (i32.const 7))
|
||||
(assert_return (invoke "load8_u" (i32.const 22)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 23)) (i32.const 8))
|
||||
(assert_return (invoke "load8_u" (i32.const 24)) (i32.const 8))
|
||||
(assert_return (invoke "load8_u" (i32.const 25)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 26)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 27)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 28)) (i32.const 0))
|
||||
(assert_return (invoke "load8_u" (i32.const 29)) (i32.const 0))
|
||||
(assert_invalid
|
||||
(module
|
||||
(func (export "test")
|
||||
(data.drop 0)))
|
||||
"unknown memory 0")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(data.drop 4)))
|
||||
"unknown data segment")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(data.drop 0)
|
||||
(data.drop 0)))
|
||||
(assert_trap (invoke "test") "data segment dropped")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(data.drop 0)
|
||||
(memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))
|
||||
(assert_trap (invoke "test") "data segment dropped")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data (i32.const 0) "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1234) (i32.const 1) (i32.const 1))))
|
||||
(assert_trap (invoke "test") "data segment dropped")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(func (export "test")
|
||||
(memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))
|
||||
"unknown memory 0")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 1 (i32.const 1234) (i32.const 1) (i32.const 1))))
|
||||
"unknown data segment 1")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))
|
||||
(memory.init 0 (i32.const 1) (i32.const 0) (i32.const 1))))
|
||||
(invoke "test")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1234) (i32.const 0) (i32.const 5))))
|
||||
(assert_trap (invoke "test") "out of bounds")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1234) (i32.const 2) (i32.const 3))))
|
||||
(assert_trap (invoke "test") "out of bounds")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 0xFFFE) (i32.const 1) (i32.const 3))))
|
||||
(assert_trap (invoke "test") "out of bounds")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1234) (i32.const 4) (i32.const 0))))
|
||||
(assert_trap (invoke "test") "out of bounds")
|
||||
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 0x10000) (i32.const 2) (i32.const 0))))
|
||||
(assert_trap (invoke "test") "out of bounds")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (i64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i32.const 1) (f64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (i64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f32.const 1) (f64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (i64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (i64.const 1) (f64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f32.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f32.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f32.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f32.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (i64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f64.const 1) (i32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f64.const 1) (f32.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f64.const 1) (i64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(assert_invalid
|
||||
(module
|
||||
(memory 1)
|
||||
(data passive "\37")
|
||||
(func (export "test")
|
||||
(memory.init 0 (f64.const 1) (f64.const 1) (f64.const 1))))
|
||||
"type mismatch")
|
||||
|
||||
(module
|
||||
(memory 1 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65528) (i32.const 16))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65528) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65528) (i32.const 65536) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65527) (i32.const 16))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65527) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65527) (i32.const 65536) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65472) (i32.const 30))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65472) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65472) (i32.const 65488) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65488) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65473) (i32.const 31))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65473) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65473) (i32.const 65489) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65489) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 65528) (i32.const 4294967040))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 65528) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65528) (i32.const 65536) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 65536) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(module
|
||||
(memory 1 )
|
||||
(data passive "\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42\42")
|
||||
|
||||
(func (export "checkRange") (param $from i32) (param $to i32) (param $expected i32) (result i32)
|
||||
(loop $cont
|
||||
(if (i32.eq (local.get $from) (local.get $to))
|
||||
(then
|
||||
(return (i32.const -1))))
|
||||
(if (i32.eq (i32.load8_u (local.get $from)) (local.get $expected))
|
||||
(then
|
||||
(local.set $from (i32.add (local.get $from) (i32.const 1)))
|
||||
(br $cont))))
|
||||
(return (local.get $from)))
|
||||
|
||||
(func (export "run") (param $offs i32) (param $len i32)
|
||||
(memory.init 0 (local.get $offs) (i32.const 0) (local.get $len))))
|
||||
|
||||
(assert_trap (invoke "run" (i32.const 0) (i32.const 4294967292))
|
||||
"out of bounds")
|
||||
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 0) (i32.const 0))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 0) (i32.const 16) (i32.const 66))
|
||||
(i32.const -1))
|
||||
(assert_return (invoke "checkRange" (i32.const 16) (i32.const 65536) (i32.const 0))
|
||||
(i32.const -1))
|
866
test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js
Normal file
866
test/mjsunit/wasm/bulk-memory-spec/memory_init.wast.js
Normal file
@ -0,0 +1,866 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
let spectest = {
|
||||
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_f32: 666,
|
||||
global_f64: 666,
|
||||
table: new WebAssembly.Table({initial: 10, maximum: 20, element: 'anyfunc'}),
|
||||
memory: new WebAssembly.Memory({initial: 1, maximum: 2})
|
||||
};
|
||||
let handler = {
|
||||
get(target, prop) {
|
||||
return (prop in target) ? target[prop] : {};
|
||||
}
|
||||
};
|
||||
let registry = new Proxy({spectest}, handler);
|
||||
|
||||
function register(name, instance) {
|
||||
registry[name] = instance.exports;
|
||||
}
|
||||
|
||||
function module(bytes, valid = true) {
|
||||
let buffer = new ArrayBuffer(bytes.length);
|
||||
let view = new Uint8Array(buffer);
|
||||
for (let i = 0; i < bytes.length; ++i) {
|
||||
view[i] = bytes.charCodeAt(i);
|
||||
}
|
||||
let validated;
|
||||
try {
|
||||
validated = WebAssembly.validate(buffer);
|
||||
} catch (e) {
|
||||
throw new Error("Wasm validate throws");
|
||||
}
|
||||
if (validated !== valid) {
|
||||
throw new Error("Wasm validate failure" + (valid ? "" : " expected"));
|
||||
}
|
||||
return new WebAssembly.Module(buffer);
|
||||
}
|
||||
|
||||
function instance(bytes, imports = registry) {
|
||||
return new WebAssembly.Instance(module(bytes), imports);
|
||||
}
|
||||
|
||||
function call(instance, name, args) {
|
||||
return instance.exports[name](...args);
|
||||
}
|
||||
|
||||
function get(instance, name) {
|
||||
let v = instance.exports[name];
|
||||
return (v instanceof WebAssembly.Global) ? v.value : v;
|
||||
}
|
||||
|
||||
function exports(name, instance) {
|
||||
return {[name]: instance.exports};
|
||||
}
|
||||
|
||||
function run(action) {
|
||||
action();
|
||||
}
|
||||
|
||||
function assert_malformed(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm decoding failure expected");
|
||||
}
|
||||
|
||||
function assert_invalid(bytes) {
|
||||
try { module(bytes, false) } catch (e) {
|
||||
if (e instanceof WebAssembly.CompileError) return;
|
||||
}
|
||||
throw new Error("Wasm validation failure expected");
|
||||
}
|
||||
|
||||
function assert_unlinkable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.LinkError) return;
|
||||
}
|
||||
throw new Error("Wasm linking failure expected");
|
||||
}
|
||||
|
||||
function assert_uninstantiable(bytes) {
|
||||
let mod = module(bytes);
|
||||
try { new WebAssembly.Instance(mod, registry) } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
function assert_trap(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof WebAssembly.RuntimeError) return;
|
||||
}
|
||||
throw new Error("Wasm trap expected");
|
||||
}
|
||||
|
||||
let StackOverflow;
|
||||
try { (function f() { 1 + f() })() } catch (e) { StackOverflow = e.constructor }
|
||||
|
||||
function assert_exhaustion(action) {
|
||||
try { action() } catch (e) {
|
||||
if (e instanceof StackOverflow) return;
|
||||
}
|
||||
throw new Error("Wasm resource exhaustion expected");
|
||||
}
|
||||
|
||||
function assert_return(action, expected) {
|
||||
let actual = action();
|
||||
if (!Object.is(actual, expected)) {
|
||||
throw new Error("Wasm return value " + expected + " expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_canonical_nan(action) {
|
||||
let actual = action();
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test that it's a canonical NaN.
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
function assert_return_arithmetic_nan(action) {
|
||||
// Note that JS can't reliably distinguish different NaN values,
|
||||
// so there's no good way to test for specific bitpatterns here.
|
||||
let actual = action();
|
||||
if (!Number.isNaN(actual)) {
|
||||
throw new Error("Wasm return value NaN expected, got " + actual);
|
||||
};
|
||||
}
|
||||
|
||||
// memory_init.wast:5
|
||||
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0a\x95\x80\x80\x80\x00\x02\x83\x80\x80\x80\x00\x00\x01\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
|
||||
|
||||
// memory_init.wast:16
|
||||
run(() => call($1, "test", []));
|
||||
|
||||
// memory_init.wast:18
|
||||
assert_return(() => call($1, "load8_u", [0]), 0);
|
||||
|
||||
// memory_init.wast:19
|
||||
assert_return(() => call($1, "load8_u", [1]), 0);
|
||||
|
||||
// memory_init.wast:20
|
||||
assert_return(() => call($1, "load8_u", [2]), 3);
|
||||
|
||||
// memory_init.wast:21
|
||||
assert_return(() => call($1, "load8_u", [3]), 1);
|
||||
|
||||
// memory_init.wast:22
|
||||
assert_return(() => call($1, "load8_u", [4]), 4);
|
||||
|
||||
// memory_init.wast:23
|
||||
assert_return(() => call($1, "load8_u", [5]), 1);
|
||||
|
||||
// memory_init.wast:24
|
||||
assert_return(() => call($1, "load8_u", [6]), 0);
|
||||
|
||||
// memory_init.wast:25
|
||||
assert_return(() => call($1, "load8_u", [7]), 0);
|
||||
|
||||
// memory_init.wast:26
|
||||
assert_return(() => call($1, "load8_u", [8]), 0);
|
||||
|
||||
// memory_init.wast:27
|
||||
assert_return(() => call($1, "load8_u", [9]), 0);
|
||||
|
||||
// memory_init.wast:28
|
||||
assert_return(() => call($1, "load8_u", [10]), 0);
|
||||
|
||||
// memory_init.wast:29
|
||||
assert_return(() => call($1, "load8_u", [11]), 0);
|
||||
|
||||
// memory_init.wast:30
|
||||
assert_return(() => call($1, "load8_u", [12]), 7);
|
||||
|
||||
// memory_init.wast:31
|
||||
assert_return(() => call($1, "load8_u", [13]), 5);
|
||||
|
||||
// memory_init.wast:32
|
||||
assert_return(() => call($1, "load8_u", [14]), 2);
|
||||
|
||||
// memory_init.wast:33
|
||||
assert_return(() => call($1, "load8_u", [15]), 3);
|
||||
|
||||
// memory_init.wast:34
|
||||
assert_return(() => call($1, "load8_u", [16]), 6);
|
||||
|
||||
// memory_init.wast:35
|
||||
assert_return(() => call($1, "load8_u", [17]), 0);
|
||||
|
||||
// memory_init.wast:36
|
||||
assert_return(() => call($1, "load8_u", [18]), 0);
|
||||
|
||||
// memory_init.wast:37
|
||||
assert_return(() => call($1, "load8_u", [19]), 0);
|
||||
|
||||
// memory_init.wast:38
|
||||
assert_return(() => call($1, "load8_u", [20]), 0);
|
||||
|
||||
// memory_init.wast:39
|
||||
assert_return(() => call($1, "load8_u", [21]), 0);
|
||||
|
||||
// memory_init.wast:40
|
||||
assert_return(() => call($1, "load8_u", [22]), 0);
|
||||
|
||||
// memory_init.wast:41
|
||||
assert_return(() => call($1, "load8_u", [23]), 0);
|
||||
|
||||
// memory_init.wast:42
|
||||
assert_return(() => call($1, "load8_u", [24]), 0);
|
||||
|
||||
// memory_init.wast:43
|
||||
assert_return(() => call($1, "load8_u", [25]), 0);
|
||||
|
||||
// memory_init.wast:44
|
||||
assert_return(() => call($1, "load8_u", [26]), 0);
|
||||
|
||||
// memory_init.wast:45
|
||||
assert_return(() => call($1, "load8_u", [27]), 0);
|
||||
|
||||
// memory_init.wast:46
|
||||
assert_return(() => call($1, "load8_u", [28]), 0);
|
||||
|
||||
// memory_init.wast:47
|
||||
assert_return(() => call($1, "load8_u", [29]), 0);
|
||||
|
||||
// memory_init.wast:49
|
||||
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x08\x01\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
|
||||
|
||||
// memory_init.wast:60
|
||||
run(() => call($2, "test", []));
|
||||
|
||||
// memory_init.wast:62
|
||||
assert_return(() => call($2, "load8_u", [0]), 0);
|
||||
|
||||
// memory_init.wast:63
|
||||
assert_return(() => call($2, "load8_u", [1]), 0);
|
||||
|
||||
// memory_init.wast:64
|
||||
assert_return(() => call($2, "load8_u", [2]), 3);
|
||||
|
||||
// memory_init.wast:65
|
||||
assert_return(() => call($2, "load8_u", [3]), 1);
|
||||
|
||||
// memory_init.wast:66
|
||||
assert_return(() => call($2, "load8_u", [4]), 4);
|
||||
|
||||
// memory_init.wast:67
|
||||
assert_return(() => call($2, "load8_u", [5]), 1);
|
||||
|
||||
// memory_init.wast:68
|
||||
assert_return(() => call($2, "load8_u", [6]), 0);
|
||||
|
||||
// memory_init.wast:69
|
||||
assert_return(() => call($2, "load8_u", [7]), 2);
|
||||
|
||||
// memory_init.wast:70
|
||||
assert_return(() => call($2, "load8_u", [8]), 7);
|
||||
|
||||
// memory_init.wast:71
|
||||
assert_return(() => call($2, "load8_u", [9]), 1);
|
||||
|
||||
// memory_init.wast:72
|
||||
assert_return(() => call($2, "load8_u", [10]), 8);
|
||||
|
||||
// memory_init.wast:73
|
||||
assert_return(() => call($2, "load8_u", [11]), 0);
|
||||
|
||||
// memory_init.wast:74
|
||||
assert_return(() => call($2, "load8_u", [12]), 7);
|
||||
|
||||
// memory_init.wast:75
|
||||
assert_return(() => call($2, "load8_u", [13]), 5);
|
||||
|
||||
// memory_init.wast:76
|
||||
assert_return(() => call($2, "load8_u", [14]), 2);
|
||||
|
||||
// memory_init.wast:77
|
||||
assert_return(() => call($2, "load8_u", [15]), 3);
|
||||
|
||||
// memory_init.wast:78
|
||||
assert_return(() => call($2, "load8_u", [16]), 6);
|
||||
|
||||
// memory_init.wast:79
|
||||
assert_return(() => call($2, "load8_u", [17]), 0);
|
||||
|
||||
// memory_init.wast:80
|
||||
assert_return(() => call($2, "load8_u", [18]), 0);
|
||||
|
||||
// memory_init.wast:81
|
||||
assert_return(() => call($2, "load8_u", [19]), 0);
|
||||
|
||||
// memory_init.wast:82
|
||||
assert_return(() => call($2, "load8_u", [20]), 0);
|
||||
|
||||
// memory_init.wast:83
|
||||
assert_return(() => call($2, "load8_u", [21]), 0);
|
||||
|
||||
// memory_init.wast:84
|
||||
assert_return(() => call($2, "load8_u", [22]), 0);
|
||||
|
||||
// memory_init.wast:85
|
||||
assert_return(() => call($2, "load8_u", [23]), 0);
|
||||
|
||||
// memory_init.wast:86
|
||||
assert_return(() => call($2, "load8_u", [24]), 0);
|
||||
|
||||
// memory_init.wast:87
|
||||
assert_return(() => call($2, "load8_u", [25]), 0);
|
||||
|
||||
// memory_init.wast:88
|
||||
assert_return(() => call($2, "load8_u", [26]), 0);
|
||||
|
||||
// memory_init.wast:89
|
||||
assert_return(() => call($2, "load8_u", [27]), 0);
|
||||
|
||||
// memory_init.wast:90
|
||||
assert_return(() => call($2, "load8_u", [28]), 0);
|
||||
|
||||
// memory_init.wast:91
|
||||
assert_return(() => call($2, "load8_u", [29]), 0);
|
||||
|
||||
// memory_init.wast:93
|
||||
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\x9e\x80\x80\x80\x00\x02\x8c\x80\x80\x80\x00\x00\x41\x0f\x41\x01\x41\x03\xfc\x08\x03\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
|
||||
|
||||
// memory_init.wast:104
|
||||
run(() => call($3, "test", []));
|
||||
|
||||
// memory_init.wast:106
|
||||
assert_return(() => call($3, "load8_u", [0]), 0);
|
||||
|
||||
// memory_init.wast:107
|
||||
assert_return(() => call($3, "load8_u", [1]), 0);
|
||||
|
||||
// memory_init.wast:108
|
||||
assert_return(() => call($3, "load8_u", [2]), 3);
|
||||
|
||||
// memory_init.wast:109
|
||||
assert_return(() => call($3, "load8_u", [3]), 1);
|
||||
|
||||
// memory_init.wast:110
|
||||
assert_return(() => call($3, "load8_u", [4]), 4);
|
||||
|
||||
// memory_init.wast:111
|
||||
assert_return(() => call($3, "load8_u", [5]), 1);
|
||||
|
||||
// memory_init.wast:112
|
||||
assert_return(() => call($3, "load8_u", [6]), 0);
|
||||
|
||||
// memory_init.wast:113
|
||||
assert_return(() => call($3, "load8_u", [7]), 0);
|
||||
|
||||
// memory_init.wast:114
|
||||
assert_return(() => call($3, "load8_u", [8]), 0);
|
||||
|
||||
// memory_init.wast:115
|
||||
assert_return(() => call($3, "load8_u", [9]), 0);
|
||||
|
||||
// memory_init.wast:116
|
||||
assert_return(() => call($3, "load8_u", [10]), 0);
|
||||
|
||||
// memory_init.wast:117
|
||||
assert_return(() => call($3, "load8_u", [11]), 0);
|
||||
|
||||
// memory_init.wast:118
|
||||
assert_return(() => call($3, "load8_u", [12]), 7);
|
||||
|
||||
// memory_init.wast:119
|
||||
assert_return(() => call($3, "load8_u", [13]), 5);
|
||||
|
||||
// memory_init.wast:120
|
||||
assert_return(() => call($3, "load8_u", [14]), 2);
|
||||
|
||||
// memory_init.wast:121
|
||||
assert_return(() => call($3, "load8_u", [15]), 9);
|
||||
|
||||
// memory_init.wast:122
|
||||
assert_return(() => call($3, "load8_u", [16]), 2);
|
||||
|
||||
// memory_init.wast:123
|
||||
assert_return(() => call($3, "load8_u", [17]), 7);
|
||||
|
||||
// memory_init.wast:124
|
||||
assert_return(() => call($3, "load8_u", [18]), 0);
|
||||
|
||||
// memory_init.wast:125
|
||||
assert_return(() => call($3, "load8_u", [19]), 0);
|
||||
|
||||
// memory_init.wast:126
|
||||
assert_return(() => call($3, "load8_u", [20]), 0);
|
||||
|
||||
// memory_init.wast:127
|
||||
assert_return(() => call($3, "load8_u", [21]), 0);
|
||||
|
||||
// memory_init.wast:128
|
||||
assert_return(() => call($3, "load8_u", [22]), 0);
|
||||
|
||||
// memory_init.wast:129
|
||||
assert_return(() => call($3, "load8_u", [23]), 0);
|
||||
|
||||
// memory_init.wast:130
|
||||
assert_return(() => call($3, "load8_u", [24]), 0);
|
||||
|
||||
// memory_init.wast:131
|
||||
assert_return(() => call($3, "load8_u", [25]), 0);
|
||||
|
||||
// memory_init.wast:132
|
||||
assert_return(() => call($3, "load8_u", [26]), 0);
|
||||
|
||||
// memory_init.wast:133
|
||||
assert_return(() => call($3, "load8_u", [27]), 0);
|
||||
|
||||
// memory_init.wast:134
|
||||
assert_return(() => call($3, "load8_u", [28]), 0);
|
||||
|
||||
// memory_init.wast:135
|
||||
assert_return(() => call($3, "load8_u", [29]), 0);
|
||||
|
||||
// memory_init.wast:137
|
||||
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x89\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7f\x01\x7f\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x9c\x80\x80\x80\x00\x03\x07\x6d\x65\x6d\x6f\x72\x79\x30\x02\x00\x04\x74\x65\x73\x74\x00\x00\x07\x6c\x6f\x61\x64\x38\x5f\x75\x00\x01\x0c\x81\x80\x80\x80\x00\x04\x0a\xe0\x80\x80\x80\x00\x02\xce\x80\x80\x80\x00\x00\x41\x07\x41\x00\x41\x04\xfc\x08\x01\x00\xfc\x09\x01\x41\x0f\x41\x01\x41\x03\xfc\x08\x03\x00\xfc\x09\x03\x41\x14\x41\x0f\x41\x05\xfc\x0a\x00\x00\x41\x15\x41\x1d\x41\x01\xfc\x0a\x00\x00\x41\x18\x41\x0a\x41\x01\xfc\x0a\x00\x00\x41\x0d\x41\x0b\x41\x04\xfc\x0a\x00\x00\x41\x13\x41\x14\x41\x05\xfc\x0a\x00\x00\x0b\x87\x80\x80\x80\x00\x00\x20\x00\x2d\x00\x00\x0b\x0b\xa1\x80\x80\x80\x00\x04\x00\x41\x02\x0b\x04\x03\x01\x04\x01\x01\x04\x02\x07\x01\x08\x00\x41\x0c\x0b\x05\x07\x05\x02\x03\x06\x01\x05\x05\x09\x02\x07\x06");
|
||||
|
||||
// memory_init.wast:156
|
||||
run(() => call($4, "test", []));
|
||||
|
||||
// memory_init.wast:158
|
||||
assert_return(() => call($4, "load8_u", [0]), 0);
|
||||
|
||||
// memory_init.wast:159
|
||||
assert_return(() => call($4, "load8_u", [1]), 0);
|
||||
|
||||
// memory_init.wast:160
|
||||
assert_return(() => call($4, "load8_u", [2]), 3);
|
||||
|
||||
// memory_init.wast:161
|
||||
assert_return(() => call($4, "load8_u", [3]), 1);
|
||||
|
||||
// memory_init.wast:162
|
||||
assert_return(() => call($4, "load8_u", [4]), 4);
|
||||
|
||||
// memory_init.wast:163
|
||||
assert_return(() => call($4, "load8_u", [5]), 1);
|
||||
|
||||
// memory_init.wast:164
|
||||
assert_return(() => call($4, "load8_u", [6]), 0);
|
||||
|
||||
// memory_init.wast:165
|
||||
assert_return(() => call($4, "load8_u", [7]), 2);
|
||||
|
||||
// memory_init.wast:166
|
||||
assert_return(() => call($4, "load8_u", [8]), 7);
|
||||
|
||||
// memory_init.wast:167
|
||||
assert_return(() => call($4, "load8_u", [9]), 1);
|
||||
|
||||
// memory_init.wast:168
|
||||
assert_return(() => call($4, "load8_u", [10]), 8);
|
||||
|
||||
// memory_init.wast:169
|
||||
assert_return(() => call($4, "load8_u", [11]), 0);
|
||||
|
||||
// memory_init.wast:170
|
||||
assert_return(() => call($4, "load8_u", [12]), 7);
|
||||
|
||||
// memory_init.wast:171
|
||||
assert_return(() => call($4, "load8_u", [13]), 0);
|
||||
|
||||
// memory_init.wast:172
|
||||
assert_return(() => call($4, "load8_u", [14]), 7);
|
||||
|
||||
// memory_init.wast:173
|
||||
assert_return(() => call($4, "load8_u", [15]), 5);
|
||||
|
||||
// memory_init.wast:174
|
||||
assert_return(() => call($4, "load8_u", [16]), 2);
|
||||
|
||||
// memory_init.wast:175
|
||||
assert_return(() => call($4, "load8_u", [17]), 7);
|
||||
|
||||
// memory_init.wast:176
|
||||
assert_return(() => call($4, "load8_u", [18]), 0);
|
||||
|
||||
// memory_init.wast:177
|
||||
assert_return(() => call($4, "load8_u", [19]), 9);
|
||||
|
||||
// memory_init.wast:178
|
||||
assert_return(() => call($4, "load8_u", [20]), 0);
|
||||
|
||||
// memory_init.wast:179
|
||||
assert_return(() => call($4, "load8_u", [21]), 7);
|
||||
|
||||
// memory_init.wast:180
|
||||
assert_return(() => call($4, "load8_u", [22]), 0);
|
||||
|
||||
// memory_init.wast:181
|
||||
assert_return(() => call($4, "load8_u", [23]), 8);
|
||||
|
||||
// memory_init.wast:182
|
||||
assert_return(() => call($4, "load8_u", [24]), 8);
|
||||
|
||||
// memory_init.wast:183
|
||||
assert_return(() => call($4, "load8_u", [25]), 0);
|
||||
|
||||
// memory_init.wast:184
|
||||
assert_return(() => call($4, "load8_u", [26]), 0);
|
||||
|
||||
// memory_init.wast:185
|
||||
assert_return(() => call($4, "load8_u", [27]), 0);
|
||||
|
||||
// memory_init.wast:186
|
||||
assert_return(() => call($4, "load8_u", [28]), 0);
|
||||
|
||||
// memory_init.wast:187
|
||||
assert_return(() => call($4, "load8_u", [29]), 0);
|
||||
|
||||
// memory_init.wast:188
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x00\x0a\x8b\x80\x80\x80\x00\x01\x85\x80\x80\x80\x00\x00\xfc\x09\x00\x0b");
|
||||
|
||||
// memory_init.wast:194
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x8b\x80\x80\x80\x00\x01\x85\x80\x80\x80\x00\x00\xfc\x09\x04\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:202
|
||||
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x8e\x80\x80\x80\x00\x01\x88\x80\x80\x80\x00\x00\xfc\x09\x00\xfc\x09\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:208
|
||||
assert_trap(() => call($5, "test", []));
|
||||
|
||||
// memory_init.wast:210
|
||||
let $6 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x96\x80\x80\x80\x00\x01\x90\x80\x80\x80\x00\x00\xfc\x09\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:216
|
||||
assert_trap(() => call($6, "test", []));
|
||||
|
||||
// memory_init.wast:218
|
||||
let $7 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x87\x80\x80\x80\x00\x01\x00\x41\x00\x0b\x01\x37");
|
||||
|
||||
// memory_init.wast:223
|
||||
assert_trap(() => call($7, "test", []));
|
||||
|
||||
// memory_init.wast:225
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x00\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x01\x00\x0b");
|
||||
|
||||
// memory_init.wast:231
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x01\x41\x01\xfc\x08\x01\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:239
|
||||
let $8 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x41\x00\x41\x01\xfc\x08\x00\x00\x41\x01\x41\x00\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:245
|
||||
run(() => call($8, "test", []));
|
||||
|
||||
// memory_init.wast:247
|
||||
let $9 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x00\x41\x05\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:252
|
||||
assert_trap(() => call($9, "test", []));
|
||||
|
||||
// memory_init.wast:254
|
||||
let $10 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x02\x41\x03\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:259
|
||||
assert_trap(() => call($10, "test", []));
|
||||
|
||||
// memory_init.wast:261
|
||||
let $11 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\xfe\xff\x03\x41\x01\x41\x03\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:266
|
||||
assert_trap(() => call($11, "test", []));
|
||||
|
||||
// memory_init.wast:268
|
||||
let $12 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x93\x80\x80\x80\x00\x01\x8d\x80\x80\x80\x00\x00\x41\xd2\x09\x41\x04\x41\x00\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:273
|
||||
assert_trap(() => call($12, "test", []));
|
||||
|
||||
// memory_init.wast:275
|
||||
let $13 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x41\x80\x80\x04\x41\x02\x41\x00\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:280
|
||||
assert_trap(() => call($13, "test", []));
|
||||
|
||||
// memory_init.wast:282
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:290
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:298
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:306
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:314
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:322
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:330
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:338
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:346
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x41\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:354
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x41\x01\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:362
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:370
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:378
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:386
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:394
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:402
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:410
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:418
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:426
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:434
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:442
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9b\x80\x80\x80\x00\x01\x95\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:450
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:458
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:466
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:474
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:482
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:490
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:498
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:506
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:514
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:522
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:530
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:538
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:546
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:554
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:562
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:570
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:578
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:586
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x01\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:594
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:602
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x95\x80\x80\x80\x00\x01\x8f\x80\x80\x80\x00\x00\x42\x01\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:610
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x92\x80\x80\x80\x00\x01\x8c\x80\x80\x80\x00\x00\x42\x01\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:618
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:626
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:634
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:642
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:650
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:658
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:666
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:674
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:682
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:690
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:698
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9f\x80\x80\x80\x00\x01\x99\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:706
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:714
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:722
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:730
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x9c\x80\x80\x80\x00\x01\x96\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:738
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\x99\x80\x80\x80\x00\x01\x93\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:746
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:754
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x41\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:762
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa3\x80\x80\x80\x00\x01\x9d\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x43\x00\x00\x80\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:770
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa0\x80\x80\x80\x00\x01\x9a\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x42\x01\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:778
|
||||
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x84\x80\x80\x80\x00\x01\x60\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x88\x80\x80\x80\x00\x01\x04\x74\x65\x73\x74\x00\x00\x0c\x81\x80\x80\x80\x00\x01\x0a\xa7\x80\x80\x80\x00\x01\xa1\x80\x80\x80\x00\x00\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\x44\x00\x00\x00\x00\x00\x00\xf0\x3f\xfc\x08\x00\x00\x0b\x0b\x84\x80\x80\x80\x00\x01\x01\x01\x37");
|
||||
|
||||
// memory_init.wast:786
|
||||
let $14 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:804
|
||||
assert_trap(() => call($14, "run", [65528, 16]));
|
||||
|
||||
// memory_init.wast:807
|
||||
assert_return(() => call($14, "checkRange", [0, 65528, 0]), -1);
|
||||
|
||||
// memory_init.wast:809
|
||||
assert_return(() => call($14, "checkRange", [65528, 65536, 66]), -1);
|
||||
|
||||
// memory_init.wast:811
|
||||
assert_return(() => call($14, "checkRange", [65536, 65536, 0]), -1);
|
||||
|
||||
// memory_init.wast:813
|
||||
let $15 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:831
|
||||
assert_trap(() => call($15, "run", [65527, 16]));
|
||||
|
||||
// memory_init.wast:834
|
||||
assert_return(() => call($15, "checkRange", [0, 65527, 0]), -1);
|
||||
|
||||
// memory_init.wast:836
|
||||
assert_return(() => call($15, "checkRange", [65527, 65536, 66]), -1);
|
||||
|
||||
// memory_init.wast:838
|
||||
assert_return(() => call($15, "checkRange", [65536, 65536, 0]), -1);
|
||||
|
||||
// memory_init.wast:840
|
||||
let $16 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:858
|
||||
assert_trap(() => call($16, "run", [65472, 30]));
|
||||
|
||||
// memory_init.wast:861
|
||||
assert_return(() => call($16, "checkRange", [0, 65472, 0]), -1);
|
||||
|
||||
// memory_init.wast:863
|
||||
assert_return(() => call($16, "checkRange", [65472, 65488, 66]), -1);
|
||||
|
||||
// memory_init.wast:865
|
||||
assert_return(() => call($16, "checkRange", [65488, 65536, 0]), -1);
|
||||
|
||||
// memory_init.wast:867
|
||||
let $17 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x84\x80\x80\x80\x00\x01\x01\x01\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:885
|
||||
assert_trap(() => call($17, "run", [65473, 31]));
|
||||
|
||||
// memory_init.wast:888
|
||||
assert_return(() => call($17, "checkRange", [0, 65473, 0]), -1);
|
||||
|
||||
// memory_init.wast:890
|
||||
assert_return(() => call($17, "checkRange", [65473, 65489, 66]), -1);
|
||||
|
||||
// memory_init.wast:892
|
||||
assert_return(() => call($17, "checkRange", [65489, 65536, 0]), -1);
|
||||
|
||||
// memory_init.wast:894
|
||||
let $18 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:912
|
||||
assert_trap(() => call($18, "run", [65528, -256]));
|
||||
|
||||
// memory_init.wast:915
|
||||
assert_return(() => call($18, "checkRange", [0, 65528, 0]), -1);
|
||||
|
||||
// memory_init.wast:917
|
||||
assert_return(() => call($18, "checkRange", [65528, 65536, 66]), -1);
|
||||
|
||||
// memory_init.wast:919
|
||||
assert_return(() => call($18, "checkRange", [65536, 65536, 0]), -1);
|
||||
|
||||
// memory_init.wast:921
|
||||
let $19 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x8d\x80\x80\x80\x00\x02\x60\x03\x7f\x7f\x7f\x01\x7f\x60\x02\x7f\x7f\x00\x03\x83\x80\x80\x80\x00\x02\x00\x01\x05\x83\x80\x80\x80\x00\x01\x00\x01\x07\x94\x80\x80\x80\x00\x02\x0a\x63\x68\x65\x63\x6b\x52\x61\x6e\x67\x65\x00\x00\x03\x72\x75\x6e\x00\x01\x0c\x81\x80\x80\x80\x00\x01\x0a\xbe\x80\x80\x80\x00\x02\xa7\x80\x80\x80\x00\x00\x03\x40\x20\x00\x20\x01\x46\x04\x40\x41\x7f\x0f\x0b\x20\x00\x2d\x00\x00\x20\x02\x46\x04\x40\x20\x00\x41\x01\x6a\x21\x00\x0c\x01\x0b\x0b\x20\x00\x0f\x0b\x8c\x80\x80\x80\x00\x00\x20\x00\x41\x00\x20\x01\xfc\x08\x00\x00\x0b\x0b\x93\x80\x80\x80\x00\x01\x01\x10\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42\x42");
|
||||
|
||||
// memory_init.wast:939
|
||||
assert_trap(() => call($19, "run", [0, -4]));
|
||||
|
||||
// memory_init.wast:942
|
||||
assert_return(() => call($19, "checkRange", [0, 0, 0]), -1);
|
||||
|
||||
// memory_init.wast:944
|
||||
assert_return(() => call($19, "checkRange", [0, 16, 66]), -1);
|
||||
|
||||
// memory_init.wast:946
|
||||
assert_return(() => call($19, "checkRange", [16, 65536, 0]), -1);
|
1469
test/mjsunit/wasm/bulk-memory-spec/table_copy.wast
Normal file
1469
test/mjsunit/wasm/bulk-memory-spec/table_copy.wast
Normal file
File diff suppressed because it is too large
Load Diff
2651
test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js
Normal file
2651
test/mjsunit/wasm/bulk-memory-spec/table_copy.wast.js
Normal file
File diff suppressed because it is too large
Load Diff
1602
test/mjsunit/wasm/bulk-memory-spec/table_init.wast
Normal file
1602
test/mjsunit/wasm/bulk-memory-spec/table_init.wast
Normal file
File diff suppressed because it is too large
Load Diff
2096
test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js
Normal file
2096
test/mjsunit/wasm/bulk-memory-spec/table_init.wast.js
Normal file
File diff suppressed because it is too large
Load Diff
@ -476,7 +476,10 @@ class SourceProcessor(SourceFileProcessor):
|
||||
'zlib.js']
|
||||
IGNORE_TABS = IGNORE_COPYRIGHTS + ['unicode-test.js', 'html-comments.js']
|
||||
|
||||
IGNORE_COPYRIGHTS_DIRECTORY = "test/test262/local-tests"
|
||||
IGNORE_COPYRIGHTS_DIRECTORIES = [
|
||||
"test/test262/local-tests",
|
||||
"test/mjsunit/wasm/bulk-memory-spec",
|
||||
]
|
||||
|
||||
def EndOfDeclaration(self, line):
|
||||
return line == "}" or line == "};"
|
||||
@ -494,7 +497,8 @@ class SourceProcessor(SourceFileProcessor):
|
||||
print("%s contains tabs" % name)
|
||||
result = False
|
||||
if not base in SourceProcessor.IGNORE_COPYRIGHTS and \
|
||||
not SourceProcessor.IGNORE_COPYRIGHTS_DIRECTORY in name:
|
||||
not any(ignore_dir in name for ignore_dir
|
||||
in SourceProcessor.IGNORE_COPYRIGHTS_DIRECTORIES):
|
||||
if not COPYRIGHT_HEADER_PATTERN.search(contents):
|
||||
print("%s is missing a correct copyright header." % name)
|
||||
result = False
|
||||
|
Loading…
Reference in New Issue
Block a user