| 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 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 6 |
| 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. | 7 #include "vm/globals.h" // Needed here to get TARGET_ARCH_XXX. |
| 6 | 8 |
| 7 #include "vm/flow_graph_compiler.h" | 9 #include "vm/flow_graph_compiler.h" |
| 8 | 10 |
| 9 #include "vm/bit_vector.h" | 11 #include "vm/bit_vector.h" |
| 10 #include "vm/cha.h" | 12 #include "vm/cha.h" |
| 11 #include "vm/compiler.h" | 13 #include "vm/compiler.h" |
| 12 #include "vm/dart_entry.h" | 14 #include "vm/dart_entry.h" |
| 13 #include "vm/debugger.h" | 15 #include "vm/debugger.h" |
| 14 #include "vm/deopt_instructions.h" | 16 #include "vm/deopt_instructions.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 45 "The scale of invocation count, by size of the function."); | 47 "The scale of invocation count, by size of the function."); |
| 46 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment."); | 48 DEFINE_FLAG(bool, source_lines, false, "Emit source line as assembly comment."); |
| 47 DEFINE_FLAG(bool, | 49 DEFINE_FLAG(bool, |
| 48 trace_inlining_intervals, | 50 trace_inlining_intervals, |
| 49 false, | 51 false, |
| 50 "Inlining interval diagnostics"); | 52 "Inlining interval diagnostics"); |
| 51 | 53 |
| 52 DECLARE_FLAG(bool, code_comments); | 54 DECLARE_FLAG(bool, code_comments); |
| 53 DECLARE_FLAG(charp, deoptimize_filter); | 55 DECLARE_FLAG(charp, deoptimize_filter); |
| 54 DECLARE_FLAG(bool, intrinsify); | 56 DECLARE_FLAG(bool, intrinsify); |
| 55 DECLARE_FLAG(bool, propagate_ic_data); | |
| 56 DECLARE_FLAG(int, regexp_optimization_counter_threshold); | 57 DECLARE_FLAG(int, regexp_optimization_counter_threshold); |
| 57 DECLARE_FLAG(int, reoptimization_counter_threshold); | 58 DECLARE_FLAG(int, reoptimization_counter_threshold); |
| 58 DECLARE_FLAG(int, stacktrace_every); | 59 DECLARE_FLAG(int, stacktrace_every); |
| 59 DECLARE_FLAG(charp, stacktrace_filter); | 60 DECLARE_FLAG(charp, stacktrace_filter); |
| 60 DECLARE_FLAG(bool, trace_compiler); | 61 DECLARE_FLAG(bool, trace_compiler); |
| 61 DECLARE_FLAG(int, reload_every); | |
| 62 DECLARE_FLAG(bool, unbox_numeric_fields); | |
| 63 | 62 |
| 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 | 63 |
| 102 #ifdef DART_PRECOMPILED_RUNTIME | 64 #ifdef DART_PRECOMPILED_RUNTIME |
| 103 | 65 |
| 104 COMPILE_ASSERT(!FLAG_collect_code); | 66 COMPILE_ASSERT(!FLAG_collect_code); |
| 105 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests. | 67 COMPILE_ASSERT(!FLAG_deoptimize_alot); // Used in some tests. |
| 106 COMPILE_ASSERT(!FLAG_enable_mirrors); | 68 COMPILE_ASSERT(!FLAG_enable_mirrors); |
| 107 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. |
| 111 COMPILE_ASSERT(FLAG_load_deferred_eagerly); | 72 COMPILE_ASSERT(FLAG_load_deferred_eagerly); |
| 112 | 73 |
| 113 #endif // DART_PRECOMPILED_RUNTIME | 74 #endif // DART_PRECOMPILED_RUNTIME |
| 114 | 75 |
| 115 | 76 |
| 116 // Assign locations to incoming arguments, i.e., values pushed above spill slots | 77 // Assign locations to incoming arguments, i.e., values pushed above spill slots |
| 117 // with PushArgument. Recursively allocates from outermost to innermost | 78 // with PushArgument. Recursively allocates from outermost to innermost |
| (...skipping 1904 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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) |
| OLD | NEW |