Index: test/mjsunit/wasm/import-table.js |
diff --git a/test/mjsunit/wasm/import-table.js b/test/mjsunit/wasm/import-table.js |
index 75799016519ae9099cb938f64432565eb8000109..7cdddabb86820124bf749efc4a0649384477dd88 100644 |
--- a/test/mjsunit/wasm/import-table.js |
+++ b/test/mjsunit/wasm/import-table.js |
@@ -14,9 +14,9 @@ function testCallImport(func, check) { |
builder.addImport("func", sig_index); |
builder.addFunction("main", sig_index) |
.addBody([ |
- kExprCallImport, 0, // -- |
kExprGetLocal, 0, // -- |
- kExprGetLocal, 1]) // -- |
+ kExprGetLocal, 1, // -- |
+ kExprCallImport, 2, 0]) // -- |
.exportAs("main"); |
var main = builder.instantiate({func: func}).exports.main; |
@@ -189,11 +189,11 @@ function testCallBinopVoid(type, func, check) { |
builder.addImport("func", [kAstStmt, type, type]); |
builder.addFunction("main", [kAstI32, type, type]) |
.addBody([ |
- kExprBlock, 2, // -- |
- kExprCallImport, 0, // -- |
kExprGetLocal, 0, // -- |
kExprGetLocal, 1, // -- |
- kExprI8Const, 99]) |
+ kExprCallImport, 2, 0, // -- |
+ kExprI8Const, 99, // -- |
+ ]) |
.exportFunc("main"); |
var main = builder.instantiate(ffi).exports.main; |
@@ -245,11 +245,11 @@ function testCallPrint() { |
builder.addImport("print", [kAstStmt, kAstF64]); |
builder.addFunction("main", [kAstStmt, kAstF64]) |
.addBody([ |
- kExprBlock, 2, // -- |
- kExprCallImport, 0, // -- |
- kExprI8Const, 97, // -- |
- kExprCallImport, 1, // -- |
- kExprGetLocal, 0]) // -- |
+ kExprI8Const, 97, // -- |
+ kExprCallImport, kArity1, 0, // -- |
+ kExprGetLocal, 0, // -- |
+ kExprCallImport, kArity1, 1 // -- |
+ ]) |
.exportFunc(); |
var main = builder.instantiate({print: print}).exports.main; |
@@ -270,9 +270,10 @@ function testCallImport2(foo, bar, expected) { |
builder.addImport("bar", [kAstI32]); |
builder.addFunction("main", [kAstI32]) |
.addBody([ |
+ kExprCallImport, kArity0, 0, // -- |
+ kExprCallImport, kArity0, 1, // -- |
kExprI32Add, // -- |
- kExprCallImport, 0, // -- |
- kExprCallImport, 1]) // -- |
+ ]) // -- |
.exportFunc(); |
var main = builder.instantiate({foo: foo, bar: bar}).exports.main; |