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

Unified Diff: test/mjsunit/wasm/import-table.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/ffi-error.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 33d1c3551ccc79a14243f90d05c792ace75d54b5..53860bf20644db9d670f2478842971b1281f5c59 100644
--- a/test/mjsunit/wasm/import-table.js
+++ b/test/mjsunit/wasm/import-table.js
@@ -8,13 +8,13 @@ load("test/mjsunit/wasm/wasm-constants.js");
function testCallImport(func, check) {
var kBodySize = 6;
- var kNameFunOffset = 29 + kBodySize + 1;
+ var kNameFunOffset = kHeaderSize + 29 + kBodySize + 1;
var kNameMainOffset = kNameFunOffset + 4;
var ffi = new Object();
ffi.fun = func;
- var data = bytes(
+ var data = bytesWithHeader(
// signatures
kDeclSignatures, 1,
2, kAstI32, kAstF64, kAstF64, // (f64,f64) -> int
@@ -193,7 +193,7 @@ testCallImport(returnValue(objWithValueOf), checkReturn(198));
function testCallBinopVoid(type, func, check) {
var kBodySize = 10;
- var kNameFunOffset = 28 + kBodySize + 1;
+ var kNameFunOffset = kHeaderSize + 28 + kBodySize + 1;
var kNameMainOffset = kNameFunOffset + 4;
var ffi = new Object();
@@ -212,7 +212,7 @@ function testCallBinopVoid(type, func, check) {
args_b = arguments[1];
}
- var data = bytes(
+ var data = bytesWithHeader(
// -- signatures
kDeclSignatures, 2,
2, kAstStmt, type, type, // (type,type)->void
@@ -286,13 +286,13 @@ testCallBinopVoid(kAstF64);
function testCallPrint() {
var kBodySize = 10;
- var kNamePrintOffset = 10 + 7 + 7 + 9 + kBodySize + 1;
+ var kNamePrintOffset = kHeaderSize + 10 + 7 + 7 + 9 + kBodySize + 1;
var kNameMainOffset = kNamePrintOffset + 6;
var ffi = new Object();
ffi.print = print;
- var data = bytes(
+ var data = bytesWithHeader(
// -- signatures
kDeclSignatures, 2,
1, kAstStmt, kAstI32, // i32->void
@@ -338,7 +338,7 @@ testCallPrint();
function testCallImport2(foo, bar, expected) {
var kBodySize = 5;
- var kNameFooOffset = 37 + kBodySize + 1;
+ var kNameFooOffset = kHeaderSize + 37 + kBodySize + 1;
var kNameBarOffset = kNameFooOffset + 4;
var kNameMainOffset = kNameBarOffset + 4;
@@ -346,7 +346,7 @@ function testCallImport2(foo, bar, expected) {
ffi.foo = foo;
ffi.bar = bar;
- var data = bytes(
+ var data = bytesWithHeader(
// signatures
kDeclSignatures, 1,
0, kAstI32, // void -> i32
« no previous file with comments | « test/mjsunit/wasm/ffi-error.js ('k') | test/mjsunit/wasm/indirect-calls.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698