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

Unified Diff: test/mjsunit/wasm/ffi.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/export-table.js ('k') | test/mjsunit/wasm/ffi-error.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/ffi.js
diff --git a/test/mjsunit/wasm/ffi.js b/test/mjsunit/wasm/ffi.js
index 95d655dc6dfdcfbe1746bea3e3e5d4538a72bba4..1cc23210e824dc18c3133f7e8f36746e2169568f 100644
--- a/test/mjsunit/wasm/ffi.js
+++ b/test/mjsunit/wasm/ffi.js
@@ -8,13 +8,13 @@ load("test/mjsunit/wasm/wasm-constants.js");
function testCallFFI(func, check) {
var kBodySize = 6;
- var kNameFunOffset = 24 + kBodySize + 1;
+ var kNameFunOffset = kHeaderSize + 24 + 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
@@ -190,7 +190,7 @@ testCallFFI(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();
@@ -209,7 +209,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
@@ -283,13 +283,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
« no previous file with comments | « test/mjsunit/wasm/export-table.js ('k') | test/mjsunit/wasm/ffi-error.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698