Bug 1464656 - Enable WebAssembly.Global by default. r=lth.

WebAssembly.Global is currently nightly- and early-beta-only, gated by
ENABLE_WASM_GLOBAL and EARLY_BETA_OR_EARLIER respectively.  This bug is to
enable it by default.

* js/src/moz.build:
  js/src/shell/moz.build:
  js/src/jsapi-tests/moz.build:
  Don't define ENABLE_WASM_GLOBAL.

* js/src/wasm/WasmJS.cpp:
  js/src/wasm/WasmModule.cpp:
  js/src/wasm/WasmValidate.cpp:
  Un-guard code guarded by
    #if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
  and remove code guarded by its negation.  Inside js/src, the two symbols
  are only ever used together, so there's no need to consider them separately.

* js/src/jit-test/tests/wasm/globals.js:
  js/src/jit-test/tests/wasm/spec/harness/index.js:
  Remove code guarded by (typeof WebAssembly.Global === "undefined") and
  un-guard code guarded by (typeof WebAssembly.Global === "function")

* js/src/jit-test/tests/wasm/spec/globals.wast.js:
  js/src/jit-test/tests/wasm/spec/linking.wast.js:
  Make these be the same as spec/proposal_mutable_global/globals.wast.js
  and spec/proposal_mutable_global/linking.wast.js respectively.

* js/src/jit-test/tests/wasm/spec/proposal_mutable_global/globals.wast.js:
  js/src/jit-test/tests/wasm/spec/proposal_mutable_global/linking.wast.js:
  js/src/jit-test/tests/wasm/spec/proposal_mutable_global/directives.txt:
  js/src/jit-test/tests/wasm/spec/proposal_mutable_global (directory):
  Deleted.

--HG--
extra : rebase_source : 72e56b59a5162a2e131596c41ec33f527845ae6d
This commit is contained in:
Julian Seward 2018-05-28 14:51:04 +02:00
parent 71b06db428
commit 415953e00b
13 changed files with 221 additions and 718 deletions

View File

