| 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" |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 60 DECLARE_FLAG(int, regexp_optimization_counter_threshold); | 60 DECLARE_FLAG(int, regexp_optimization_counter_threshold); |
| 61 DECLARE_FLAG(int, reoptimization_counter_threshold); | 61 DECLARE_FLAG(int, reoptimization_counter_threshold); |
| 62 DECLARE_FLAG(int, stacktrace_every); | 62 DECLARE_FLAG(int, stacktrace_every); |
| 63 DECLARE_FLAG(charp, stacktrace_filter); | 63 DECLARE_FLAG(charp, stacktrace_filter); |
| 64 DECLARE_FLAG(bool, support_debugger); | 64 DECLARE_FLAG(bool, support_debugger); |
| 65 DECLARE_FLAG(bool, use_field_guards); | 65 DECLARE_FLAG(bool, use_field_guards); |
| 66 DECLARE_FLAG(bool, use_cha_deopt); | 66 DECLARE_FLAG(bool, use_cha_deopt); |
| 67 DECLARE_FLAG(bool, use_osr); | 67 DECLARE_FLAG(bool, use_osr); |
| 68 DECLARE_FLAG(bool, warn_on_javascript_compatibility); | 68 DECLARE_FLAG(bool, warn_on_javascript_compatibility); |
| 69 DECLARE_FLAG(bool, precompile_collect_closures); | 69 DECLARE_FLAG(bool, precompile_collect_closures); |
| 70 DECLARE_FLAG(bool, print_stop_message); |
| 70 | 71 |
| 71 | 72 |
| 72 static void NooptModeHandler(bool value) { | 73 static void NooptModeHandler(bool value) { |
| 73 if (value) { | 74 if (value) { |
| 74 FLAG_always_megamorphic_calls = true; | 75 FLAG_always_megamorphic_calls = true; |
| 75 FLAG_polymorphic_with_deopt = false; | 76 FLAG_polymorphic_with_deopt = false; |
| 76 FLAG_optimization_counter_threshold = -1; | 77 FLAG_optimization_counter_threshold = -1; |
| 77 FLAG_use_field_guards = false; | 78 FLAG_use_field_guards = false; |
| 78 FLAG_use_osr = false; | 79 FLAG_use_osr = false; |
| 79 FLAG_emit_edge_counters = false; | 80 FLAG_emit_edge_counters = false; |
| 80 FLAG_support_debugger = false; | 81 FLAG_support_debugger = false; |
| 81 FLAG_ic_range_profiling = false; | 82 FLAG_ic_range_profiling = false; |
| 82 FLAG_collect_code = false; | 83 FLAG_collect_code = false; |
| 83 FLAG_load_deferred_eagerly = true; | 84 FLAG_load_deferred_eagerly = true; |
| 84 FLAG_deoptimize_alot = false; // Used in some tests. | 85 FLAG_deoptimize_alot = false; // Used in some tests. |
| 85 FLAG_deoptimize_every = 0; // Used in some tests. | 86 FLAG_deoptimize_every = 0; // Used in some tests. |
| 86 FLAG_guess_other_cid = true; | 87 FLAG_guess_other_cid = true; |
| 87 Compiler::set_always_optimize(true); | 88 Compiler::set_always_optimize(true); |
| 88 // Triggers assert if we try to recompile (e.g., because of deferred | 89 // Triggers assert if we try to recompile (e.g., because of deferred |
| 89 // loading, deoptimization, ...). Noopt mode simulates behavior | 90 // loading, deoptimization, ...). Noopt mode simulates behavior |
| 90 // of precompiled code, therefore do not allow recompilation. | 91 // of precompiled code, therefore do not allow recompilation. |
| 91 Compiler::set_allow_recompilation(false); | 92 Compiler::set_allow_recompilation(false); |
| 92 // TODO(srdjan): Enable CHA deoptimization when eager class finalization is | 93 // TODO(srdjan): Enable CHA deoptimization when eager class finalization is |
| 93 // implemented, either with precompilation or as a special pass. | 94 // implemented, either with precompilation or as a special pass. |
| 94 FLAG_use_cha_deopt = false; | 95 FLAG_use_cha_deopt = false; |
| 96 // Calling the PrintStopMessage stub is not supported in precompiled code |
| 97 // since it is done at places where no pool pointer is loaded. |
| 98 FLAG_print_stop_message = false; |
| 95 } | 99 } |
| 96 } | 100 } |
| 97 | 101 |
| 98 | 102 |
| 99 // --noopt disables optimizer and tunes unoptimized code to run as fast | 103 // --noopt disables optimizer and tunes unoptimized code to run as fast |
| 100 // as possible. | 104 // as possible. |
| 101 DEFINE_FLAG_HANDLER(NooptModeHandler, | 105 DEFINE_FLAG_HANDLER(NooptModeHandler, |
| 102 noopt, | 106 noopt, |
| 103 "Run fast unoptimized code only."); | 107 "Run fast unoptimized code only."); |
| 104 | 108 |
| (...skipping 1717 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1822 | 1826 |
| 1823 | 1827 |
| 1824 void FlowGraphCompiler::FrameStateClear() { | 1828 void FlowGraphCompiler::FrameStateClear() { |
| 1825 ASSERT(!is_optimizing()); | 1829 ASSERT(!is_optimizing()); |
| 1826 frame_state_.TruncateTo(0); | 1830 frame_state_.TruncateTo(0); |
| 1827 } | 1831 } |
| 1828 #endif | 1832 #endif |
| 1829 | 1833 |
| 1830 | 1834 |
| 1831 } // namespace dart | 1835 } // namespace dart |
| OLD | NEW |