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

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

Issue 1965823002: Initial isolate reload support (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 DECLARE_FLAG(charp, stacktrace_filter); 55 DECLARE_FLAG(charp, stacktrace_filter);
56 DECLARE_FLAG(bool, trace_compiler); 56 DECLARE_FLAG(bool, trace_compiler);
57 DECLARE_FLAG(int, inlining_hotness); 57 DECLARE_FLAG(int, inlining_hotness);
58 DECLARE_FLAG(int, inlining_size_threshold); 58 DECLARE_FLAG(int, inlining_size_threshold);
59 DECLARE_FLAG(int, inlining_callee_size_threshold); 59 DECLARE_FLAG(int, inlining_callee_size_threshold);
60 DECLARE_FLAG(int, inline_getters_setters_smaller_than); 60 DECLARE_FLAG(int, inline_getters_setters_smaller_than);
61 DECLARE_FLAG(int, inlining_depth_threshold); 61 DECLARE_FLAG(int, inlining_depth_threshold);
62 DECLARE_FLAG(int, inlining_caller_size_threshold); 62 DECLARE_FLAG(int, inlining_caller_size_threshold);
63 DECLARE_FLAG(int, inlining_constant_arguments_max_size_threshold); 63 DECLARE_FLAG(int, inlining_constant_arguments_max_size_threshold);
64 DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold); 64 DECLARE_FLAG(int, inlining_constant_arguments_min_size_threshold);
65 DECLARE_FLAG(int, reload_every);
65 66
66 static void PrecompilationModeHandler(bool value) { 67 static void PrecompilationModeHandler(bool value) {
67 if (value) { 68 if (value) {
68 #if defined(TARGET_ARCH_IA32) 69 #if defined(TARGET_ARCH_IA32)
69 FATAL("Precompilation not supported on IA32"); 70 FATAL("Precompilation not supported on IA32");
70 #endif 71 #endif
71 72
72 // Flags affecting compilation only: 73 // Flags affecting compilation only:
73 // There is no counter feedback in precompilation, so ignore the counter 74 // There is no counter feedback in precompilation, so ignore the counter
74 // when making inlining decisions. 75 // when making inlining decisions.
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 return CanOptimize() && !parsed_function().function().HasBreakpoint(); 353 return CanOptimize() && !parsed_function().function().HasBreakpoint();
353 } 354 }
354 355
355 356
356 bool FlowGraphCompiler::CanOSRFunction() const { 357 bool FlowGraphCompiler::CanOSRFunction() const {
357 return FLAG_use_osr & CanOptimizeFunction() && !is_optimizing(); 358 return FLAG_use_osr & CanOptimizeFunction() && !is_optimizing();
358 } 359 }
359 360
360 361
361 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { 362 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
362 if (FLAG_stacktrace_every > 0 || FLAG_deoptimize_every > 0) { 363 if ((FLAG_stacktrace_every > 0) ||
364 (FLAG_deoptimize_every > 0) ||
365 (FLAG_reload_every > 0)) {
363 return true; 366 return true;
364 } 367 }
365 if (FLAG_stacktrace_filter != NULL && 368 if (FLAG_stacktrace_filter != NULL &&
366 strstr(parsed_function().function().ToFullyQualifiedCString(), 369 strstr(parsed_function().function().ToFullyQualifiedCString(),
367 FLAG_stacktrace_filter) != NULL) { 370 FLAG_stacktrace_filter) != NULL) {
368 return true; 371 return true;
369 } 372 }
370 if (is_optimizing() && 373 if (is_optimizing() &&
371 FLAG_deoptimize_filter != NULL && 374 FLAG_deoptimize_filter != NULL &&
372 strstr(parsed_function().function().ToFullyQualifiedCString(), 375 strstr(parsed_function().function().ToFullyQualifiedCString(),
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1993 1996
1994 1997
1995 void FlowGraphCompiler::FrameStateClear() { 1998 void FlowGraphCompiler::FrameStateClear() {
1996 ASSERT(!is_optimizing()); 1999 ASSERT(!is_optimizing());
1997 frame_state_.TruncateTo(0); 2000 frame_state_.TruncateTo(0);
1998 } 2001 }
1999 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 2002 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
2000 2003
2001 2004
2002 } // namespace dart 2005 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698