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

Side by Side Diff: test/mjsunit/regress/regress-2618.js

Issue 2654733004: [tests] Make assertOptimized()/assertUnoptimized() great again. (Closed)
Patch Set: Created 3 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 18 matching lines...) Expand all
29 29
30 function f() { 30 function f() {
31 do { 31 do {
32 do { 32 do {
33 for (var i = 0; i < 10; i++) %OptimizeOsr(); 33 for (var i = 0; i < 10; i++) %OptimizeOsr();
34 } while (false); 34 } while (false);
35 } while (false); 35 } while (false);
36 } 36 }
37 37
38 f(); 38 f();
39 assertTrue(%GetOptimizationCount(f) > 0 || %GetOptimizationStatus(f) == 4); 39 assertTrue(%GetOptimizationCount(f) > 0 ||
40 (%GetOptimizationStatus(f) & V8OptimizationStatus.kNever) !== 0);
40 41
41 function g() { 42 function g() {
42 for (var i = 0; i < 1; i++) { } 43 for (var i = 0; i < 1; i++) { }
43 44
44 do { 45 do {
45 do { 46 do {
46 for (var i = 0; i < 1; i++) { } 47 for (var i = 0; i < 1; i++) { }
47 } while (false); 48 } while (false);
48 } while (false); 49 } while (false);
49 50
(...skipping 10 matching lines...) Expand all
60 } while (false); 61 } while (false);
61 } while (false); 62 } while (false);
62 } while (false); 63 } while (false);
63 } while (false); 64 } while (false);
64 } while (false); 65 } while (false);
65 } while (false); 66 } while (false);
66 } while (false); 67 } while (false);
67 } 68 }
68 69
69 g(); 70 g();
70 assertTrue(%GetOptimizationCount(g) > 0 || %GetOptimizationStatus(g) == 4); 71 assertTrue(%GetOptimizationCount(g) > 0 ||
72 (%GetOptimizationStatus(g) & V8OptimizationStatus.kNever) !== 0);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698