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

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

Issue 10239003: Remove unwarranted assumptions about inlining from a debugger test. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 8 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
===================================================================
--- test/mjsunit/debug-evaluate-locals-optimized-double.js (revision 11446)
+++ test/mjsunit/debug-evaluate-locals-optimized-double.js (working copy)
@@ -56,6 +56,11 @@
return arr.reduce(function (a, b) { return a + b; }, 0);
}
+function isCurrentlyOptimized(fun) {
+ // See runtime.cc.
+ return (%GetOptimizationStatus(fun) & 1) != 0;
+}
+
function listener(event, exec_state, event_data, data) {
try {
if (event == Debug.DebugEvent.Break)
@@ -148,23 +153,22 @@
assertFalse(frame.isConstructCall());
}
- // When function f is optimized (1 means YES, see runtime.cc) we
- // expect an optimized frame for f with g1, g2 and g3 inlined.
- if (%GetOptimizationStatus(f) == 1) {
- if (i == 1 || i == 2 || i == 3) {
- assertTrue(frame.isOptimizedFrame());
- assertTrue(frame.isInlinedFrame());
- assertEquals(4 - i, frame.inlinedFrameIndex());
- } else if (i == 4) {
- assertTrue(frame.isOptimizedFrame());
- assertFalse(frame.isInlinedFrame());
- } else {
- assertFalse(frame.isOptimizedFrame());
- assertFalse(frame.isInlinedFrame());
- }
+ if (i > 4) {
+ assertFalse(frame.isOptimizedFrame());
+ assertFalse(frame.isInlinedFrame());
}
}
+ // When function f is optimized we expect an optimized frame for f. We
+ // can't say whether or not the top 3 frames (g1, g2 and g3) are
+ // optimized and inlined.
+ var frame4 = exec_state.frame(4);
+
+ if (isCurrentlyOptimized(f)) {
+ assertTrue(frame4.isOptimizedFrame());
+ assertFalse(frame4.isInlinedFrame());
+ }
+
// Indicate that all was processed.
listenerComplete = true;
}
« 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