File tree Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Expand file tree Collapse file tree 3 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -27,8 +27,9 @@ class ForwardingCorpse {
27
27
ObjectPtr target () const { return target_; }
28
28
void set_target (ObjectPtr target) { target_ = target; }
29
29
30
- intptr_t HeapSize () {
31
- intptr_t size = UntaggedObject::SizeTag::decode (tags_);
30
+ intptr_t HeapSize () { return HeapSize (tags_); }
31
+ intptr_t HeapSize (uword tags) {
32
+ intptr_t size = UntaggedObject::SizeTag::decode (tags);
32
33
if (size != 0 ) return size;
33
34
return *SizeAddress ();
34
35
}
Original file line number Diff line number Diff line change @@ -28,8 +28,9 @@ class FreeListElement {
28
28
29
29
void set_next (FreeListElement* next) { next_ = next; }
30
30
31
- intptr_t HeapSize () {
32
- intptr_t size = UntaggedObject::SizeTag::decode (tags_);
31
+ intptr_t HeapSize () { return HeapSize (tags_); }
32
+ intptr_t HeapSize (uword tags) {
33
+ intptr_t size = UntaggedObject::SizeTag::decode (tags);
33
34
if (size != 0 ) return size;
34
35
return *SizeAddress ();
35
36
}
Original file line number Diff line number Diff line change @@ -222,13 +222,13 @@ intptr_t UntaggedObject::HeapSizeFromClass(uword tags) const {
222
222
case kFreeListElement : {
223
223
uword addr = UntaggedObject::ToAddr (this );
224
224
FreeListElement* element = reinterpret_cast <FreeListElement*>(addr);
225
- instance_size = element->HeapSize ();
225
+ instance_size = element->HeapSize (tags );
226
226
break ;
227
227
}
228
228
case kForwardingCorpse : {
229
229
uword addr = UntaggedObject::ToAddr (this );
230
230
ForwardingCorpse* element = reinterpret_cast <ForwardingCorpse*>(addr);
231
- instance_size = element->HeapSize ();
231
+ instance_size = element->HeapSize (tags );
232
232
break ;
233
233
}
234
234
case kWeakSerializationReferenceCid : {
You can’t perform that action at this time.
0 commit comments