Chromium Code Reviews| Index: runtime/vm/object.h |
| diff --git a/runtime/vm/object.h b/runtime/vm/object.h |
| index 61a2866e27bbafd89d2dee7514b7633fd0217004..1dafbef4e9f0fbc2786bef845267bcc38fa74ae8 100644 |
| --- a/runtime/vm/object.h |
| +++ b/runtime/vm/object.h |
| @@ -8655,6 +8655,26 @@ class UserTag : public Instance { |
| }; |
| +class ObjectPoolInfo { |
|
Florian Schneider
2016/12/08 18:30:45
: public ValueObject
kustermann
2016/12/08 19:14:38
Done.
|
| + public: |
| + explicit ObjectPoolInfo(const ObjectPool& pool) |
| + : array_(TypedData::Handle(pool.info_array())) {} |
| + |
| + explicit ObjectPoolInfo(const TypedData& info_array) : array_(info_array) {} |
|
Florian Schneider
2016/12/08 18:30:45
Not needed?
kustermann
2016/12/08 19:14:38
See comment on call site. Using this constructor m
|
| + |
| + ObjectPool::EntryType InfoAt(intptr_t i) { |
| + return static_cast<ObjectPool::EntryType>(array_.GetInt8(i)); |
| + } |
| + |
| + void SetInfoAt(intptr_t i, ObjectPool::EntryType info) { |
| + array_.SetInt8(i, static_cast<int8_t>(info)); |
| + } |
| + |
| + private: |
| + const TypedData& array_; |
| +}; |
| + |
| + |
| // Breaking cycles and loops. |
| RawClass* Object::clazz() const { |
| uword raw_value = reinterpret_cast<uword>(raw_); |