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/raw_object.h" | 5 #include "vm/raw_object.h" |
6 | 6 |
7 #include "vm/class_table.h" | 7 #include "vm/class_table.h" |
8 #include "vm/dart.h" | 8 #include "vm/dart.h" |
9 #include "vm/freelist.h" | 9 #include "vm/freelist.h" |
10 #include "vm/isolate.h" | 10 #include "vm/isolate.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 case kTypeArgumentsCid: { | 130 case kTypeArgumentsCid: { |
131 const RawTypeArguments* raw_array = | 131 const RawTypeArguments* raw_array = |
132 reinterpret_cast<const RawTypeArguments*>(this); | 132 reinterpret_cast<const RawTypeArguments*>(this); |
133 intptr_t array_length = Smi::Value(raw_array->ptr()->length_); | 133 intptr_t array_length = Smi::Value(raw_array->ptr()->length_); |
134 instance_size = TypeArguments::InstanceSize(array_length); | 134 instance_size = TypeArguments::InstanceSize(array_length); |
135 break; | 135 break; |
136 } | 136 } |
137 case kPcDescriptorsCid: { | 137 case kPcDescriptorsCid: { |
138 const RawPcDescriptors* raw_descriptors = | 138 const RawPcDescriptors* raw_descriptors = |
139 reinterpret_cast<const RawPcDescriptors*>(this); | 139 reinterpret_cast<const RawPcDescriptors*>(this); |
140 intptr_t num_descriptors = raw_descriptors->ptr()->length_; | 140 const intptr_t num_descriptors = raw_descriptors->ptr()->length_; |
141 instance_size = PcDescriptors::InstanceSize(num_descriptors); | 141 const intptr_t rec_size_in_bytes = |
| 142 raw_descriptors->ptr()->record_size_in_bytes_; |
| 143 instance_size = PcDescriptors::InstanceSize(num_descriptors, |
| 144 rec_size_in_bytes); |
142 break; | 145 break; |
143 } | 146 } |
144 case kStackmapCid: { | 147 case kStackmapCid: { |
145 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); | 148 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); |
146 intptr_t length = map->ptr()->length_; | 149 intptr_t length = map->ptr()->length_; |
147 instance_size = Stackmap::InstanceSize(length); | 150 instance_size = Stackmap::InstanceSize(length); |
148 break; | 151 break; |
149 } | 152 } |
150 case kLocalVarDescriptorsCid: { | 153 case kLocalVarDescriptorsCid: { |
151 const RawLocalVarDescriptors* raw_descriptors = | 154 const RawLocalVarDescriptors* raw_descriptors = |
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 if ((pc >= start_pc) && (pc < end_pc)) { | 492 if ((pc >= start_pc) && (pc < end_pc)) { |
490 return true; | 493 return true; |
491 } | 494 } |
492 } | 495 } |
493 return false; | 496 return false; |
494 } | 497 } |
495 | 498 |
496 | 499 |
497 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers( | 500 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers( |
498 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) { | 501 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) { |
499 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_); | 502 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_, |
| 503 raw_obj->ptr()->record_size_in_bytes_); |
500 } | 504 } |
501 | 505 |
502 | 506 |
503 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, | 507 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, |
504 ObjectPointerVisitor* visitor) { | 508 ObjectPointerVisitor* visitor) { |
505 return Stackmap::InstanceSize(raw_obj->ptr()->length_); | 509 return Stackmap::InstanceSize(raw_obj->ptr()->length_); |
506 } | 510 } |
507 | 511 |
508 | 512 |
509 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( | 513 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( |
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
864 intptr_t RawUserTag::VisitUserTagPointers( | 868 intptr_t RawUserTag::VisitUserTagPointers( |
865 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 869 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
866 // Make sure that we got here with the tagged pointer as this. | 870 // Make sure that we got here with the tagged pointer as this. |
867 ASSERT(raw_obj->IsHeapObject()); | 871 ASSERT(raw_obj->IsHeapObject()); |
868 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 872 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
869 return UserTag::InstanceSize(); | 873 return UserTag::InstanceSize(); |
870 } | 874 } |
871 | 875 |
872 | 876 |
873 } // namespace dart | 877 } // namespace dart |
OLD | NEW |