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

Unified Diff: test/mjsunit/wasm/stack.js

Issue 2361053004: Revert of [wasm] Master CL for Binary 0xC changes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 3 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/receiver.js ('k') | test/mjsunit/wasm/stackwalk.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/wasm/stack.js
diff --git a/test/mjsunit/wasm/stack.js b/test/mjsunit/wasm/stack.js
index 71038507db17d476b27074bfe69c89b5ededdd3e..0197b77caf9db1710bbc9db66185cf50a0a9a5de 100644
--- a/test/mjsunit/wasm/stack.js
+++ b/test/mjsunit/wasm/stack.js
@@ -45,7 +45,7 @@
builder.addImport("func", kSig_v_v);
builder.addFunction("main", kSig_v_v)
- .addBody([kExprCallFunction, 0])
+ .addBody([kExprCallImport, kArity0, 0])
.exportAs("main");
builder.addFunction("exec_unreachable", kSig_v_v)
@@ -53,14 +53,14 @@
.exportAs("exec_unreachable");
// Make this function unnamed, just to test also this case.
-var mem_oob_func = builder.addFunction(undefined, kSig_i_v)
+var mem_oob_func = builder.addFunction(undefined, kSig_v_v)
// Access the memory at offset -1, to provoke a trap.
.addBody([kExprI32Const, 0x7f, kExprI32LoadMem8S, 0, 0])
.exportAs("mem_out_of_bounds");
// Call the mem_out_of_bounds function, in order to have two WASM stack frames.
-builder.addFunction("call_mem_out_of_bounds", kSig_i_v)
- .addBody([kExprCallFunction, mem_oob_func.index])
+builder.addFunction("call_mem_out_of_bounds", kSig_v_v)
+ .addBody([kExprCallFunction, kArity0, mem_oob_func.index])
.exportAs("call_mem_out_of_bounds");
var module = builder.instantiate({func: STACK});
@@ -69,7 +69,7 @@
var expected_string = "Error\n" +
// The line numbers below will change as this test gains / loses lines..
" at STACK (stack.js:39:11)\n" + // --
- " at main (<WASM>[1]+1)\n" + // --
+ " at main (<WASM>[0]+1)\n" + // --
" at testSimpleStack (stack.js:76:18)\n" + // --
" at stack.js:78:3"; // --
@@ -89,7 +89,7 @@
verifyStack(stack, [
// isWasm function line pos file
[ false, "STACK", 39, 0, "stack.js"],
- [ true, "main", 1, 1, null],
+ [ true, "main", 0, 1, null],
[ false, "testStackFrames", 87, 0, "stack.js"],
[ false, null, 96, 0, "stack.js"]
]);
@@ -103,7 +103,7 @@
assertContains("unreachable", e.message);
verifyStack(e.stack, [
// isWasm function line pos file
- [ true, "exec_unreachable", 2, 1, null],
+ [ true, "exec_unreachable", 1, 1, null],
[ false, "testWasmUnreachable", 100, 0, "stack.js"],
[ false, null, 111, 0, "stack.js"]
]);
@@ -118,8 +118,8 @@
assertContains("out of bounds", e.message);
verifyStack(e.stack, [
// isWasm function line pos file
- [ true, "", 3, 3, null],
- [ true, "call_mem_out_of_bounds", 4, 1, null],
+ [ true, "", 2, 3, null],
+ [ true, "call_mem_out_of_bounds", 3, 1, null],
[ false, "testWasmMemOutOfBounds", 115, 0, "stack.js"],
[ false, null, 127, 0, "stack.js"]
]);
@@ -135,7 +135,7 @@
builder.addFunction("recursion", sig_index)
.addBody([
kExprI32Const, 0,
- kExprCallIndirect, sig_index
+ kExprCallIndirect, kArity0, sig_index
])
.exportFunc()
builder.appendToTable([0]);
« no previous file with comments | « test/mjsunit/wasm/receiver.js ('k') | test/mjsunit/wasm/stackwalk.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698