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

Side by Side Diff: test/mjsunit/assert-opt-and-deopt.js

Issue 426233002: Land the Fan (disabled) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback, rebase and "git cl format" Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « test/fuzz-natives/fuzz-natives.status ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 */ 130 */
131 OptTracker.prototype.DisableAsserts_ = function(func) { 131 OptTracker.prototype.DisableAsserts_ = function(func) {
132 switch(%GetOptimizationStatus(func)) { 132 switch(%GetOptimizationStatus(func)) {
133 case OptTracker.OptimizationState.YES: 133 case OptTracker.OptimizationState.YES:
134 case OptTracker.OptimizationState.NO: 134 case OptTracker.OptimizationState.NO:
135 return false; 135 return false;
136 case OptTracker.OptimizationState.ALWAYS: 136 case OptTracker.OptimizationState.ALWAYS:
137 case OptTracker.OptimizationState.NEVER: 137 case OptTracker.OptimizationState.NEVER:
138 return true; 138 return true;
139 } 139 }
140 return false; 140 return true;
141 } 141 }
142 // (End of class OptTracker.) 142 // (End of class OptTracker.)
143 143
144 // Example function used by the test below. 144 // Example function used by the test below.
145 function f(a) { 145 function f(a) {
146 return a+1; 146 return a+1;
147 } 147 }
148 148
149 var tracker = new OptTracker(); 149 var tracker = new OptTracker();
150 tracker.CheckpointOptCount(f); 150 tracker.CheckpointOptCount(f);
(...skipping 23 matching lines...) Expand all
174 // Let's trigger optimization for another type. 174 // Let's trigger optimization for another type.
175 for (var i = 0; i < 5; i++) f("a"); 175 for (var i = 0; i < 5; i++) f("a");
176 176
177 %OptimizeFunctionOnNextCall(f); 177 %OptimizeFunctionOnNextCall(f);
178 f("b"); 178 f("b");
179 179
180 tracker.AssertOptCount(f, 2); 180 tracker.AssertOptCount(f, 2);
181 tracker.AssertIsOptimized(f, true); 181 tracker.AssertIsOptimized(f, true);
182 tracker.AssertDeoptHappened(f, true); 182 tracker.AssertDeoptHappened(f, true);
183 tracker.AssertDeoptCount(f, 1); 183 tracker.AssertDeoptCount(f, 1);
OLDNEW
« no previous file with comments | « test/fuzz-natives/fuzz-natives.status ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698