Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 74cf17600a7960dfc68869a8e14d5e4189738a9e..518b0274d127508404f81076410d6d8c555ee358 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -181,9 +181,12 @@ CLASS_LIST_TYPED_DATA(DEFINE_OBJECT_KIND) |
kDynamicCid, |
kVoidCid, |
- // The following entry does not describe a real class, but instead it is an |
- // id which is used to identify free list elements in the heap. |
+ // The following entries describes classes for pseudo-objects in the heap |
+ // that should never be reachable from live objects. Free list elements |
+ // maintain the free list for old space, and forwarding corpses are used to |
+ // implement one-way become. |
kFreeListElement, |
+ kForwardingCorpse, |
kNumPredefinedCids, |
}; |
@@ -442,6 +445,12 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID) |
bool IsFreeListElement() const { |
return ((GetClassId() == kFreeListElement)); |
} |
+ bool IsForwardingCorpse() const { |
+ return ((GetClassId() == kForwardingCorpse)); |
+ } |
+ bool IsPseudoObject() const { |
+ return IsFreeListElement() || IsForwardingCorpse(); |
+ } |
intptr_t Size() const { |
uword tags = ptr()->tags_; |