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" |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 168 parsed_function_(parsed_function), | 168 parsed_function_(parsed_function), |
| 169 flow_graph_(*flow_graph), | 169 flow_graph_(*flow_graph), |
| 170 block_order_(*flow_graph->CodegenBlockOrder(is_optimizing)), | 170 block_order_(*flow_graph->CodegenBlockOrder(is_optimizing)), |
| 171 current_block_(NULL), | 171 current_block_(NULL), |
| 172 exception_handlers_list_(NULL), | 172 exception_handlers_list_(NULL), |
| 173 pc_descriptors_list_(NULL), | 173 pc_descriptors_list_(NULL), |
| 174 stackmap_table_builder_(NULL), | 174 stackmap_table_builder_(NULL), |
| 175 block_info_(block_order_.length()), | 175 block_info_(block_order_.length()), |
| 176 deopt_infos_(), | 176 deopt_infos_(), |
| 177 static_calls_target_table_(GrowableObjectArray::ZoneHandle( | 177 static_calls_target_table_(GrowableObjectArray::ZoneHandle( |
| 178 GrowableObjectArray::New())), | 178 GrowableObjectArray::New(Heap::kOld))), |
|
srdjan
2015/08/19 18:29:34
This is a temporary fix. Please add: TODO(srdjan):
koda
2015/08/19 18:44:28
OK, although it doesn't look temporary to me. It's
srdjan
2015/08/19 19:46:50
There is still 'garbage' created by the GrowableOb
| |
| 179 is_optimizing_(is_optimizing), | 179 is_optimizing_(is_optimizing), |
| 180 may_reoptimize_(false), | 180 may_reoptimize_(false), |
| 181 intrinsic_mode_(false), | 181 intrinsic_mode_(false), |
| 182 double_class_(Class::ZoneHandle( | 182 double_class_(Class::ZoneHandle( |
| 183 isolate_->object_store()->double_class())), | 183 isolate_->object_store()->double_class())), |
| 184 mint_class_(Class::ZoneHandle( | 184 mint_class_(Class::ZoneHandle( |
| 185 isolate_->object_store()->mint_class())), | 185 isolate_->object_store()->mint_class())), |
| 186 float32x4_class_(Class::ZoneHandle( | 186 float32x4_class_(Class::ZoneHandle( |
| 187 isolate_->object_store()->float32x4_class())), | 187 isolate_->object_store()->float32x4_class())), |
| 188 float64x2_class_(Class::ZoneHandle( | 188 float64x2_class_(Class::ZoneHandle( |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 509 ASSERT(is_optimizing() || FrameStateIsSafeToCall()); | 509 ASSERT(is_optimizing() || FrameStateIsSafeToCall()); |
| 510 #endif | 510 #endif |
| 511 } | 511 } |
| 512 | 512 |
| 513 if (inline_id_to_function_.length() > max_inlining_id + 1) { | 513 if (inline_id_to_function_.length() > max_inlining_id + 1) { |
| 514 // TODO(srdjan): Some inlined function can disappear, | 514 // TODO(srdjan): Some inlined function can disappear, |
| 515 // truncate 'inline_id_to_function_'. | 515 // truncate 'inline_id_to_function_'. |
| 516 } | 516 } |
| 517 | 517 |
| 518 if (is_optimizing()) { | 518 if (is_optimizing()) { |
| 519 LogBlock lb(Isolate::Current()); | 519 LogBlock lb(Thread::Current()); |
| 520 intervals.Add(IntervalStruct(prev_offset, prev_inlining_id)); | 520 intervals.Add(IntervalStruct(prev_offset, prev_inlining_id)); |
| 521 inlined_code_intervals_ = | 521 inlined_code_intervals_ = |
| 522 Array::New(intervals.length() * Code::kInlIntNumEntries, Heap::kOld); | 522 Array::New(intervals.length() * Code::kInlIntNumEntries, Heap::kOld); |
| 523 Smi& start_h = Smi::Handle(); | 523 Smi& start_h = Smi::Handle(); |
| 524 Smi& caller_inline_id = Smi::Handle(); | 524 Smi& caller_inline_id = Smi::Handle(); |
| 525 Smi& inline_id = Smi::Handle(); | 525 Smi& inline_id = Smi::Handle(); |
| 526 for (intptr_t i = 0; i < intervals.length(); i++) { | 526 for (intptr_t i = 0; i < intervals.length(); i++) { |
| 527 if (FLAG_trace_inlining_intervals && is_optimizing()) { | 527 if (FLAG_trace_inlining_intervals && is_optimizing()) { |
| 528 const Function& function = | 528 const Function& function = |
| 529 *inline_id_to_function_.At(intervals[i].inlining_id); | 529 *inline_id_to_function_.At(intervals[i].inlining_id); |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1818 | 1818 |
| 1819 | 1819 |
| 1820 void FlowGraphCompiler::FrameStateClear() { | 1820 void FlowGraphCompiler::FrameStateClear() { |
| 1821 ASSERT(!is_optimizing()); | 1821 ASSERT(!is_optimizing()); |
| 1822 frame_state_.TruncateTo(0); | 1822 frame_state_.TruncateTo(0); |
| 1823 } | 1823 } |
| 1824 #endif | 1824 #endif |
| 1825 | 1825 |
| 1826 | 1826 |
| 1827 } // namespace dart | 1827 } // namespace dart |
| OLD | NEW |