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

Unified Diff: test/mjsunit/wasm/start-function.js

Issue 1896863003: [wasm] Binary 11: Module 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/stackwalk.js ('k') | test/mjsunit/wasm/test-wasm-module-builder.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/start-function.js
diff --git a/test/mjsunit/wasm/start-function.js b/test/mjsunit/wasm/start-function.js
index 28caf052fd233a65b5825a509aabbc6fe43a0759..3c5707a2d992859d429763c6f3735de3473a2a10 100644
--- a/test/mjsunit/wasm/start-function.js
+++ b/test/mjsunit/wasm/start-function.js
@@ -37,19 +37,19 @@ function assertVerifies(sig, body) {
return module;
}
-assertVerifies([kAstStmt], [kExprNop]);
-assertVerifies([kAstI32], [kExprI8Const, 0]);
+assertVerifies(kSig_v_v, [kExprNop]);
+assertVerifies(kSig_i, [kExprI8Const, 0]);
// Arguments aren't allow to start functions.
-assertFails([kAstI32, kAstI32], [kExprGetLocal, 0]);
-assertFails([kAstI32, kAstI32, kAstF32], [kExprGetLocal, 0]);
-assertFails([kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
+assertFails(kSig_i_i, [kExprGetLocal, 0]);
+assertFails(kSig_i_ii, [kExprGetLocal, 0]);
+assertFails(kSig_i_dd, [kExprGetLocal, 0]);
(function testInvalidIndex() {
print("testInvalidIndex");
var builder = new WasmModuleBuilder();
- var func = builder.addFunction("", [kAstStmt])
+ var func = builder.addFunction("", kSig_v_v)
.addBody([kExprNop]);
builder.addStart(func.index + 1);
@@ -62,7 +62,7 @@ assertFails([kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
print("testTwoStartFuncs");
var builder = new WasmModuleBuilder();
- var func = builder.addFunction("", [kAstStmt])
+ var func = builder.addFunction("", kSig_v_v)
.addBody([kExprNop]);
builder.addExplicitSection([kDeclStartFunction, 0]);
@@ -78,7 +78,7 @@ assertFails([kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
builder.addMemory(12, 12, true);
- var func = builder.addFunction("", [kAstStmt])
+ var func = builder.addFunction("", kSig_v_v)
.addBody([kExprI8Const, 0, kExprI8Const, 77, kExprI32StoreMem, 0, 0]);
builder.addStart(func.index);
@@ -98,7 +98,7 @@ assertFails([kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
}};
var builder = new WasmModuleBuilder();
- var sig_index = builder.addSignature([kAstStmt]);
+ var sig_index = builder.addSignature(kSig_v_v);
builder.addImport("foo", sig_index);
var func = builder.addFunction("", sig_index)
« no previous file with comments | « test/mjsunit/wasm/stackwalk.js ('k') | test/mjsunit/wasm/test-wasm-module-builder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698