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

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

Issue 1740373002: [wasm] Add a magic word and a version number to the binary. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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/unreachable.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 4008efa5635badbdc4e42c43bb49cfc66269efb3..409857de345f7a307097b76f1417b7d6e5621dcf 100644
--- a/test/mjsunit/wasm/start-function.js
+++ b/test/mjsunit/wasm/start-function.js
@@ -9,6 +9,11 @@ load("test/mjsunit/wasm/wasm-constants.js");
function instantiate(sig, body) {
var module = new Array();
module = module.concat([
+ // -- header
+ kWasmH0, kWasmH1, kWasmH2, kWasmH3,
+ kWasmV0, kWasmV1, kWasmV2, kWasmV3
+ ]);
+ module = module.concat([
// -- signatures
kDeclSignatures, 1,
]);
@@ -63,7 +68,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
(function testInvalidIndex() {
var kBodySize = 1;
- var data = bytes(
+ var data = bytesWithHeader(
// -- signatures
kDeclSignatures, 1,
0, kAstStmt,
@@ -84,7 +89,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
(function testTwoStartFuncs() {
var kBodySize = 1;
- var data = bytes(
+ var data = bytesWithHeader(
// -- signatures
kDeclSignatures, 1,
0, kAstStmt,
@@ -109,7 +114,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
(function testRun() {
var kBodySize = 6;
- var data = bytes(
+ var data = bytesWithHeader(
kDeclMemory,
12, 12, 1, // memory
// -- signatures
@@ -135,9 +140,9 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
(function testStartFFI() {
var kBodySize = 2;
- var kNameOffset = 4 + 9 + 7 + 3;
+ var kNameOffset = kHeaderSize + 4 + 9 + 7 + 3;
- var data = bytes(
+ var data = bytesWithHeader(
// -- signatures
kDeclSignatures, 1,
0, kAstStmt,
« no previous file with comments | « test/mjsunit/wasm/stackwalk.js ('k') | test/mjsunit/wasm/unreachable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698