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

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

Powered by Google App Engine
This is Rietveld 408576698