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

Unified Diff: test/mjsunit/ignition/stack-trace-source-position.js

Issue 1662983002: [interpreter] add source positions for call and call-new. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix test expectations 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/cctest/cctest.status ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/ignition/stack-trace-source-position.js
diff --git a/test/mjsunit/ignition/stack-trace-source-position.js b/test/mjsunit/ignition/stack-trace-source-position.js
index 1c4079ab397c4819f9e51829638e36c5f6a8c089..ed161d90a41d0e48bd4921b8738f7a74ab225dd9 100644
--- a/test/mjsunit/ignition/stack-trace-source-position.js
+++ b/test/mjsunit/ignition/stack-trace-source-position.js
@@ -3,11 +3,19 @@
// found in the LICENSE file.
// Flags: --ignition --ignition-filter=f
+// Flags: --no-turbo
-function f() {
- return new Error().stack;
+// TODO(yangguo): fix for turbofan
+
+function f(x) {
+ if (x == 0) {
+ return new Error().stack;
+ }
+ return f(x - 1);
}
-// TODO(yangguo): this is just a dummy source position calculated for
-// interpreter bytecode. Update this once something better comes along.
-assertTrue(/at f.*?:\d+:\d+/.test(f()));
+var stack_lines = f(2).split("\n");
+
+assertTrue(/at f \(.*?:12:12\)/.test(stack_lines[1]));
+assertTrue(/at f \(.*?:14:10\)/.test(stack_lines[2]));
+assertTrue(/at f \(.*?:14:10\)/.test(stack_lines[3]));
« no previous file with comments | « test/cctest/cctest.status ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698