| Index: test/mjsunit/wasm/start-function.js
|
| diff --git a/test/mjsunit/wasm/start-function.js b/test/mjsunit/wasm/start-function.js
|
| index 409857de345f7a307097b76f1417b7d6e5621dcf..5b39a06a74531aa1a6bb283b0cec6eda22a95888 100644
|
| --- a/test/mjsunit/wasm/start-function.js
|
| +++ b/test/mjsunit/wasm/start-function.js
|
| @@ -23,8 +23,9 @@ function instantiate(sig, body) {
|
| kDeclFunctions, 1,
|
| 0, // decl flags
|
| 0, 0, // signature
|
| - body.length, 0, // body size
|
| + body.length + 1, 0, // body size
|
| ]);
|
| + module = module.concat([kDeclNoLocals]);
|
| module = module.concat(body);
|
| module = module.concat([
|
| // -- declare start function
|
| @@ -67,7 +68,7 @@ assertFails([2, kAstI32, kAstI32, kAstF32], [kExprGetLocal, 0]);
|
| assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
|
|
| (function testInvalidIndex() {
|
| - var kBodySize = 1;
|
| + var kBodySize = 2;
|
| var data = bytesWithHeader(
|
| // -- signatures
|
| kDeclSignatures, 1,
|
| @@ -76,6 +77,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
| kDeclFunctions, 1,
|
| 0, // decl flags
|
| 0, 0, // signature
|
| + kDeclNoLocals,
|
| kBodySize, 0, // body size
|
| kExprNop, // body
|
| // -- declare start function
|
| @@ -88,7 +90,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
|
|
|
|
| (function testTwoStartFuncs() {
|
| - var kBodySize = 1;
|
| + var kBodySize = 2;
|
| var data = bytesWithHeader(
|
| // -- signatures
|
| kDeclSignatures, 1,
|
| @@ -98,6 +100,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
| 0, // decl flags
|
| 0, 0, // signature
|
| kBodySize, 0, // body size
|
| + kDeclNoLocals,
|
| kExprNop, // body
|
| // -- declare start function
|
| kDeclStartFunction,
|
| @@ -112,7 +115,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
|
|
|
|
| (function testRun() {
|
| - var kBodySize = 6;
|
| + var kBodySize = 7;
|
|
|
| var data = bytesWithHeader(
|
| kDeclMemory,
|
| @@ -125,6 +128,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
| 0, // decl flags
|
| 0, 0, // signature
|
| kBodySize, 0, // code size
|
| + kDeclNoLocals,
|
| // -- start body
|
| kExprI32StoreMem, 0, kExprI8Const, 0, kExprI8Const, 77,
|
| // -- declare start function
|
| @@ -139,8 +143,8 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
| })();
|
|
|
| (function testStartFFI() {
|
| - var kBodySize = 2;
|
| - var kNameOffset = kHeaderSize + 4 + 9 + 7 + 3;
|
| + var kBodySize = 3;
|
| + var kNameOffset = kHeaderSize + 4 + 9 + 5 + kBodySize + 3;
|
|
|
| var data = bytesWithHeader(
|
| // -- signatures
|
| @@ -155,6 +159,7 @@ assertFails([3, kAstI32, kAstI32, kAstF32, kAstF64], [kExprGetLocal, 0]);
|
| 0, // decl flags
|
| 0, 0, // signature
|
| kBodySize, 0, // code size
|
| + kDeclNoLocals,
|
| // -- start body
|
| kExprCallFunction, 0,
|
| // -- declare start function
|
|
|