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

Unified Diff: test/mjsunit/debug-evaluate-locals-optimized-double.js

Issue 7307035: Add inspection of whether frame is a construct frame to optimized frames (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments Created 9 years, 5 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/debug-evaluate-locals-optimized.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/debug-evaluate-locals-optimized-double.js
diff --git a/test/mjsunit/debug-evaluate-locals-optimized-double.js b/test/mjsunit/debug-evaluate-locals-optimized-double.js
index bbe78d62360abdf83258b25bb53f9e28d6f981ac..584d1afdab5a0133c2563e10c1f973aa1968941a 100644
--- a/test/mjsunit/debug-evaluate-locals-optimized-double.js
+++ b/test/mjsunit/debug-evaluate-locals-optimized-double.js
@@ -29,8 +29,10 @@
// Get the Debug object exposed from the debug context global object.
Debug = debug.Debug
-listenerComplete = false;
-exception = false;
+var listenerComplete = false;
+var exception = false;
+
+var testingConstructCall = false;
function listener(event, exec_state, event_data, data) {
@@ -70,6 +72,9 @@ function listener(event, exec_state, event_data, data) {
default: assertUnreachable();
}
+ // Check for construct call.
+ assertEquals(testingConstructCall && i == 4, frame.isConstructCall());
+
// When function f is optimized (2 means YES, see runtime.cc) we
// expect an optimized frame for f with g1, g2 and g3 inlined.
if (%GetOptimizationStatus(f) == 2) {
@@ -142,7 +147,10 @@ function f(x, y) {
g1(a, b);
};
+// Test calling f normally and as a constructor.
f(11.11, 12.12);
+testingConstructCall = true;
+new f(11.11, 12.12);
// Make sure that the debug event listener vas invoked.
assertFalse(exception, "exception in listener " + exception)
« no previous file with comments | « test/mjsunit/debug-evaluate-locals-optimized.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698