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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 FLAG_collect_code = false; | 96 FLAG_collect_code = false; |
97 FLAG_load_deferred_eagerly = true; | 97 FLAG_load_deferred_eagerly = true; |
98 FLAG_deoptimize_alot = false; // Used in some tests. | 98 FLAG_deoptimize_alot = false; // Used in some tests. |
99 FLAG_deoptimize_every = 0; // Used in some tests. | 99 FLAG_deoptimize_every = 0; // Used in some tests. |
100 FLAG_guess_other_cid = true; | 100 FLAG_guess_other_cid = true; |
101 Compiler::set_always_optimize(true); | 101 Compiler::set_always_optimize(true); |
102 // Triggers assert if we try to recompile (e.g., because of deferred | 102 // Triggers assert if we try to recompile (e.g., because of deferred |
103 // loading, deoptimization, ...). Noopt mode simulates behavior | 103 // loading, deoptimization, ...). Noopt mode simulates behavior |
104 // of precompiled code, therefore do not allow recompilation. | 104 // of precompiled code, therefore do not allow recompilation. |
105 Compiler::set_allow_recompilation(false); | 105 Compiler::set_allow_recompilation(false); |
106 // TODO(srdjan): Enable CHA deoptimization when eager class finalization is | 106 // Precompilation finalizes all classes and thus allows CHA optimizations. |
107 // implemented, either with precompilation or as a special pass. | 107 // Do not require CHA triggered deoptimization. |
108 FLAG_use_cha_deopt = false; | 108 FLAG_use_cha_deopt = false; |
109 // Calling the PrintStopMessage stub is not supported in precompiled code | 109 // Calling the PrintStopMessage stub is not supported in precompiled code |
110 // since it is done at places where no pool pointer is loaded. | 110 // since it is done at places where no pool pointer is loaded. |
111 FLAG_print_stop_message = false; | 111 FLAG_print_stop_message = false; |
112 | 112 |
113 FLAG_lazy_dispatchers = false; | 113 FLAG_lazy_dispatchers = false; |
114 FLAG_interpret_irregexp = true; | 114 FLAG_interpret_irregexp = true; |
115 FLAG_enable_mirrors = false; | 115 FLAG_enable_mirrors = false; |
116 FLAG_link_natives_lazily = true; | 116 FLAG_link_natives_lazily = true; |
117 FLAG_fields_may_be_reset = true; | 117 FLAG_fields_may_be_reset = true; |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 FrameStateUpdateWith(instr); | 539 FrameStateUpdateWith(instr); |
540 } | 540 } |
541 #endif | 541 #endif |
542 } | 542 } |
543 | 543 |
544 #if defined(DEBUG) | 544 #if defined(DEBUG) |
545 ASSERT(is_optimizing() || FrameStateIsSafeToCall()); | 545 ASSERT(is_optimizing() || FrameStateIsSafeToCall()); |
546 #endif | 546 #endif |
547 } | 547 } |
548 | 548 |
549 if (inline_id_to_function_.length() > max_inlining_id + 1) { | |
550 // TODO(srdjan): Some inlined function can disappear, | |
551 // truncate 'inline_id_to_function_'. | |
552 } | |
553 | |
554 if (is_optimizing()) { | 549 if (is_optimizing()) { |
555 LogBlock lb; | 550 LogBlock lb; |
556 intervals.Add(IntervalStruct(prev_offset, prev_inlining_id)); | 551 intervals.Add(IntervalStruct(prev_offset, prev_inlining_id)); |
557 inlined_code_intervals_ = | 552 inlined_code_intervals_ = |
558 Array::New(intervals.length() * Code::kInlIntNumEntries, Heap::kOld); | 553 Array::New(intervals.length() * Code::kInlIntNumEntries, Heap::kOld); |
559 Smi& start_h = Smi::Handle(); | 554 Smi& start_h = Smi::Handle(); |
560 Smi& caller_inline_id = Smi::Handle(); | 555 Smi& caller_inline_id = Smi::Handle(); |
561 Smi& inline_id = Smi::Handle(); | 556 Smi& inline_id = Smi::Handle(); |
562 for (intptr_t i = 0; i < intervals.length(); i++) { | 557 for (intptr_t i = 0; i < intervals.length(); i++) { |
563 if (FLAG_trace_inlining_intervals && is_optimizing()) { | 558 if (FLAG_trace_inlining_intervals && is_optimizing()) { |
(...skipping 1293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1857 | 1852 |
1858 | 1853 |
1859 void FlowGraphCompiler::FrameStateClear() { | 1854 void FlowGraphCompiler::FrameStateClear() { |
1860 ASSERT(!is_optimizing()); | 1855 ASSERT(!is_optimizing()); |
1861 frame_state_.TruncateTo(0); | 1856 frame_state_.TruncateTo(0); |
1862 } | 1857 } |
1863 #endif | 1858 #endif |
1864 | 1859 |
1865 | 1860 |
1866 } // namespace dart | 1861 } // namespace dart |
OLD | NEW |