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

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

Issue 1759673002: [interpreter] Add tests for translating PC from optimized frame. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: both tests actually fail for ignition 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/mjsunit/ignition/optimized-debug-frame.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/ignition/optimized-stack-trace.js
diff --git a/test/mjsunit/ignition/optimized-stack-trace.js b/test/mjsunit/ignition/optimized-stack-trace.js
new file mode 100644
index 0000000000000000000000000000000000000000..77f9acf3c8507bc66c9ef9adbd3217b23a402df9
--- /dev/null
+++ b/test/mjsunit/ignition/optimized-stack-trace.js
@@ -0,0 +1,22 @@
+// Copyright 2016 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: --allow-natives-syntax
+
+// Test that PC in optimized frame would correctly translate into
+// unoptimized frame when collecting stack trace.
+
+function f() {
+ return new Error().stack;
+}
+
+function g(x) {
+ return f();
+}
+
+g();
+g();
+%OptimizeFunctionOnNextCall(g);
+print(g());
+assertTrue(/g \(.*?\.js:15:10\)/.test(g()));
« no previous file with comments | « test/mjsunit/ignition/optimized-debug-frame.js ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698