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

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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 return CanOptimize() && !parsed_function().function().HasBreakpoint(); 352 return CanOptimize() && !parsed_function().function().HasBreakpoint();
352 } 353 }
353 354
354 355
355 bool FlowGraphCompiler::CanOSRFunction() const { 356 bool FlowGraphCompiler::CanOSRFunction() const {
356 return FLAG_use_osr & CanOptimizeFunction() && !is_optimizing(); 357 return FLAG_use_osr & CanOptimizeFunction() && !is_optimizing();
357 } 358 }
358 359
359 360
360 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const { 361 bool FlowGraphCompiler::ForceSlowPathForStackOverflow() const {
361 if (FLAG_stacktrace_every > 0 || FLAG_deoptimize_every > 0) { 362 if ((FLAG_stacktrace_every > 0) ||
363 (FLAG_deoptimize_every > 0) ||
364 (FLAG_reload_every > 0)) {
362 return true; 365 return true;
363 } 366 }
364 if (FLAG_stacktrace_filter != NULL && 367 if (FLAG_stacktrace_filter != NULL &&
365 strstr(parsed_function().function().ToFullyQualifiedCString(), 368 strstr(parsed_function().function().ToFullyQualifiedCString(),
366 FLAG_stacktrace_filter) != NULL) { 369 FLAG_stacktrace_filter) != NULL) {
367 return true; 370 return true;
368 } 371 }
369 if (is_optimizing() && 372 if (is_optimizing() &&
370 FLAG_deoptimize_filter != NULL && 373 FLAG_deoptimize_filter != NULL &&
371 strstr(parsed_function().function().ToFullyQualifiedCString(), 374 strstr(parsed_function().function().ToFullyQualifiedCString(),
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1992 1995
1993 1996
1994 void FlowGraphCompiler::FrameStateClear() { 1997 void FlowGraphCompiler::FrameStateClear() {
1995 ASSERT(!is_optimizing()); 1998 ASSERT(!is_optimizing());
1996 frame_state_.TruncateTo(0); 1999 frame_state_.TruncateTo(0);
1997 } 2000 }
1998 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 2001 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
1999 2002
2000 2003
2001 } // namespace dart 2004 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698