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

Side by Side Diff: test/mjsunit/debug-optimize.js

Issue 2466273005: [debugger] Further stepping support in test wrapper (Closed)
Patch Set: Move more tests Created 4 years, 1 month 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
« no previous file with comments | « test/mjsunit/debug-generator-break-on-stack.js ('k') | test/mjsunit/debug-print.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --expose-debug-as debug --allow-natives-syntax --use-inlining
6
7 var Debug = debug.Debug;
8
9 function f1() {
10 return 1;
11 }
12
13 function f2() {
14 return 2;
15 }
16
17 function f3() {
18 return f1();
19 }
20
21 function f4() {
22 return 4;
23 }
24
25
26 function optimize(f) {
27 f();
28 f();
29 %OptimizeFunctionOnNextCall(f);
30 f();
31 }
32
33 optimize(f1);
34 optimize(f2);
35 optimize(f3);
36
37 Debug.setListener(function() {});
38
39 assertOptimized(f1);
40 assertOptimized(f2);
41 assertOptimized(f3);
42
43 Debug.setBreakPoint(f1, 1);
44
45 // Setting break point deoptimizes f1 and f3 (which inlines f1).
46 assertUnoptimized(f1);
47 assertOptimized(f2);
48 assertUnoptimized(f3);
49
50 // We can optimize with break points set.
51 optimize(f4);
52 assertOptimized(f4);
53
54 Debug.setListener(null);
OLDNEW
« no previous file with comments | « test/mjsunit/debug-generator-break-on-stack.js ('k') | test/mjsunit/debug-print.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698