Index: test/mjsunit/wasm/test-wasm-module-builder.js |
diff --git a/test/mjsunit/wasm/test-wasm-module-builder.js b/test/mjsunit/wasm/test-wasm-module-builder.js |
index b1a2309770a4ea0c36f446dca7ed3aa4c2da0ad9..72d5a7aaa446ec7bdfc976e1a0fe4d924fa965e6 100644 |
--- a/test/mjsunit/wasm/test-wasm-module-builder.js |
+++ b/test/mjsunit/wasm/test-wasm-module-builder.js |
@@ -7,7 +7,7 @@ |
load('test/mjsunit/wasm/wasm-constants.js'); |
load('test/mjsunit/wasm/wasm-module-builder.js'); |
-var debug = true; |
+var debug = false; |
(function BasicTest() { |
var module = new WasmModuleBuilder(); |
@@ -25,7 +25,7 @@ |
var module = new WasmModuleBuilder(); |
var index = module.addImport("print", makeSig_v_x(kAstI32)); |
module.addFunction("foo", kSig_v_v) |
- .addBody([kExprI8Const, 13, kExprCallFunction, index]) |
+ .addBody([kExprI8Const, 13, kExprCallImport, kArity1, index]) |
.exportAs("main"); |
var buffer = module.toBuffer(debug); |
@@ -38,7 +38,7 @@ |
var module = new WasmModuleBuilder(); |
module.addFunction(undefined, kSig_i_i) |
.addLocals({i32_count: 1}) |
- .addBody([kExprGetLocal, 0, kExprSetLocal, 1, kExprGetLocal, 1]) |
+ .addBody([kExprGetLocal, 0, kExprSetLocal, 1]) |
.exportAs("main"); |
var buffer = module.toBuffer(debug); |
@@ -60,7 +60,7 @@ |
var module = new WasmModuleBuilder(); |
module.addFunction(undefined, makeSig_r_x(p.type, p.type)) |
.addLocals(p.locals) |
- .addBody([kExprGetLocal, 0, kExprSetLocal, 1, kExprGetLocal, 1]) |
+ .addBody([kExprGetLocal, 0, kExprSetLocal, 1]) |
.exportAs("main"); |
var buffer = module.toBuffer(debug); |
@@ -75,7 +75,7 @@ |
module.addFunction("add", kSig_i_ii) |
.addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add]); |
module.addFunction("main", kSig_i_ii) |
- .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprCallFunction, 0]) |
+ .addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprCallFunction, kArity2, 0]) |
.exportAs("main"); |
var instance = module.instantiate(); |
@@ -89,7 +89,7 @@ |
.addBody([kExprGetLocal, 0, kExprGetLocal, 1, kExprI32Add]); |
module.addFunction("main", kSig_i_iii) |
.addBody([kExprGetLocal, |
- 1, kExprGetLocal, 2, kExprGetLocal, 0, kExprCallIndirect, 0]) |
+ 0, kExprGetLocal, 1, kExprGetLocal, 2, kExprCallIndirect, kArity2, 0]) |
.exportAs("main"); |
module.appendToTable([0]); |
@@ -143,7 +143,7 @@ |
var module = new WasmModuleBuilder(); |
var index = module.addImportWithModule("mod", "print", makeSig_v_x(kAstI32)); |
module.addFunction("foo", kSig_v_v) |
- .addBody([kExprI8Const, 19, kExprCallFunction, index]) |
+ .addBody([kExprI8Const, 19, kExprCallImport, kArity1, index]) |
.exportAs("main"); |
var buffer = module.toBuffer(debug); |