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

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

Issue 1327383002: Don't optimize away static field initialization when precompiling. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 "Inlining interval diagnostics"); 44 "Inlining interval diagnostics");
45 DEFINE_FLAG(bool, use_megamorphic_stub, true, "Out of line megamorphic lookup"); 45 DEFINE_FLAG(bool, use_megamorphic_stub, true, "Out of line megamorphic lookup");
46 46
47 DECLARE_FLAG(bool, code_comments); 47 DECLARE_FLAG(bool, code_comments);
48 DECLARE_FLAG(bool, deoptimize_alot); 48 DECLARE_FLAG(bool, deoptimize_alot);
49 DECLARE_FLAG(int, deoptimize_every); 49 DECLARE_FLAG(int, deoptimize_every);
50 DECLARE_FLAG(charp, deoptimize_filter); 50 DECLARE_FLAG(charp, deoptimize_filter);
51 DECLARE_FLAG(bool, disassemble); 51 DECLARE_FLAG(bool, disassemble);
52 DECLARE_FLAG(bool, disassemble_optimized); 52 DECLARE_FLAG(bool, disassemble_optimized);
53 DECLARE_FLAG(bool, emit_edge_counters); 53 DECLARE_FLAG(bool, emit_edge_counters);
54 DECLARE_FLAG(bool, fields_may_be_reset);
54 DECLARE_FLAG(bool, guess_other_cid); 55 DECLARE_FLAG(bool, guess_other_cid);
55 DECLARE_FLAG(bool, ic_range_profiling); 56 DECLARE_FLAG(bool, ic_range_profiling);
56 DECLARE_FLAG(bool, intrinsify); 57 DECLARE_FLAG(bool, intrinsify);
57 DECLARE_FLAG(bool, load_deferred_eagerly); 58 DECLARE_FLAG(bool, load_deferred_eagerly);
58 DECLARE_FLAG(int, optimization_counter_threshold); 59 DECLARE_FLAG(int, optimization_counter_threshold);
59 DECLARE_FLAG(bool, propagate_ic_data); 60 DECLARE_FLAG(bool, propagate_ic_data);
60 DECLARE_FLAG(int, regexp_optimization_counter_threshold); 61 DECLARE_FLAG(int, regexp_optimization_counter_threshold);
61 DECLARE_FLAG(int, reoptimization_counter_threshold); 62 DECLARE_FLAG(int, reoptimization_counter_threshold);
62 DECLARE_FLAG(int, stacktrace_every); 63 DECLARE_FLAG(int, stacktrace_every);
63 DECLARE_FLAG(charp, stacktrace_filter); 64 DECLARE_FLAG(charp, stacktrace_filter);
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 DECLARE_FLAG(bool, link_natives_lazily); 114 DECLARE_FLAG(bool, link_natives_lazily);
114 115
115 static void PrecompileModeHandler(bool value) { 116 static void PrecompileModeHandler(bool value) {
116 if (value) { 117 if (value) {
117 NooptModeHandler(true); 118 NooptModeHandler(true);
118 FLAG_lazy_dispatchers = false; 119 FLAG_lazy_dispatchers = false;
119 FLAG_interpret_irregexp = true; 120 FLAG_interpret_irregexp = true;
120 FLAG_enable_mirrors = false; 121 FLAG_enable_mirrors = false;
121 FLAG_precompile_collect_closures = true; 122 FLAG_precompile_collect_closures = true;
122 FLAG_link_natives_lazily = true; 123 FLAG_link_natives_lazily = true;
124 FLAG_fields_may_be_reset = true;
123 } 125 }
124 } 126 }
125 127
126 128
127 DEFINE_FLAG_HANDLER(PrecompileModeHandler, 129 DEFINE_FLAG_HANDLER(PrecompileModeHandler,
128 precompile, 130 precompile,
129 "Precompilation mode"); 131 "Precompilation mode");
130 132
131 133
132 // Assign locations to incoming arguments, i.e., values pushed above spill slots 134 // Assign locations to incoming arguments, i.e., values pushed above spill slots
(...skipping 1699 matching lines...) Expand 10 before | Expand all | Expand 10 after
1832 1834
1833 1835
1834 void FlowGraphCompiler::FrameStateClear() { 1836 void FlowGraphCompiler::FrameStateClear() {
1835 ASSERT(!is_optimizing()); 1837 ASSERT(!is_optimizing());
1836 frame_state_.TruncateTo(0); 1838 frame_state_.TruncateTo(0);
1837 } 1839 }
1838 #endif 1840 #endif
1839 1841
1840 1842
1841 } // namespace dart 1843 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698