Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1028)

Unified Diff: test/mjsunit/wasm/import-table.js

Issue 1830663002: [wasm] Binary 11: AST changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/wasm/gc-frame.js ('k') | test/mjsunit/wasm/indirect-calls.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « test/mjsunit/wasm/gc-frame.js ('k') | test/mjsunit/wasm/indirect-calls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698