Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: runtime/vm/raw_object.h

Issue 2026643004: Don't overload FreeListElement for become. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « runtime/vm/precompiler.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698