Index: test/mjsunit/wasm/default-func-call.js |
diff --git a/test/mjsunit/wasm/indirect-calls.js b/test/mjsunit/wasm/default-func-call.js |
similarity index 73% |
copy from test/mjsunit/wasm/indirect-calls.js |
copy to test/mjsunit/wasm/default-func-call.js |
index 80bee412e028541e3b54ba7a175a512cb8293e77..608673c2929b614b375ecc67e864bad09d08494b 100644 |
--- a/test/mjsunit/wasm/indirect-calls.js |
+++ b/test/mjsunit/wasm/default-func-call.js |
@@ -1,8 +1,10 @@ |
// Copyright 2015 the V8 project authors. All rights reserved. |
+// |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
// Flags: --expose-wasm |
+// Flags: --wasm-jit-prototype |
load("test/mjsunit/wasm/wasm-constants.js"); |
load("test/mjsunit/wasm/wasm-module-builder.js"); |
@@ -11,6 +13,7 @@ var module = (function () { |
var builder = new WasmModuleBuilder(); |
var sig_index = builder.addSignature(kSig_i_ii); |
+ builder.addPad(512); |
bradn
2016/06/21 18:43:02
But how about we make this:
addPadFunctionTable ?
|
builder.addImport("add", sig_index); |
builder.addFunction("add", sig_index) |
.addBody([ |
@@ -46,4 +49,10 @@ assertEquals(5, module.exports.main(1, 12, 7)); |
assertEquals(19, module.exports.main(0, 12, 7)); |
assertTraps(kTrapFuncSigMismatch, "module.exports.main(2, 12, 33)"); |
bradn
2016/06/21 17:42:37
Maybe make this just test the trapping directly?
I
bradn
2016/06/21 18:43:02
Sorry confused with the test from yesterday.
This
|
-assertTraps(kTrapFuncInvalid, "module.exports.main(3, 12, 33)"); |
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(3, 12, 33)"); |
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(4, 12, 33)"); |
+assertTraps(kTrapFuncInvalid, "module.exports.main(1023, 12, 33)"); |
+assertTraps(kTrapFuncInvalid, "module.exports.main(1025, 12, 33)"); |
+assertTraps(kTrapFuncSigMismatch, "module.exports.main(511, 12, 33)"); |
+assertTraps(kTrapFuncInvalid, "module.exports.main(513, 12, 33)"); |
+assertTraps(kTrapFuncInvalid, "module.exports.main(-1, 12, 33)"); |