@ -106,14 +106,6 @@ module = wasmEvalText(`(module
}).exports;
assertEq(module.f, module.tbl.get(1));
// Import/export rules.
if (typeof WebAssembly.Global === "undefined") {
wasmFailValidateText(`(module (import "globals" "x" (global (mut i32))))`,
/can't import.* mutable globals in the MVP/);
wasmFailValidateText(`(module (global (mut i32) (i32.const 42)) (export "" global 0))`,
/can't .*export mutable globals in the MVP/);
}
// Import/export semantics.
module = wasmEvalText(`(module
(import $g "globals" "x" (global i32))
@ -123,12 +115,9 @@ module = wasmEvalText(`(module
)`, { globals: {x: 42} }).exports;
assertEq(module.getter(), 42);
// Adapt to ongoing experiment with WebAssembly.Global.
// assertEq() will not trigger @@toPrimitive, so we must have a cast here.
if (typeof WebAssembly.Global === "function")
assertEq(Number(module.value), 42);
else
assertEq(module.value, 42);
assertEq(Number(module.value), 42);
// Can only import numbers (no implicit coercions).
module = new Module(wasmTextToBinary(`(module
@ -183,14 +172,8 @@ module = wasmEvalText(`(module
(export "defined" global 1)
)`, { globals: {x: 42} }).exports;
// See comment earlier about WebAssembly.Global
if (typeof WebAssembly.Global === "function") {
assertEq(Number(module.imported), 42);
assertEq(Number(module.defined), 1337);
} else {
assertEq(module.imported, 42);
assertEq(module.defined, 1337);
}
assertEq(Number(module.imported), 42);
assertEq(Number(module.defined), 1337);
// Initializer expressions can reference an imported immutable global.
wasmFailValidateText(`(module (global f32 (f32.const 13.37)) (global i32 (get_global 0)))`, /must reference a global immutable import/);
@ -227,20 +210,12 @@ function testInitExpr(type, initialValue, nextValue, coercion, assertFunc = asse
assertFunc(module.get0(), coercion(initialValue));
assertFunc(module.get1(), coercion(initialValue));
// See comment earlier about WebAssembly.Global
if (typeof WebAssembly.Global === "function")
assertFunc(Number(module.global_imm), coercion(initialValue));
else
assertFunc(module.global_imm, coercion(initialValue));
assertFunc(Number(module.global_imm), coercion(initialValue));
assertEq(module.set1(coercion(nextValue)), undefined);
assertFunc(module.get1(), coercion(nextValue));
assertFunc(module.get0(), coercion(initialValue));
// See comment earlier about WebAssembly.Global
if (typeof WebAssembly.Global === "function")
assertFunc(Number(module.global_imm), coercion(initialValue));
else
assertFunc(module.global_imm, coercion(initialValue));
assertFunc(Number(module.global_imm), coercion(initialValue));
assertFunc(module.get_cst(), coercion(initialValue));
}
@ -267,18 +242,7 @@ assertErrorMessage(() => wasmEvalText(`(module
LinkError,
/cannot pass i64 to or from JS/);
if (typeof WebAssembly.Global === "undefined") {
// Cannot export int64 at all.
assertErrorMessage(() => wasmEvalText(`(module
(global i64 (i64.const 42))
(export "" global 0))`),
LinkError,
/cannot pass i64 to or from JS/);
} else {
{
// We can import and export i64 globals as cells. They cannot be created
// from JS because there's no way to specify a non-zero initial value; that
// restriction is tested later. But we can export one from a module and
@ -343,10 +307,8 @@ wasmAssert(`(module
assertEq(dv.getUint32(0, true), 0x7fc00000);
}
// WebAssembly.Global experiment
if (typeof WebAssembly.Global === "function") {
// WebAssembly.Global
{
const Global = WebAssembly.Global;
// These types should work:

View File

@ -53,49 +53,56 @@ run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x0
// globals.wast:49
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\x06\x89\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x00\x00\x0b\x0a\x8c\x80\x80\x80\x00\x01\x86\x80\x80\x80\x00\x00\x41\x01\x24\x00\x0b");
if (typeof WebAssembly.Global === "undefined") {
// globals.wast:54
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x88\x80\x80\x80\x00\x01\x01\x6d\x01\x61\x03\x7f\x01");
// globals.wast:55
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
// globals.wast:59
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x88\x80\x80\x80\x00\x01\x01\x6d\x01\x61\x03\x7f\x01");
// globals.wast:56
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
// globals.wast:64
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
// globals.wast:69
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
}
// globals.wast:74
// globals.wast:58
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8a\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x00\x00\x8c\x0b");
// globals.wast:79
// globals.wast:63
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7d\x00\x20\x00\x0b");
// globals.wast:84
// globals.wast:68
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8a\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x80\x3f\x8c\x0b");
// globals.wast:73
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x87\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x01\x0b");
// globals.wast:78
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x85\x80\x80\x80\x00\x01\x7f\x00\x01\x0b");
// globals.wast:83
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7f\x00\x43\x00\x00\x00\x00\x0b");
// globals.wast:89
// globals.wast:88
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x88\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x41\x00\x0b");
// globals.wast:93
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x84\x80\x80\x80\x00\x01\x7f\x00\x0b");
// globals.wast:98
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x23\x00\x0b");
// globals.wast:94
// globals.wast:103
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8b\x80\x80\x80\x00\x02\x7f\x00\x23\x01\x0b\x7f\x00\x41\x00\x0b");
// globals.wast:99
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x06\x67\x6c\x6f\x62\x61\x6c\x03\x7f\x00");
// globals.wast:108
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x98\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\x00");
// globals.wast:102
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x06\x67\x6c\x6f\x62\x61\x6c\x03\x7f\x02");
// globals.wast:111
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\x02");
// globals.wast:115
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x06\x67\x6c\x6f\x62\x61\x6c\x03\x7f\xff");
// globals.wast:124
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\xff");
// globals.wast:129
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x0b");
// globals.wast:138
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x0b");
// globals.wast:132
// globals.wast:141
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x02\x41\x00\x0b");
// globals.wast:144
// globals.wast:153
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\xff\x41\x00\x0b");

View File

@ -224,16 +224,11 @@ function get(instance, name) {
if (instance.isError())
return instance;
// Experimental API change. We try to export WebAssembly.Global instances,
// not primitive values. In that case the Number() cast is necessary here
// to convert the Global to a value: the harness examines types carefully
// and will not trigger the @@toPrimitive hook on Global, unlike most user
// code.
if (typeof WebAssembly.Global === "function")
return ValueResult(Number(instance.value.exports[name]));
return ValueResult(instance.value.exports[name]);
// We export WebAssembly.Global instances, not primitive values. The
// Number() cast is necessary to convert the Global to a value: the
// harness examines types carefully and will not trigger the
// @@toPrimitive hook on Global, unlike most user code.
return ValueResult(Number(instance.value.exports[name]));
}
function exports(name, instance) {

View File

@ -23,7 +23,7 @@ assert_return(() => call($Nf, "call", []), 3);
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\x92\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x05\x70\x72\x69\x6e\x74\x00\x00\x07\x89\x80\x80\x80\x00\x01\x05\x70\x72\x69\x6e\x74\x00\x00");
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)
@ -35,271 +35,318 @@ assert_unlinkable("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\
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\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x03\x82\x80\x80\x80\x00\x01\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x2a\x0b\x07\x8e\x80\x80\x80\x00\x02\x04\x67\x6c\x6f\x62\x03\x00\x03\x67\x65\x74\x00\x00\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x23\x00\x0b");
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:43
// linking.wast:48
register("Mg", $Mg)
// linking.wast:45
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x85\x80\x80\x80\x00\x01\x60\x00\x01\x7f\x02\x95\x80\x80\x80\x00\x02\x02\x4d\x67\x04\x67\x6c\x6f\x62\x03\x7f\x00\x02\x4d\x67\x03\x67\x65\x74\x00\x00\x03\x82\x80\x80\x80\x00\x01\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x2b\x0b\x07\xa1\x80\x80\x80\x00\x04\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\x01\x03\x67\x65\x74\x00\x01\x0a\x8a\x80\x80\x80\x00\x01\x84\x80\x80\x80\x00\x00\x23\x01\x0b");
// 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:54
// linking.wast:67
assert_return(() => get($Mg, "glob"), 42);
// linking.wast:55
// linking.wast:68
assert_return(() => get($Ng, "Mg.glob"), 42);
// linking.wast:56
// linking.wast:69
assert_return(() => get($Ng, "glob"), 43);
// linking.wast:57
// linking.wast:70
assert_return(() => call($Mg, "get", []), 42);
// linking.wast:58
// linking.wast:71
assert_return(() => call($Ng, "Mg.get", []), 42);
// linking.wast:59
// linking.wast:72
assert_return(() => call($Ng, "get", []), 43);
// linking.wast:64
// 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:77
// linking.wast:110
register("Mt", $Mt)
// linking.wast:79
// 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:98
// linking.wast:131
assert_return(() => call($Mt, "call", [2]), 4);
// linking.wast:99
// linking.wast:132
assert_return(() => call($Nt, "Mt.call", [2]), 4);
// linking.wast:100
// linking.wast:133
assert_return(() => call($Nt, "call", [2]), 5);
// linking.wast:101
// linking.wast:134
assert_return(() => call($Nt, "call Mt.call", [2]), 4);
// linking.wast:103
// linking.wast:136
assert_trap(() => call($Mt, "call", [1]));
// linking.wast:104
// linking.wast:137
assert_trap(() => call($Nt, "Mt.call", [1]));
// linking.wast:105
// linking.wast:138
assert_return(() => call($Nt, "call", [1]), 5);
// linking.wast:106
// linking.wast:139
assert_trap(() => call($Nt, "call Mt.call", [1]));
// linking.wast:108
// linking.wast:141
assert_trap(() => call($Mt, "call", [0]));
// linking.wast:109
// linking.wast:142
assert_trap(() => call($Nt, "Mt.call", [0]));
// linking.wast:110
// linking.wast:143
assert_return(() => call($Nt, "call", [0]), 5);
// linking.wast:111
// linking.wast:144
assert_trap(() => call($Nt, "call Mt.call", [0]));
// linking.wast:113
// linking.wast:146
assert_trap(() => call($Mt, "call", [20]));
// linking.wast:114
// linking.wast:147
assert_trap(() => call($Nt, "Mt.call", [20]));
// linking.wast:115
// linking.wast:148
assert_trap(() => call($Nt, "call", [7]));
// linking.wast:116
// linking.wast:149
assert_trap(() => call($Nt, "call Mt.call", [20]));
// linking.wast:118
// linking.wast:151
assert_return(() => call($Nt, "call", [3]), -4);
// linking.wast:119
// linking.wast:152
assert_trap(() => call($Nt, "call", [4]));
// linking.wast:121
// 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:134
// linking.wast:167
assert_return(() => call($Mt, "call", [3]), 4);
// linking.wast:135
// linking.wast:168
assert_return(() => call($Nt, "Mt.call", [3]), 4);
// linking.wast:136
// linking.wast:169
assert_return(() => call($Nt, "call Mt.call", [3]), 4);
// linking.wast:137
// linking.wast:170
assert_return(() => call($Ot, "call", [3]), 4);
// linking.wast:139
// linking.wast:172
assert_return(() => call($Mt, "call", [2]), -4);
// linking.wast:140
// linking.wast:173
assert_return(() => call($Nt, "Mt.call", [2]), -4);
// linking.wast:141
// linking.wast:174
assert_return(() => call($Nt, "call", [2]), 5);
// linking.wast:142
// linking.wast:175
assert_return(() => call($Nt, "call Mt.call", [2]), -4);
// linking.wast:143
// linking.wast:176
assert_return(() => call($Ot, "call", [2]), -4);
// linking.wast:145
// linking.wast:178
assert_return(() => call($Mt, "call", [1]), 6);
// linking.wast:146
// linking.wast:179
assert_return(() => call($Nt, "Mt.call", [1]), 6);
// linking.wast:147
// linking.wast:180
assert_return(() => call($Nt, "call", [1]), 5);
// linking.wast:148
// linking.wast:181
assert_return(() => call($Nt, "call Mt.call", [1]), 6);
// linking.wast:149
// linking.wast:182
assert_return(() => call($Ot, "call", [1]), 6);
// linking.wast:151
// linking.wast:184
assert_trap(() => call($Mt, "call", [0]));
// linking.wast:152
// linking.wast:185
assert_trap(() => call($Nt, "Mt.call", [0]));
// linking.wast:153
// linking.wast:186
assert_return(() => call($Nt, "call", [0]), 5);
// linking.wast:154
// linking.wast:187
assert_trap(() => call($Nt, "call Mt.call", [0]));
// linking.wast:155
// linking.wast:188
assert_trap(() => call($Ot, "call", [0]));
// linking.wast:157
// linking.wast:190
assert_trap(() => call($Ot, "call", [20]));
// linking.wast:159
// 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:165
// 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:174
// 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:184
// linking.wast:225
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:186
// linking.wast:227
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:195
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:197
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:207
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:212
let $10 = 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 = $10;
// linking.wast:220
register("Mm", $Mm)
// linking.wast:222
let $11 = 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 = $11;
// linking.wast:234
assert_return(() => call($Mm, "load", [12]), 2);
// linking.wast:235
assert_return(() => call($Nm, "Mm.load", [12]), 2);
// linking.wast:236
assert_return(() => call($Nm, "load", [12]), 242);
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:238
let $12 = 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 = $12;
// linking.wast:247
assert_return(() => call($Mm, "load", [12]), 167);
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:248
assert_return(() => call($Nm, "Mm.load", [12]), 167);
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:249
assert_return(() => call($Nm, "load", [12]), 242);
// linking.wast:253
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:250
assert_return(() => call($Om, "load", [12]), 167);
// linking.wast:261
register("Mm", $Mm)
// linking.wast:252
let $13 = 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:257
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:265
let $14 = 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 = $14;
// linking.wast:273
assert_return(() => call($Pm, "grow", [0]), 1);
// linking.wast:274
assert_return(() => call($Pm, "grow", [2]), 1);
// linking.wast:263
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:275
assert_return(() => call($Pm, "grow", [0]), 3);
assert_return(() => call($Mm, "load", [12]), 2);
// linking.wast:276
assert_return(() => call($Pm, "grow", [1]), 3);
assert_return(() => call($Nm, "Mm.load", [12]), 2);
// linking.wast:277
assert_return(() => call($Pm, "grow", [1]), 4);
// linking.wast:278
assert_return(() => call($Pm, "grow", [0]), 5);
assert_return(() => call($Nm, "load", [12]), 242);
// linking.wast:279
assert_return(() => call($Pm, "grow", [1]), -1);
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:280
assert_return(() => call($Pm, "grow", [0]), 5);
// linking.wast:288
assert_return(() => call($Mm, "load", [12]), 167);
// linking.wast:282
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:289
assert_return(() => call($Nm, "Mm.load", [12]), 167);
// linking.wast:290
assert_return(() => call($Nm, "load", [12]), 242);
// linking.wast:291
assert_return(() => call($Mm, "load", [0]), 0);
assert_return(() => call($Om, "load", [12]), 167);
// linking.wast:293
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:298
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:306
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:314
assert_return(() => call($Pm, "grow", [0]), 1);
// linking.wast:315
assert_return(() => call($Pm, "grow", [2]), 1);
// linking.wast:316
assert_return(() => call($Pm, "grow", [0]), 3);
// linking.wast:317
assert_return(() => call($Pm, "grow", [1]), 3);
// linking.wast:318
assert_return(() => call($Pm, "grow", [1]), 4);
// linking.wast:319
assert_return(() => call($Pm, "grow", [0]), 5);
// linking.wast:320
assert_return(() => call($Pm, "grow", [1]), -1);
// linking.wast:321
assert_return(() => call($Pm, "grow", [0]), 5);
// linking.wast:323
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:332
assert_return(() => call($Mm, "load", [0]), 0);
// linking.wast:334
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:301
// linking.wast:342
assert_return(() => call($Mm, "load", [0]), 0);
// linking.wast:303
// linking.wast:344
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:313
// linking.wast:354
assert_return(() => call($Mm, "load", [0]), 0);

View File

@ -1 +0,0 @@
|jit-test| test-also-no-wasm-baseline; test-also-no-wasm-ion; test-also-wasm-tiering; include:wasm-testharness.js

View File

@ -1,108 +0,0 @@
// globals.wast:3
let $1 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\xa1\x80\x80\x80\x00\x08\x60\x00\x01\x7f\x60\x00\x01\x7e\x60\x01\x7f\x00\x60\x01\x7e\x00\x60\x00\x01\x7d\x60\x00\x01\x7c\x60\x01\x7d\x00\x60\x01\x7c\x00\x03\x8d\x80\x80\x80\x00\x0c\x00\x01\x00\x01\x02\x03\x04\x05\x04\x05\x06\x07\x06\xbd\x80\x80\x80\x00\x08\x7f\x00\x41\x7e\x0b\x7d\x00\x43\x00\x00\x40\xc0\x0b\x7c\x00\x44\x00\x00\x00\x00\x00\x00\x10\xc0\x0b\x7e\x00\x42\x7b\x0b\x7f\x01\x41\x74\x0b\x7d\x01\x43\x00\x00\x50\xc1\x0b\x7c\x01\x44\x00\x00\x00\x00\x00\x00\x2c\xc0\x0b\x7e\x01\x42\x71\x0b\x07\xe1\x80\x80\x80\x00\x0c\x05\x67\x65\x74\x2d\x61\x00\x00\x05\x67\x65\x74\x2d\x62\x00\x01\x05\x67\x65\x74\x2d\x78\x00\x02\x05\x67\x65\x74\x2d\x79\x00\x03\x05\x73\x65\x74\x2d\x78\x00\x04\x05\x73\x65\x74\x2d\x79\x00\x05\x05\x67\x65\x74\x2d\x31\x00\x06\x05\x67\x65\x74\x2d\x32\x00\x07\x05\x67\x65\x74\x2d\x35\x00\x08\x05\x67\x65\x74\x2d\x36\x00\x09\x05\x73\x65\x74\x2d\x35\x00\x0a\x05\x73\x65\x74\x2d\x36\x00\x0b\x0a\xf5\x80\x80\x80\x00\x0c\x84\x80\x80\x80\x00\x00\x23\x00\x0b\x84\x80\x80\x80\x00\x00\x23\x03\x0b\x84\x80\x80\x80\x00\x00\x23\x04\x0b\x84\x80\x80\x80\x00\x00\x23\x07\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x04\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x07\x0b\x84\x80\x80\x80\x00\x00\x23\x01\x0b\x84\x80\x80\x80\x00\x00\x23\x02\x0b\x84\x80\x80\x80\x00\x00\x23\x05\x0b\x84\x80\x80\x80\x00\x00\x23\x06\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x05\x0b\x86\x80\x80\x80\x00\x00\x20\x00\x24\x06\x0b");
// globals.wast:29
assert_return(() => call($1, "get-a", []), -2);
// globals.wast:30
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7e\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x62\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x02\x40\x10\x00\x01\x42\x7b\x01\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-b", []), int64("-5"))
// globals.wast:31
assert_return(() => call($1, "get-x", []), -12);
// globals.wast:32
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7e\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x79\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x02\x40\x10\x00\x01\x42\x71\x01\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-y", []), int64("-15"))
// globals.wast:34
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7d\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x31\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x40\xc0\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-1", []), -3.)
// globals.wast:35
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7c\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x32\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbd\x44\x00\x00\x00\x00\x00\x00\x10\xc0\xbd\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-2", []), -4.)
// globals.wast:36
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7d\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x35\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x50\xc1\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-5", []), -13.)
// globals.wast:37
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7c\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x36\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbd\x44\x00\x00\x00\x00\x00\x00\x2c\xc0\xbd\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-6", []), -14.)
// globals.wast:39
assert_return(() => call($1, "set-x", [6]));
// globals.wast:40
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7e\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x73\x65\x74\x2d\x79\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x91\x80\x80\x80\x00\x01\x8b\x80\x80\x80\x00\x00\x02\x40\x42\x07\x10\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "set-y", [int64("7")]))
// globals.wast:41
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7d\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x73\x65\x74\x2d\x35\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x94\x80\x80\x80\x00\x01\x8e\x80\x80\x80\x00\x00\x02\x40\x43\x00\x00\x00\x41\x10\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "set-5", [8.]))
// globals.wast:42
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x01\x7c\x00\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x73\x65\x74\x2d\x36\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x98\x80\x80\x80\x00\x01\x92\x80\x80\x80\x00\x00\x02\x40\x44\x00\x00\x00\x00\x00\x00\x22\x40\x10\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "set-6", [9.]))
// globals.wast:44
assert_return(() => call($1, "get-x", []), 6);
// globals.wast:45
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7e\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x79\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x97\x80\x80\x80\x00\x01\x91\x80\x80\x80\x00\x00\x02\x40\x10\x00\x01\x42\x07\x01\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-y", []), int64("7"))
// globals.wast:46
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7d\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x35\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9a\x80\x80\x80\x00\x01\x94\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbc\x43\x00\x00\x00\x41\xbc\x46\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-5", []), 8.)
// globals.wast:47
run(() => call(instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x01\x88\x80\x80\x80\x00\x02\x60\x00\x00\x60\x00\x01\x7c\x02\x8c\x80\x80\x80\x00\x01\x02\x24\x31\x05\x67\x65\x74\x2d\x36\x00\x01\x03\x82\x80\x80\x80\x00\x01\x00\x07\x87\x80\x80\x80\x00\x01\x03\x72\x75\x6e\x00\x01\x0a\x9e\x80\x80\x80\x00\x01\x98\x80\x80\x80\x00\x00\x02\x40\x10\x00\xbd\x44\x00\x00\x00\x00\x00\x00\x22\x40\xbd\x51\x45\x0d\x00\x0f\x0b\x00\x0b", exports("$1", $1)), "run", [])); // assert_return(() => call($1, "get-6", []), 9.)
// globals.wast:49
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\x06\x89\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x00\x00\x0b\x0a\x8c\x80\x80\x80\x00\x01\x86\x80\x80\x80\x00\x00\x41\x01\x24\x00\x0b");
// globals.wast:55
let $2 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
// globals.wast:56
let $3 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7d\x01\x43\x00\x00\x00\x00\x0b\x07\x85\x80\x80\x80\x00\x01\x01\x61\x03\x00");
// globals.wast:58
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8a\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x00\x00\x8c\x0b");
// globals.wast:63
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7d\x00\x20\x00\x0b");
// globals.wast:68
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8a\x80\x80\x80\x00\x01\x7d\x00\x43\x00\x00\x80\x3f\x8c\x0b");
// globals.wast:73
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x87\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x01\x0b");
// globals.wast:78
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x85\x80\x80\x80\x00\x01\x7f\x00\x01\x0b");
// globals.wast:83
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x89\x80\x80\x80\x00\x01\x7f\x00\x43\x00\x00\x00\x00\x0b");
// globals.wast:88
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x88\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x41\x00\x0b");
// globals.wast:93
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x84\x80\x80\x80\x00\x01\x7f\x00\x0b");
// globals.wast:98
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x23\x00\x0b");
// globals.wast:103
assert_invalid("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x8b\x80\x80\x80\x00\x02\x7f\x00\x23\x01\x0b\x7f\x00\x41\x00\x0b");
// globals.wast:108
let $4 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x98\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\x00");
// globals.wast:111
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\x02");
// globals.wast:124
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x02\x94\x80\x80\x80\x00\x01\x08\x73\x70\x65\x63\x74\x65\x73\x74\x0a\x67\x6c\x6f\x62\x61\x6c\x5f\x69\x33\x32\x03\x7f\xff");
// globals.wast:138
let $5 = instance("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x00\x41\x00\x0b");
// globals.wast:141
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\x02\x41\x00\x0b");
// globals.wast:153
assert_malformed("\x00\x61\x73\x6d\x01\x00\x00\x00\x06\x86\x80\x80\x80\x00\x01\x7f\xff\x41\x00\x0b");

View File

@ -1,352 +0,0 @@
// 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:227
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:236
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:238
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:248
assert_trap(() => call($Mt, "call", [7]));
// linking.wast:253
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:261
register("Mm", $Mm)
// linking.wast:263
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:275
assert_return(() => call($Mm, "load", [12]), 2);
// linking.wast:276
assert_return(() => call($Nm, "Mm.load", [12]), 2);
// linking.wast:277
assert_return(() => call($Nm, "load", [12]), 242);
// linking.wast:279
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:288
assert_return(() => call($Mm, "load", [12]), 167);
// linking.wast:289
assert_return(() => call($Nm, "Mm.load", [12]), 167);
// linking.wast:290
assert_return(() => call($Nm, "load", [12]), 242);
// linking.wast:291
assert_return(() => call($Om, "load", [12]), 167);
// linking.wast:293
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:298
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:306
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:314
assert_return(() => call($Pm, "grow", [0]), 1);
// linking.wast:315
assert_return(() => call($Pm, "grow", [2]), 1);
// linking.wast:316
assert_return(() => call($Pm, "grow", [0]), 3);
// linking.wast:317
assert_return(() => call($Pm, "grow", [1]), 3);
// linking.wast:318
assert_return(() => call($Pm, "grow", [1]), 4);
// linking.wast:319
assert_return(() => call($Pm, "grow", [0]), 5);
// linking.wast:320
assert_return(() => call($Pm, "grow", [1]), -1);
// linking.wast:321
assert_return(() => call($Pm, "grow", [0]), 5);
// linking.wast:323
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:332
assert_return(() => call($Mm, "load", [0]), 0);
// linking.wast:334
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:342
assert_return(() => call($Mm, "load", [0]), 0);
// linking.wast:344
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:354
assert_return(() => call($Mm, "load", [0]), 0);

View File

@ -156,7 +156,6 @@ if CONFIG['JS_BUILD_BINAST'] and CONFIG['JS_STANDALONE']:
DEFINES['EXPORT_JS_API'] = True
DEFINES['ENABLE_WASM_GLOBAL'] = True
LOCAL_INCLUDES += [
'!..',

View File

@ -702,13 +702,6 @@ if CONFIG['NIGHTLY_BUILD']:
DEFINES['ENABLE_WASM_THREAD_OPS'] = True
DEFINES['ENABLE_WASM_GC'] = True
# An experiment we want to run on Nightly and early Beta: Can we change the JS
# representation of an exported global from the global's value to an instance
# of WebAssembly.Global without breaking existing wasm content?
#
# Additionally guarded by EARLY_BETA_OR_EARLIER in the code.
DEFINES['ENABLE_WASM_GLOBAL'] = True
if CONFIG['JS_BUILD_BINAST']:
# Using SOURCES, as UNIFIED_SOURCES causes mysterious bugs on 32-bit platforms.
# These parts of BinAST are designed only to test evolutions of the

View File

@ -18,7 +18,6 @@ UNIFIED_SOURCES += [
]
DEFINES['EXPORT_JS_API'] = True
DEFINES['ENABLE_WASM_GLOBAL'] = True
if CONFIG['NIGHTLY_BUILD']:
DEFINES['ENABLE_WASM_GC'] = True

View File

@ -246,7 +246,6 @@ GetImports(JSContext* cx,
const GlobalDesc& global = globals[index];
MOZ_ASSERT(global.importIndex() == index);
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
if (v.isObject() && v.toObject().is<WasmGlobalObject>()) {
RootedWasmGlobalObject obj(cx, &v.toObject().as<WasmGlobalObject>());
@ -266,19 +265,16 @@ GetImports(JSContext* cx,
globalObjs[index] = obj;
val = obj->val();
} else
#endif
if (v.isNumber()) {
if (global.type() == ValType::I64) {
JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_I64_LINK);
return false;
}
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
if (global.isMutable()) {
JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_MUT_LINK);
return false;
}
#endif
if (!ToWebAssemblyValue(cx, global.type(), v, &val))
return false;
@ -1066,12 +1062,10 @@ WasmInstanceObject::create(JSContext* cx,
uint32_t indirectGlobals = 0;
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
for (uint32_t i = 0; i < globalObjs.length(); i++) {
if (globalObjs[i] && globals[i].isIndirect())
indirectGlobals++;
}
#endif
Rooted<UniquePtr<WasmGlobalObjectVector>> indirectGlobalObjs(cx,
js::MakeUnique<WasmGlobalObjectVector>());
@ -1080,7 +1074,6 @@ WasmInstanceObject::create(JSContext* cx,
return nullptr;
}
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
{
uint32_t next = 0;
for (uint32_t i = 0; i < globalObjs.length(); i++) {
@ -1088,7 +1081,6 @@ WasmInstanceObject::create(JSContext* cx,
(*indirectGlobalObjs)[next++] = globalObjs[i];
}
}
#endif
AutoSetNewObjectMetadata metadata(cx);
RootedWasmInstanceObject obj(cx, NewObjectWithGivenProto<WasmInstanceObject>(cx, proto));
@ -3202,9 +3194,7 @@ js::InitWebAssemblyClass(JSContext* cx, Handle<GlobalObject*> global)
return nullptr;
RootedObject moduleProto(cx), instanceProto(cx), memoryProto(cx), tableProto(cx);
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
RootedObject globalProto(cx);
#endif
if (!InitConstructor<WasmModuleObject>(cx, wasm, "Module", &moduleProto))
return nullptr;
if (!InitConstructor<WasmInstanceObject>(cx, wasm, "Instance", &instanceProto))
@ -3213,10 +3203,8 @@ js::InitWebAssemblyClass(JSContext* cx, Handle<GlobalObject*> global)
return nullptr;
if (!InitConstructor<WasmTableObject>(cx, wasm, "Table", &tableProto))
return nullptr;
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
if (!InitConstructor<WasmGlobalObject>(cx, wasm, "Global", &globalProto))
return nullptr;
#endif
if (!InitErrorClass(cx, wasm, "CompileError", JSEXN_WASMCOMPILEERROR))
return nullptr;
if (!InitErrorClass(cx, wasm, "LinkError", JSEXN_WASMLINKERROR))
@ -3236,9 +3224,7 @@ js::InitWebAssemblyClass(JSContext* cx, Handle<GlobalObject*> global)
global->setPrototype(JSProto_WasmInstance, ObjectValue(*instanceProto));
global->setPrototype(JSProto_WasmMemory, ObjectValue(*memoryProto));
global->setPrototype(JSProto_WasmTable, ObjectValue(*tableProto));
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
global->setPrototype(JSProto_WasmGlobal, ObjectValue(*globalProto));
#endif
global->setConstructor(JSProto_WebAssembly, ObjectValue(*wasm));
MOZ_ASSERT(global->isStandardClassResolved(JSProto_WebAssembly));

View File

@ -1025,7 +1025,6 @@ ExtractGlobalValue(const ValVector& globalImportValues, uint32_t globalIndex, co
MOZ_CRASH("Not a global value");
}
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
static bool
EnsureGlobalObject(JSContext* cx, const ValVector& globalImportValues, size_t globalIndex,
const GlobalDesc& global, WasmGlobalObjectVector& globalObjs)
@ -1046,13 +1045,11 @@ EnsureGlobalObject(JSContext* cx, const ValVector& globalImportValues, size_t gl
globalObjs[globalIndex] = go;
return true;
}
#endif
bool
Module::instantiateGlobals(JSContext* cx, const ValVector& globalImportValues,
WasmGlobalObjectVector& globalObjs) const
{
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
// If there are exported globals that aren't in globalObjs because they
// originate in this module or because they were immutable imports that came
// in as primitive values then we must create cells in the globalObjs for
@ -1074,7 +1071,7 @@ Module::instantiateGlobals(JSContext* cx, const ValVector& globalImportValues,
// primitive value; these globals are always immutable. Assert that we do
// not need to create any additional Global objects for such imports.
# ifdef DEBUG
#ifdef DEBUG
size_t numGlobalImports = 0;
for (const Import& import : imports_) {
if (import.kind != DefinitionKind::Global)
@ -1087,7 +1084,6 @@ Module::instantiateGlobals(JSContext* cx, const ValVector& globalImportValues,
}
MOZ_ASSERT_IF(!metadata().isAsmJS(),
numGlobalImports == globals.length() || !globals[numGlobalImports].isImport());
# endif
#endif
return true;
}
@ -1122,22 +1118,7 @@ GetGlobalExport(JSContext* cx,
const WasmGlobalObjectVector& globalObjs,
MutableHandleValue jsval)
{
#if defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER)
jsval.setObject(*globalObjs[globalIndex]);
#else
const GlobalDesc& global = globals[globalIndex];
MOZ_ASSERT(!global.isMutable(), "Mutable variables can't be exported.");
Val val = ExtractGlobalValue(globalImportValues, globalIndex, global);
if (val.type() == ValType::I64) {
JS_ReportErrorNumberUTF8(cx, GetErrorMessage, nullptr, JSMSG_WASM_BAD_I64_LINK);
return false;
}
jsval.set(ToJSValue(val));
#endif
return true;
}

View File

@ -1250,11 +1250,6 @@ GlobalIsJSCompatible(Decoder& d, ValType type, bool isMutable)
return d.fail("unexpected variable type in global import/export");
}
#if !(defined(ENABLE_WASM_GLOBAL) && defined(EARLY_BETA_OR_EARLIER))
if (isMutable)
return d.fail("can't import/export mutable globals in the MVP");
#endif
return true;
}