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 |