OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/compiler.h" | 5 #include "vm/compiler.h" |
6 | 6 |
7 #include "vm/assembler.h" | 7 #include "vm/assembler.h" |
8 | 8 |
9 #include "vm/ast_printer.h" | 9 #include "vm/ast_printer.h" |
10 #include "vm/block_scheduler.h" | 10 #include "vm/block_scheduler.h" |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 "Trace only optimizing compiler operations."); | 100 "Trace only optimizing compiler operations."); |
101 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); | 101 DEFINE_FLAG(bool, trace_bailout, false, "Print bailout from ssa compiler."); |
102 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); | 102 DEFINE_FLAG(bool, use_inlining, true, "Enable call-site inlining"); |
103 DEFINE_FLAG(bool, | 103 DEFINE_FLAG(bool, |
104 verify_compiler, | 104 verify_compiler, |
105 false, | 105 false, |
106 "Enable compiler verification assertions"); | 106 "Enable compiler verification assertions"); |
107 | 107 |
108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); | 108 DECLARE_FLAG(bool, huge_method_cutoff_in_code_size); |
109 DECLARE_FLAG(bool, trace_failed_optimization_attempts); | 109 DECLARE_FLAG(bool, trace_failed_optimization_attempts); |
| 110 DECLARE_FLAG(bool, unbox_numeric_fields); |
| 111 |
| 112 static void PrecompilationModeHandler(bool value) { |
| 113 if (value) { |
| 114 #if defined(TARGET_ARCH_IA32) |
| 115 FATAL("Precompilation not supported on IA32"); |
| 116 #endif |
| 117 |
| 118 FLAG_background_compilation = false; |
| 119 FLAG_enable_mirrors = false; |
| 120 FLAG_fields_may_be_reset = true; |
| 121 FLAG_interpret_irregexp = true; |
| 122 FLAG_lazy_dispatchers = false; |
| 123 FLAG_link_natives_lazily = true; |
| 124 FLAG_optimization_counter_threshold = -1; |
| 125 FLAG_polymorphic_with_deopt = false; |
| 126 FLAG_precompiled_mode = true; |
| 127 FLAG_reorder_basic_blocks = false; |
| 128 FLAG_use_field_guards = false; |
| 129 FLAG_use_cha_deopt = false; |
| 130 |
| 131 #if !defined(PRODUCT) && !defined(DART_PRECOMPILED_RUNTIME) |
| 132 // Set flags affecting runtime accordingly for dart_bootstrap. |
| 133 // These flags are constants with PRODUCT and DART_PRECOMPILED_RUNTIME. |
| 134 FLAG_collect_code = false; |
| 135 FLAG_deoptimize_alot = false; // Used in some tests. |
| 136 FLAG_deoptimize_every = 0; // Used in some tests. |
| 137 FLAG_load_deferred_eagerly = true; |
| 138 FLAG_print_stop_message = false; |
| 139 FLAG_unbox_numeric_fields = false; |
| 140 FLAG_use_osr = false; |
| 141 #endif |
| 142 } |
| 143 } |
| 144 |
| 145 DEFINE_FLAG_HANDLER(PrecompilationModeHandler, |
| 146 precompilation, |
| 147 "Precompilation mode"); |
110 | 148 |
111 #ifndef DART_PRECOMPILED_RUNTIME | 149 #ifndef DART_PRECOMPILED_RUNTIME |
112 | 150 |
113 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) { | 151 bool UseKernelFrontEndFor(ParsedFunction* parsed_function) { |
114 const Function& function = parsed_function->function(); | 152 const Function& function = parsed_function->function(); |
115 return (function.kernel_offset() > 0) || | 153 return (function.kernel_offset() > 0) || |
116 (function.kind() == RawFunction::kNoSuchMethodDispatcher) || | 154 (function.kind() == RawFunction::kNoSuchMethodDispatcher) || |
117 (function.kind() == RawFunction::kInvokeFieldDispatcher); | 155 (function.kind() == RawFunction::kInvokeFieldDispatcher); |
118 } | 156 } |
119 | 157 |
(...skipping 2162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2282 } | 2320 } |
2283 | 2321 |
2284 bool BackgroundCompiler::IsDisabled() { | 2322 bool BackgroundCompiler::IsDisabled() { |
2285 UNREACHABLE(); | 2323 UNREACHABLE(); |
2286 return true; | 2324 return true; |
2287 } | 2325 } |
2288 | 2326 |
2289 #endif // DART_PRECOMPILED_RUNTIME | 2327 #endif // DART_PRECOMPILED_RUNTIME |
2290 | 2328 |
2291 } // namespace dart | 2329 } // namespace dart |
OLD | NEW |