| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 instance_size = TypeArguments::InstanceSize(array_length); | 137 instance_size = TypeArguments::InstanceSize(array_length); |
| 138 break; | 138 break; |
| 139 } | 139 } |
| 140 case kPcDescriptorsCid: { | 140 case kPcDescriptorsCid: { |
| 141 const RawPcDescriptors* raw_descriptors = | 141 const RawPcDescriptors* raw_descriptors = |
| 142 reinterpret_cast<const RawPcDescriptors*>(this); | 142 reinterpret_cast<const RawPcDescriptors*>(this); |
| 143 intptr_t length = raw_descriptors->ptr()->length_; | 143 intptr_t length = raw_descriptors->ptr()->length_; |
| 144 instance_size = PcDescriptors::InstanceSize(length); | 144 instance_size = PcDescriptors::InstanceSize(length); |
| 145 break; | 145 break; |
| 146 } | 146 } |
| 147 case kCodeSourceMapCid: { |
| 148 const RawCodeSourceMap* raw_code_source_map = |
| 149 reinterpret_cast<const RawCodeSourceMap*>(this); |
| 150 intptr_t length = raw_code_source_map->ptr()->length_; |
| 151 instance_size = CodeSourceMap::InstanceSize(length); |
| 152 break; |
| 153 } |
| 147 case kStackmapCid: { | 154 case kStackmapCid: { |
| 148 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); | 155 const RawStackmap* map = reinterpret_cast<const RawStackmap*>(this); |
| 149 intptr_t length = map->ptr()->length_; | 156 intptr_t length = map->ptr()->length_; |
| 150 instance_size = Stackmap::InstanceSize(length); | 157 instance_size = Stackmap::InstanceSize(length); |
| 151 break; | 158 break; |
| 152 } | 159 } |
| 153 case kLocalVarDescriptorsCid: { | 160 case kLocalVarDescriptorsCid: { |
| 154 const RawLocalVarDescriptors* raw_descriptors = | 161 const RawLocalVarDescriptors* raw_descriptors = |
| 155 reinterpret_cast<const RawLocalVarDescriptors*>(this); | 162 reinterpret_cast<const RawLocalVarDescriptors*>(this); |
| 156 intptr_t num_descriptors = raw_descriptors->ptr()->num_entries_; | 163 intptr_t num_descriptors = raw_descriptors->ptr()->num_entries_; |
| (...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 return (pc >= start_pc) && (pc < end_pc); | 589 return (pc >= start_pc) && (pc < end_pc); |
| 583 } | 590 } |
| 584 | 591 |
| 585 | 592 |
| 586 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers( | 593 intptr_t RawPcDescriptors::VisitPcDescriptorsPointers( |
| 587 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) { | 594 RawPcDescriptors* raw_obj, ObjectPointerVisitor* visitor) { |
| 588 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_); | 595 return PcDescriptors::InstanceSize(raw_obj->ptr()->length_); |
| 589 } | 596 } |
| 590 | 597 |
| 591 | 598 |
| 599 intptr_t RawCodeSourceMap::VisitCodeSourceMapPointers( |
| 600 RawCodeSourceMap* raw_obj, ObjectPointerVisitor* visitor) { |
| 601 return CodeSourceMap::InstanceSize(raw_obj->ptr()->length_); |
| 602 } |
| 603 |
| 604 |
| 592 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, | 605 intptr_t RawStackmap::VisitStackmapPointers(RawStackmap* raw_obj, |
| 593 ObjectPointerVisitor* visitor) { | 606 ObjectPointerVisitor* visitor) { |
| 594 return Stackmap::InstanceSize(raw_obj->ptr()->length_); | 607 return Stackmap::InstanceSize(raw_obj->ptr()->length_); |
| 595 } | 608 } |
| 596 | 609 |
| 597 | 610 |
| 598 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( | 611 intptr_t RawLocalVarDescriptors::VisitLocalVarDescriptorsPointers( |
| 599 RawLocalVarDescriptors* raw_obj, ObjectPointerVisitor* visitor) { | 612 RawLocalVarDescriptors* raw_obj, ObjectPointerVisitor* visitor) { |
| 600 intptr_t num_entries = raw_obj->ptr()->num_entries_; | 613 intptr_t num_entries = raw_obj->ptr()->num_entries_; |
| 601 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_entries)); | 614 visitor->VisitPointers(raw_obj->from(), raw_obj->to(num_entries)); |
| (...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 948 intptr_t RawUserTag::VisitUserTagPointers( | 961 intptr_t RawUserTag::VisitUserTagPointers( |
| 949 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { | 962 RawUserTag* raw_obj, ObjectPointerVisitor* visitor) { |
| 950 // Make sure that we got here with the tagged pointer as this. | 963 // Make sure that we got here with the tagged pointer as this. |
| 951 ASSERT(raw_obj->IsHeapObject()); | 964 ASSERT(raw_obj->IsHeapObject()); |
| 952 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); | 965 visitor->VisitPointers(raw_obj->from(), raw_obj->to()); |
| 953 return UserTag::InstanceSize(); | 966 return UserTag::InstanceSize(); |
| 954 } | 967 } |
| 955 | 968 |
| 956 | 969 |
| 957 } // namespace dart | 970 } // namespace dart |
| OLD | NEW |