| 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/flow_graph_optimizer.h" | 5 #include "vm/flow_graph_optimizer.h" |
| 6 | 6 |
| 7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
| 8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
| 9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 5804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5815 } | 5815 } |
| 5816 | 5816 |
| 5817 static intptr_t ElementSizeMultiplier(ElementSize size) { | 5817 static intptr_t ElementSizeMultiplier(ElementSize size) { |
| 5818 return 1 << (static_cast<intptr_t>(size) - static_cast<intptr_t>(kInt8)); | 5818 return 1 << (static_cast<intptr_t>(size) - static_cast<intptr_t>(kInt8)); |
| 5819 } | 5819 } |
| 5820 | 5820 |
| 5821 static intptr_t RoundByteOffset(ElementSize size, intptr_t offset) { | 5821 static intptr_t RoundByteOffset(ElementSize size, intptr_t offset) { |
| 5822 return offset & ~(ElementSizeMultiplier(size) - 1); | 5822 return offset & ~(ElementSizeMultiplier(size) - 1); |
| 5823 } | 5823 } |
| 5824 | 5824 |
| 5825 typedef BitField<Kind, 0, 3> KindBits; | 5825 class KindBits : public BitField<uword, Kind, 0, 3> {}; |
| 5826 typedef BitField<Representation, KindBits::kNextBit, 11> RepresentationBits; | 5826 class RepresentationBits : |
| 5827 typedef BitField< | 5827 public BitField<uword, Representation, KindBits::kNextBit, 11> {}; |
| 5828 ElementSize, RepresentationBits::kNextBit, 3> ElementSizeBits; | 5828 class ElementSizeBits : |
| 5829 public BitField<uword, ElementSize, RepresentationBits::kNextBit, 3> {}; |
| 5829 | 5830 |
| 5830 uword flags_; | 5831 uword flags_; |
| 5831 Definition* instance_; | 5832 Definition* instance_; |
| 5832 union { | 5833 union { |
| 5833 intptr_t raw_selector_; | 5834 intptr_t raw_selector_; |
| 5834 const Field* field_; | 5835 const Field* field_; |
| 5835 intptr_t offset_in_bytes_; | 5836 intptr_t offset_in_bytes_; |
| 5836 intptr_t index_constant_; | 5837 intptr_t index_constant_; |
| 5837 Definition* index_; | 5838 Definition* index_; |
| 5838 }; | 5839 }; |
| (...skipping 3007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8846 | 8847 |
| 8847 // Insert materializations at environment uses. | 8848 // Insert materializations at environment uses. |
| 8848 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { | 8849 for (intptr_t i = 0; i < exits_collector_.exits().length(); i++) { |
| 8849 CreateMaterializationAt( | 8850 CreateMaterializationAt( |
| 8850 exits_collector_.exits()[i], alloc, *slots); | 8851 exits_collector_.exits()[i], alloc, *slots); |
| 8851 } | 8852 } |
| 8852 } | 8853 } |
| 8853 | 8854 |
| 8854 | 8855 |
| 8855 } // namespace dart | 8856 } // namespace dart |
| OLD | NEW |