Chromium Code Reviews| OLD | NEW |
|---|---|
| 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" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 12 #include "vm/dart_entry.h" |
| 13 #include "vm/debugger.h" | 13 #include "vm/debugger.h" |
| 14 #include "vm/deopt_instructions.h" | 14 #include "vm/deopt_instructions.h" |
| 15 #include "vm/exceptions.h" | 15 #include "vm/exceptions.h" |
| 16 #include "vm/flags.h" | |
| 16 #include "vm/flow_graph_allocator.h" | 17 #include "vm/flow_graph_allocator.h" |
| 17 #include "vm/il_printer.h" | 18 #include "vm/il_printer.h" |
| 18 #include "vm/intrinsifier.h" | 19 #include "vm/intrinsifier.h" |
| 19 #include "vm/locations.h" | 20 #include "vm/locations.h" |
| 20 #include "vm/log.h" | 21 #include "vm/log.h" |
| 21 #include "vm/longjump.h" | 22 #include "vm/longjump.h" |
| 22 #include "vm/object_store.h" | 23 #include "vm/object_store.h" |
| 23 #include "vm/parser.h" | 24 #include "vm/parser.h" |
| 24 #include "vm/raw_object.h" | 25 #include "vm/raw_object.h" |
| 25 #include "vm/stack_frame.h" | 26 #include "vm/stack_frame.h" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 DECLARE_FLAG(int, optimization_counter_threshold); | 62 DECLARE_FLAG(int, optimization_counter_threshold); |
| 62 DECLARE_FLAG(bool, propagate_ic_data); | 63 DECLARE_FLAG(bool, propagate_ic_data); |
| 63 DECLARE_FLAG(int, regexp_optimization_counter_threshold); | 64 DECLARE_FLAG(int, regexp_optimization_counter_threshold); |
| 64 DECLARE_FLAG(int, reoptimization_counter_threshold); | 65 DECLARE_FLAG(int, reoptimization_counter_threshold); |
| 65 DECLARE_FLAG(int, stacktrace_every); | 66 DECLARE_FLAG(int, stacktrace_every); |
| 66 DECLARE_FLAG(charp, stacktrace_filter); | 67 DECLARE_FLAG(charp, stacktrace_filter); |
| 67 DECLARE_FLAG(bool, use_field_guards); | 68 DECLARE_FLAG(bool, use_field_guards); |
| 68 DECLARE_FLAG(bool, use_cha_deopt); | 69 DECLARE_FLAG(bool, use_cha_deopt); |
| 69 DECLARE_FLAG(bool, use_osr); | 70 DECLARE_FLAG(bool, use_osr); |
| 70 DECLARE_FLAG(bool, print_stop_message); | 71 DECLARE_FLAG(bool, print_stop_message); |
| 71 DECLARE_FLAG(bool, lazy_dispatchers); | |
| 72 DECLARE_FLAG(bool, interpret_irregexp); | 72 DECLARE_FLAG(bool, interpret_irregexp); |
| 73 DECLARE_FLAG(bool, enable_mirrors); | 73 DECLARE_FLAG(bool, enable_mirrors); |
| 74 DECLARE_FLAG(bool, link_natives_lazily); | 74 DECLARE_FLAG(bool, link_natives_lazily); |
| 75 DECLARE_FLAG(bool, trace_compiler); | 75 DECLARE_FLAG(bool, trace_compiler); |
| 76 DECLARE_FLAG(int, inlining_hotness); | 76 DECLARE_FLAG(int, inlining_hotness); |
| 77 DECLARE_FLAG(int, inlining_size_threshold); | 77 DECLARE_FLAG(int, inlining_size_threshold); |
| 78 DECLARE_FLAG(int, inlining_callee_size_threshold); | 78 DECLARE_FLAG(int, inlining_callee_size_threshold); |
| 79 DECLARE_FLAG(int, inline_getters_setters_smaller_than); | 79 DECLARE_FLAG(int, inline_getters_setters_smaller_than); |
| 80 DECLARE_FLAG(int, inlining_depth_threshold); | 80 DECLARE_FLAG(int, inlining_depth_threshold); |
| 81 DECLARE_FLAG(int, inlining_caller_size_threshold); | 81 DECLARE_FLAG(int, inlining_caller_size_threshold); |
| (...skipping 22 matching lines...) Expand all Loading... | |
| 104 FLAG_load_deferred_eagerly = true; | 104 FLAG_load_deferred_eagerly = true; |
| 105 FLAG_deoptimize_alot = false; // Used in some tests. | 105 FLAG_deoptimize_alot = false; // Used in some tests. |
| 106 FLAG_deoptimize_every = 0; // Used in some tests. | 106 FLAG_deoptimize_every = 0; // Used in some tests. |
| 107 // Precompilation finalizes all classes and thus allows CHA optimizations. | 107 // Precompilation finalizes all classes and thus allows CHA optimizations. |
| 108 // Do not require CHA triggered deoptimization. | 108 // Do not require CHA triggered deoptimization. |
| 109 FLAG_use_cha_deopt = false; | 109 FLAG_use_cha_deopt = false; |
| 110 // Calling the PrintStopMessage stub is not supported in precompiled code | 110 // Calling the PrintStopMessage stub is not supported in precompiled code |
| 111 // since it is done at places where no pool pointer is loaded. | 111 // since it is done at places where no pool pointer is loaded. |
| 112 FLAG_print_stop_message = false; | 112 FLAG_print_stop_message = false; |
| 113 | 113 |
| 114 FLAG_lazy_dispatchers = false; | |
| 115 FLAG_interpret_irregexp = true; | 114 FLAG_interpret_irregexp = true; |
| 116 FLAG_enable_mirrors = false; | 115 FLAG_enable_mirrors = false; |
| 117 FLAG_link_natives_lazily = true; | 116 FLAG_link_natives_lazily = true; |
| 118 FLAG_fields_may_be_reset = true; | 117 FLAG_fields_may_be_reset = true; |
| 119 FLAG_allow_absolute_addresses = false; | 118 FLAG_allow_absolute_addresses = false; |
| 120 | 119 |
| 121 // There is no counter feedback in precompilation, so ignore the counter | 120 // There is no counter feedback in precompilation, so ignore the counter |
| 122 // when making inlining decisions. | 121 // when making inlining decisions. |
| 123 FLAG_inlining_hotness = 0; | 122 FLAG_inlining_hotness = 0; |
| 124 // Use smaller thresholds in precompilation as we are compiling everything | 123 // Use smaller thresholds in precompilation as we are compiling everything |
| 125 // with the optimizing compiler instead of only hot functions. | 124 // with the optimizing compiler instead of only hot functions. |
| 126 FLAG_inlining_size_threshold = 5; | 125 FLAG_inlining_size_threshold = 5; |
| 127 FLAG_inline_getters_setters_smaller_than = 5; | 126 FLAG_inline_getters_setters_smaller_than = 5; |
| 128 FLAG_inlining_callee_size_threshold = 20; | 127 FLAG_inlining_callee_size_threshold = 20; |
| 129 FLAG_inlining_depth_threshold = 2; | 128 FLAG_inlining_depth_threshold = 2; |
| 130 FLAG_inlining_caller_size_threshold = 1000; | 129 FLAG_inlining_caller_size_threshold = 1000; |
| 131 | 130 |
| 132 FLAG_inlining_constant_arguments_max_size_threshold = 100; | 131 FLAG_inlining_constant_arguments_max_size_threshold = 100; |
| 133 FLAG_inlining_constant_arguments_min_size_threshold = 30; | 132 FLAG_inlining_constant_arguments_min_size_threshold = 30; |
| 134 | 133 |
| 135 // Background compilation relies on two-stage compilation pipeline, | 134 // Background compilation relies on two-stage compilation pipeline, |
| 136 // while precompilation has only one. | 135 // while precompilation has only one. |
| 137 FLAG_background_compilation = false; | 136 FLAG_background_compilation = false; |
| 138 FLAG_collect_dynamic_function_names = true; | 137 FLAG_collect_dynamic_function_names = true; |
| 138 #if !defined(DART_PRECOMPILED_RUNTIME) | |
| 139 FLAG_lazy_dispatchers = false; | |
| 140 #else | |
| 141 ASSERT(!FLAG_lazy_dispatchers); | |
|
rmacnak
2016/02/19 00:54:31
COMPILE_ASSERT ?
Florian Schneider
2016/02/19 17:42:29
Done.
| |
| 142 #endif | |
| 139 } | 143 } |
| 140 } | 144 } |
| 141 | 145 |
| 142 | 146 |
| 143 DEFINE_FLAG_HANDLER(PrecompilationModeHandler, | 147 DEFINE_FLAG_HANDLER(PrecompilationModeHandler, |
| 144 precompilation, | 148 precompilation, |
| 145 "Precompilation mode"); | 149 "Precompilation mode"); |
| 146 | 150 |
| 147 | 151 |
| 148 // Assign locations to incoming arguments, i.e., values pushed above spill slots | 152 // Assign locations to incoming arguments, i.e., values pushed above spill slots |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1872 | 1876 |
| 1873 | 1877 |
| 1874 void FlowGraphCompiler::FrameStateClear() { | 1878 void FlowGraphCompiler::FrameStateClear() { |
| 1875 ASSERT(!is_optimizing()); | 1879 ASSERT(!is_optimizing()); |
| 1876 frame_state_.TruncateTo(0); | 1880 frame_state_.TruncateTo(0); |
| 1877 } | 1881 } |
| 1878 #endif | 1882 #endif |
| 1879 | 1883 |
| 1880 | 1884 |
| 1881 } // namespace dart | 1885 } // namespace dart |
| OLD | NEW |