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

Side by Side Diff: runtime/vm/flow_graph_compiler.cc

Issue 2728163002: VM: Make use_osr an Isolate flag, similar to how we made use_field_guards. (Closed)
Patch Set: Created 3 years, 9 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 (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX.
6 6
7 #include "vm/flow_graph_compiler.h" 7 #include "vm/flow_graph_compiler.h"
8 8
9 #include "vm/bit_vector.h" 9 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 10 #include "vm/cha.h"
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 return FLAG_optimization_counter_threshold >= 0; 326 return FLAG_optimization_counter_threshold >= 0;
327 } 327 }
328 328
329 329
330 bool FlowGraphCompiler::CanOptimizeFunction() const { 330 bool FlowGraphCompiler::CanOptimizeFunction() const {
331 return CanOptimize() && !parsed_function().function().HasBreakpoint(); 331 return CanOptimize() && !parsed_function().function().HasBreakpoint();
332 } 332 }
333 333
334 334
335 bool FlowGraphCompiler::CanOSRFunction() const { 335 bool FlowGraphCompiler::CanOSRFunction() const {
336 return FLAG_use_osr & CanOptimizeFunction() && !is_optimizing(); 336 return isolate()->use_osr() && CanOptimizeFunction() && !is_optimizing();
337 } 337 }
338 338
339 339
340 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { 340 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
341 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) || 341 if ((FLAG_stacktrace_every > 0) || (FLAG_deoptimize_every > 0) ||
342 (isolate()->reload_every_n_stack_overflow_checks() > 0)) { 342 (isolate()->reload_every_n_stack_overflow_checks() > 0)) {
343 return true; 343 return true;
344 } 344 }
345 if (FLAG_stacktrace_filter != NULL && 345 if (FLAG_stacktrace_filter != NULL &&
346 strstr(parsed_function().function().ToFullyQualifiedCString(), 346 strstr(parsed_function().function().ToFullyQualifiedCString(),
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after
1886 1886
1887 1887
1888 void FlowGraphCompiler::FrameStateClear() { 1888 void FlowGraphCompiler::FrameStateClear() {
1889 ASSERT(!is_optimizing()); 1889 ASSERT(!is_optimizing());
1890 frame_state_.TruncateTo(0); 1890 frame_state_.TruncateTo(0);
1891 } 1891 }
1892 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1892 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1893 1893
1894 1894
1895 } // namespace dart 1895 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698