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

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

Issue 2976723003: Eliminate dependencies on assemblers and code stubs in precompiled runtime. (Closed)
Patch Set: Created 3 years, 5 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 #if !defined(DART_PRECOMPILED_RUNTIME)
6 7
7 #include "vm/flow_graph_compiler.h" 8 #include "vm/flow_graph_compiler.h"
8 9
9 #include "vm/bit_vector.h" 10 #include "vm/bit_vector.h"
10 #include "vm/cha.h" 11 #include "vm/cha.h"
11 #include "vm/compiler.h" 12 #include "vm/compiler.h"
12 #include "vm/dart_entry.h" 13 #include "vm/dart_entry.h"
13 #include "vm/debugger.h" 14 #include "vm/debugger.h"
14 #include "vm/deopt_instructions.h" 15 #include "vm/deopt_instructions.h"
15 #include "vm/exceptions.h" 16 #include "vm/exceptions.h"
(...skipping 29 matching lines...) Expand all
45 "The scale of invocation count, by size of the function."); 46 "The scale of invocation count, by size of the function.");
46 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment."); 47 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment.");
47 DEFINE_FLAG(bool, 48 DEFINE_FLAG(bool,
48 trace_inlining_intervals, 49 trace_inlining_intervals,
49 false, 50 false,
50 "Inlining interval diagnostics"); 51 "Inlining interval diagnostics");
51 52
52 DECLARE_FLAG(bool, code_comments); 53 DECLARE_FLAG(bool, code_comments);
53 DECLARE_FLAG(charp, deoptimize_filter); 54 DECLARE_FLAG(charp, deoptimize_filter);
54 DECLARE_FLAG(bool, intrinsify); 55 DECLARE_FLAG(bool, intrinsify);
55 DECLARE_FLAG(bool, propagate_ic_data);
56 DECLARE_FLAG(int, regexp_optimization_counter_threshold); 56 DECLARE_FLAG(int, regexp_optimization_counter_threshold);
57 DECLARE_FLAG(int, reoptimization_counter_threshold); 57 DECLARE_FLAG(int, reoptimization_counter_threshold);
58 DECLARE_FLAG(int, stacktrace_every); 58 DECLARE_FLAG(int, stacktrace_every);
59 DECLARE_FLAG(charp, stacktrace_filter); 59 DECLARE_FLAG(charp, stacktrace_filter);
60 DECLARE_FLAG(bool, trace_compiler); 60 DECLARE_FLAG(bool, trace_compiler);
61 DECLARE_FLAG(int, reload_every);
62 DECLARE_FLAG(bool, unbox_numeric_fields);
63 61
64 static void PrecompilationModeHandler(bool value) {
65 if (value) {
66 #if defined(TARGET_ARCH_IA32)
67 FATAL("Precompilation not supported on IA32");
68 #endif
69
70 FLAG_background_compilation = false;
71 FLAG_fields_may_be_reset = true;
72 FLAG_interpret_irregexp = true;
73 FLAG_lazy_dispatchers = false;
74 FLAG_link_natives_lazily = true;
75 FLAG_optimization_counter_threshold = -1;
76 FLAG_polymorphic_with_deopt = false;
77 FLAG_precompiled_mode = true;
78 FLAG_reorder_basic_blocks = false;
79 FLAG_use_field_guards = false;
80 FLAG_use_cha_deopt = false;
81 FLAG_unbox_numeric_fields = false;
82
83 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME)
84 // Set flags affecting runtime accordingly for dart_bootstrap.
85 // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME.
86 FLAG_collect_code = false;
87 FLAG_support_debugger = false;
88 FLAG_deoptimize_alot = false; // Used in some tests.
89 FLAG_deoptimize_every = 0; // Used in some tests.
90 FLAG_enable_mirrors = false;
91 FLAG_load_deferred_eagerly = true;
92 FLAG_print_stop_message = false;
93 FLAG_use_osr = false;
94 #endif
95 }
96 }
97
98 DEFINE_FLAG_HANDLER(PrecompilationModeHandler,
99 precompilation,
100 "Precompilation mode");
101 62
102 #ifdef DART_PRECOMPILED_RUNTIME 63 #ifdef DART_PRECOMPILED_RUNTIME
103 64
104 COMPILE_ASSERT(!FLAG_collect_code); 65 COMPILE_ASSERT(!FLAG_collect_code);
105 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests. 66 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests.
106 COMPILE_ASSERT(!FLAG_enable_mirrors); 67 COMPILE_ASSERT(!FLAG_enable_mirrors);
107 COMPILE_ASSERT(FLAG_precompiled_runtime); 68 COMPILE_ASSERT(FLAG_precompiled_runtime);
108 COMPILE_ASSERT(!FLAG_print_stop_message); 69 COMPILE_ASSERT(!FLAG_print_stop_message);
109 COMPILE_ASSERT(!FLAG_use_osr); 70 COMPILE_ASSERT(!FLAG_use_osr);
110 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests. 71 COMPILE_ASSERT(FLAG_deoptimize_every == 0); // Used in some tests.
(...skipping 1911 matching lines...) Expand 10 before | Expand all | Expand 10 after
2022 1983
2023 1984
2024 void FlowGraphCompiler::FrameStateClear() { 1985 void FlowGraphCompiler::FrameStateClear() {
2025 ASSERT(!is_optimizing()); 1986 ASSERT(!is_optimizing());
2026 frame_state_.TruncateTo(0); 1987 frame_state_.TruncateTo(0);
2027 } 1988 }
2028 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC) 1989 #endif // defined(DEBUG) && !defined(TARGET_ARCH_DBC)
2029 1990
2030 1991
2031 } // namespace dart 1992 } // namespace dart
1993
1994 #endif // !defined(DART_PRECOMPILED_RUNTIME)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698