Index: runtime/vm/object_id_ring.h |
diff --git a/runtime/vm/object_id_ring.h b/runtime/vm/object_id_ring.h |
index ee9038d3fe56c59a432a06992e6a844e1a18bd8f..723bc72276e75e3c740270c8a48e7c8feb1e6e3f 100644 |
--- a/runtime/vm/object_id_ring.h |
+++ b/runtime/vm/object_id_ring.h |
@@ -19,6 +19,13 @@ class ObjectPointerVisitor; |
// ids will be invalidated. |
class ObjectIdRing { |
public: |
+ enum LookupResult { |
rmacnak
2014/08/26 21:36:50
Not thrilled about this name.
turnidge
2014/08/27 16:13:56
Sure. I'm having trouble coming up with an improv
rmacnak
2014/08/27 18:09:59
Added one-liners.
|
+ kValid = 0, |
+ kInvalid, |
+ kCollected, |
+ kExpired, |
+ }; |
+ |
static const int32_t kMaxId = 0x3FFFFFFF; |
static const int32_t kInvalidId = -1; |
static const int32_t kDefaultCapacity = 1024; |
@@ -30,7 +37,7 @@ class ObjectIdRing { |
int32_t GetIdForObject(RawObject* raw_obj); |
// Returns Object::sentinel() when the id is not valid. |
turnidge
2014/08/27 16:13:56
This comment is now out of date with the code... b
rmacnak
2014/08/27 18:09:59
Updated to say we return Object::null() when !kVal
|
- RawObject* GetObjectForId(int32_t id); |
+ RawObject* GetObjectForId(int32_t id, LookupResult* kind); |
void VisitPointers(ObjectPointerVisitor* visitor); |