| 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 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 DeoptInfoBuilder builder(zone(), incoming_arg_count); | 855 DeoptInfoBuilder builder(zone(), incoming_arg_count); |
| 856 | 856 |
| 857 intptr_t deopt_info_table_size = DeoptTable::SizeFor(deopt_infos_.length()); | 857 intptr_t deopt_info_table_size = DeoptTable::SizeFor(deopt_infos_.length()); |
| 858 if (deopt_info_table_size == 0) { | 858 if (deopt_info_table_size == 0) { |
| 859 code.set_deopt_info_array(Object::empty_array()); | 859 code.set_deopt_info_array(Object::empty_array()); |
| 860 code.set_object_table(Object::empty_array()); | 860 code.set_object_table(Object::empty_array()); |
| 861 } else { | 861 } else { |
| 862 const Array& array = | 862 const Array& array = |
| 863 Array::Handle(Array::New(deopt_info_table_size, Heap::kOld)); | 863 Array::Handle(Array::New(deopt_info_table_size, Heap::kOld)); |
| 864 Smi& offset = Smi::Handle(); | 864 Smi& offset = Smi::Handle(); |
| 865 DeoptInfo& info = DeoptInfo::Handle(); | 865 TypedData& info = TypedData::Handle(); |
| 866 Smi& reason_and_flags = Smi::Handle(); | 866 Smi& reason_and_flags = Smi::Handle(); |
| 867 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { | 867 for (intptr_t i = 0; i < deopt_infos_.length(); i++) { |
| 868 offset = Smi::New(deopt_infos_[i]->pc_offset()); | 868 offset = Smi::New(deopt_infos_[i]->pc_offset()); |
| 869 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); | 869 info = deopt_infos_[i]->CreateDeoptInfo(this, &builder, array); |
| 870 reason_and_flags = DeoptTable::EncodeReasonAndFlags( | 870 reason_and_flags = DeoptTable::EncodeReasonAndFlags( |
| 871 deopt_infos_[i]->reason(), | 871 deopt_infos_[i]->reason(), |
| 872 deopt_infos_[i]->flags()); | 872 deopt_infos_[i]->flags()); |
| 873 DeoptTable::SetEntry(array, i, offset, info, reason_and_flags); | 873 DeoptTable::SetEntry(array, i, offset, info, reason_and_flags); |
| 874 } | 874 } |
| 875 code.set_deopt_info_array(array); | 875 code.set_deopt_info_array(array); |
| (...skipping 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1680 | 1680 |
| 1681 | 1681 |
| 1682 void FlowGraphCompiler::FrameStateClear() { | 1682 void FlowGraphCompiler::FrameStateClear() { |
| 1683 ASSERT(!is_optimizing()); | 1683 ASSERT(!is_optimizing()); |
| 1684 frame_state_.TruncateTo(0); | 1684 frame_state_.TruncateTo(0); |
| 1685 } | 1685 } |
| 1686 #endif | 1686 #endif |
| 1687 | 1687 |
| 1688 | 1688 |
| 1689 } // namespace dart | 1689 } // namespace dart |
| OLD | NEW |