| Index: test/mjsunit/wasm/instantiate-module-basic.js
|
| diff --git a/test/mjsunit/wasm/instantiate-module-basic.js b/test/mjsunit/wasm/instantiate-module-basic.js
|
| index 04fc903010db1b17935e374df2f72820d92488df..6029c9d3783f91a0ae6712577f2a85db6aebb9d5 100644
|
| --- a/test/mjsunit/wasm/instantiate-module-basic.js
|
| +++ b/test/mjsunit/wasm/instantiate-module-basic.js
|
| @@ -61,6 +61,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
|
|
| // Negative tests.
|
| (function InvalidModules() {
|
| + print("InvalidModules...");
|
| let invalid_cases = [undefined, 1, "", "a", {some:1, obj: "b"}];
|
| let len = invalid_cases.length;
|
| for (var i = 0; i < len; ++i) {
|
| @@ -75,9 +76,10 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
|
|
| // Compile async an invalid blob.
|
| (function InvalidBinaryAsyncCompilation() {
|
| + print("InvalidBinaryAsyncCompilation...");
|
| let builder = new WasmModuleBuilder();
|
| builder.addFunction("f", kSig_i_i)
|
| - .addBody([kExprCallImport, kArity0, 0]);
|
| + .addBody([kExprCallFunction, 0]);
|
| let promise = WebAssembly.compile(builder.toBuffer());
|
| promise
|
| .then(compiled =>
|
| @@ -87,6 +89,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
|
|
| // Multiple instances tests.
|
| (function ManyInstances() {
|
| + print("ManyInstances...");
|
| let compiled_module = new WebAssembly.Module(buffer);
|
| let instance_1 = new WebAssembly.Instance(compiled_module);
|
| let instance_2 = new WebAssembly.Instance(compiled_module);
|
| @@ -94,6 +97,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
| })();
|
|
|
| (function ManyInstancesAsync() {
|
| + print("ManyInstancesAsync...");
|
| let promise = WebAssembly.compile(buffer);
|
| promise.then(compiled_module => {
|
| let instance_1 = new WebAssembly.Instance(compiled_module);
|
| @@ -103,6 +107,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
| })();
|
|
|
| (function InstancesAreIsolatedFromEachother() {
|
| + print("InstancesAreIsolatedFromEachother...");
|
| var builder = new WasmModuleBuilder();
|
| builder.addMemory(1,1, true);
|
| var kSig_v_i = makeSig([kAstI32], []);
|
| @@ -112,13 +117,13 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
|
|
| builder.addFunction("main", kSig_i_i)
|
| .addBody([
|
| - kExprI32Const, 1,
|
| kExprGetLocal, 0,
|
| kExprI32LoadMem, 0, 0,
|
| - kExprCallIndirect, kArity1, signature,
|
| + kExprI32Const, 1,
|
| + kExprCallIndirect, signature,
|
| kExprGetLocal,0,
|
| kExprI32LoadMem,0, 0,
|
| - kExprCallImport, kArity0, 0,
|
| + kExprCallFunction, 0,
|
| kExprI32Add
|
| ]).exportFunc();
|
|
|
| @@ -127,8 +132,8 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
| builder.addFunction("_wrap_writer", signature)
|
| .addBody([
|
| kExprGetLocal, 0,
|
| - kExprCallImport, kArity1, 1]);
|
| - builder.appendToTable([0, 1]);
|
| + kExprCallFunction, 1]);
|
| + builder.appendToTable([2, 3]);
|
|
|
|
|
| var module = new WebAssembly.Module(builder.toBuffer());
|
| @@ -155,6 +160,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
| })();
|
|
|
| (function GlobalsArePrivateToTheInstance() {
|
| + print("GlobalsArePrivateToTheInstance...");
|
| var builder = new WasmModuleBuilder();
|
| builder.addGlobal(kAstI32);
|
| builder.addFunction("read", kSig_i_v)
|
| @@ -179,6 +185,7 @@ promise.then(module => CheckInstance(new WebAssembly.Instance(module)));
|
|
|
|
|
| (function InstanceMemoryIsIsolated() {
|
| + print("InstanceMemoryIsIsolated...");
|
| var builder = new WasmModuleBuilder();
|
| builder.addMemory(1,1, true);
|
|
|
|
|