| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/code_descriptors.h" | 5 #include "vm/code_descriptors.h" |
| 6 | 6 |
| 7 namespace dart { | 7 namespace dart { |
| 8 | 8 |
| 9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind, | 9 void DescriptorList::AddDescriptor(PcDescriptors::Kind kind, |
| 10 intptr_t pc_offset, | 10 intptr_t pc_offset, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 TryIndex(i)); | 34 TryIndex(i)); |
| 35 } | 35 } |
| 36 return descriptors.raw(); | 36 return descriptors.raw(); |
| 37 } | 37 } |
| 38 | 38 |
| 39 | 39 |
| 40 void StackmapTableBuilder::AddEntry(intptr_t pc_offset, | 40 void StackmapTableBuilder::AddEntry(intptr_t pc_offset, |
| 41 BitmapBuilder* bitmap, | 41 BitmapBuilder* bitmap, |
| 42 intptr_t register_bit_count) { | 42 intptr_t register_bit_count) { |
| 43 stack_map_ = Stackmap::New(pc_offset, bitmap, register_bit_count); | 43 stack_map_ = Stackmap::New(pc_offset, bitmap, register_bit_count); |
| 44 list_.Add(stack_map_); | 44 list_.Add(stack_map_, Heap::kOld); |
| 45 } | 45 } |
| 46 | 46 |
| 47 | 47 |
| 48 bool StackmapTableBuilder::Verify() { | 48 bool StackmapTableBuilder::Verify() { |
| 49 intptr_t num_entries = Length(); | 49 intptr_t num_entries = Length(); |
| 50 Stackmap& map1 = Stackmap::Handle(); | 50 Stackmap& map1 = Stackmap::Handle(); |
| 51 Stackmap& map2 = Stackmap::Handle(); | 51 Stackmap& map2 = Stackmap::Handle(); |
| 52 for (intptr_t i = 1; i < num_entries; i++) { | 52 for (intptr_t i = 1; i < num_entries; i++) { |
| 53 map1 = MapAt(i - 1); | 53 map1 = MapAt(i - 1); |
| 54 map2 = MapAt(i); | 54 map2 = MapAt(i); |
| (...skipping 22 matching lines...) Expand all Loading... |
| 77 } | 77 } |
| 78 | 78 |
| 79 | 79 |
| 80 RawStackmap* StackmapTableBuilder::MapAt(int index) const { | 80 RawStackmap* StackmapTableBuilder::MapAt(int index) const { |
| 81 Stackmap& map = Stackmap::Handle(); | 81 Stackmap& map = Stackmap::Handle(); |
| 82 map ^= list_.At(index); | 82 map ^= list_.At(index); |
| 83 return map.raw(); | 83 return map.raw(); |
| 84 } | 84 } |
| 85 | 85 |
| 86 } // namespace dart | 86 } // namespace dart |
| OLD | NEW |