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

Side by Side Diff: test/mjsunit/debug-stepframe-clearing.js

Issue 1525173003: [debugger] remove step count parameter from prepare step. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Flags: --expose-debug-as debug 5 // Flags: --expose-debug-as debug
6 6
7 // This test ensures that IC learning doesn't interfere with stepping into 7 // This test ensures that IC learning doesn't interfere with stepping into
8 // property accessor. f1()'s ICs are allowed to learn to a monomorphic state, 8 // property accessor. f1()'s ICs are allowed to learn to a monomorphic state,
9 // and the breakpoints flooding get() are allowed to expire, then we ensure 9 // and the breakpoints flooding get() are allowed to expire, then we ensure
10 // that we can step into get() again later (when k == 1). 10 // that we can step into get() again later (when k == 1).
(...skipping 30 matching lines...) Expand all
41 try { 41 try {
42 var line = exec_state.frame(0).sourceLineText(); 42 var line = exec_state.frame(0).sourceLineText();
43 print(line); 43 print(line);
44 var match = line.match(/\/\/ Break (\d+)$/); 44 var match = line.match(/\/\/ Break (\d+)$/);
45 assertEquals(2, match.length); 45 assertEquals(2, match.length);
46 var match_value = parseInt(match[1]); 46 var match_value = parseInt(match[1]);
47 47
48 if (break_count >= 0 && break_count < 2) { 48 if (break_count >= 0 && break_count < 2) {
49 // 0, 1: Keep stepping through frames. 49 // 0, 1: Keep stepping through frames.
50 assertEquals(break_count, match_value); 50 assertEquals(break_count, match_value);
51 exec_state.prepareStep(Debug.StepAction.StepFrame, 1); 51 exec_state.prepareStep(Debug.StepAction.StepFrame);
52 } else if (break_count === 2) { 52 } else if (break_count === 2) {
53 // 2: let the code run to a breakpoint we set. The load should 53 // 2: let the code run to a breakpoint we set. The load should
54 // go monomorphic. 54 // go monomorphic.
55 assertEquals(break_count, match_value); 55 assertEquals(break_count, match_value);
56 } else if (break_count === 3) { 56 } else if (break_count === 3) {
57 // 3: back to frame stepping. Does the monomorphic slappy accessor 57 // 3: back to frame stepping. Does the monomorphic slappy accessor
58 // call still have the ability to break like before? 58 // call still have the ability to break like before?
59 assertEquals(break_count, match_value); 59 assertEquals(break_count, match_value);
60 Debug.clearBreakPoint(bp_f1_line7); 60 Debug.clearBreakPoint(bp_f1_line7);
61 exec_state.prepareStep(Debug.StepAction.StepFrame, 1); 61 exec_state.prepareStep(Debug.StepAction.StepFrame);
62 } else { 62 } else {
63 assertEquals(4, break_count); 63 assertEquals(4, break_count);
64 assertEquals(2, match_value); 64 assertEquals(2, match_value);
65 // Apparently we can still stop in the accessor even though we cleared 65 // Apparently we can still stop in the accessor even though we cleared
66 // breakpoints earlier and there was a monomorphic step. 66 // breakpoints earlier and there was a monomorphic step.
67 // Allow running to completion now. 67 // Allow running to completion now.
68 Debug.clearBreakPoint(bp_f1_line9); 68 Debug.clearBreakPoint(bp_f1_line9);
69 } 69 }
70 70
71 break_count++; 71 break_count++;
(...skipping 16 matching lines...) Expand all
88 bp_f1_line7 = Debug.setBreakPoint(f1, 7); 88 bp_f1_line7 = Debug.setBreakPoint(f1, 7);
89 bp_f1_line9 = Debug.setBreakPoint(f1, 9); 89 bp_f1_line9 = Debug.setBreakPoint(f1, 9);
90 90
91 debugger; // Break 0 91 debugger; // Break 0
92 f1(); 92 f1();
93 Debug.setListener(null); 93 Debug.setListener(null);
94 assertTrue(break_count === 5); 94 assertTrue(break_count === 5);
95 } 95 }
96 96
97 assertNull(exception); 97 assertNull(exception);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698