Index: runtime/vm/raw_object.h |
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h |
index 349ad591e30cc73ac2bb7b5209ce0db66c02d8c0..f4b80b336f162ba78d1223c7868d99e744fec58d 100644 |
--- a/runtime/vm/raw_object.h |
+++ b/runtime/vm/raw_object.h |
@@ -31,6 +31,7 @@ namespace dart { |
V(Namespace) \ |
V(Code) \ |
V(Instructions) \ |
+ V(ObjectPool) \ |
V(PcDescriptors) \ |
V(Stackmap) \ |
V(LocalVarDescriptors) \ |
@@ -1002,6 +1003,27 @@ class RawCode : public RawObject { |
}; |
+class RawObjectPool : public RawObject { |
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ObjectPool); |
+ |
+ intptr_t length_; |
+ RawTypedData* info_array_; |
+ |
+ struct Entry { |
+ union { |
+ RawObject* raw_obj_; |
+ uword raw_value_; |
+ }; |
+ }; |
+ Entry* data() { OPEN_ARRAY_START(Entry, Entry); } |
+ Entry const* data() const { OPEN_ARRAY_START(Entry, Entry); } |
+ |
+ Entry* first_entry() { return &ptr()->data()[0]; } |
+ |
+ friend class Object; |
+}; |
+ |
+ |
class RawInstructions : public RawObject { |
RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions); |
@@ -1009,7 +1031,7 @@ class RawInstructions : public RawObject { |
return reinterpret_cast<RawObject**>(&ptr()->code_); |
} |
RawCode* code_; |
- RawArray* object_pool_; |
+ RawObjectPool* object_pool_; |
RawObject** to() { |
return reinterpret_cast<RawObject**>(&ptr()->object_pool_); |
} |
@@ -1780,6 +1802,8 @@ class RawTypedData : public RawInstance { |
friend class Object; |
friend class Instance; |
friend class SnapshotReader; |
+ friend class ObjectPool; |
+ friend class RawObjectPool; |
}; |
@@ -2112,6 +2136,7 @@ inline bool RawObject::IsVariableSizeClassId(intptr_t index) { |
(index == kContextCid) || |
(index == kTypeArgumentsCid) || |
(index == kInstructionsCid) || |
+ (index == kObjectPoolCid) || |
(index == kPcDescriptorsCid) || |
(index == kStackmapCid) || |
(index == kLocalVarDescriptorsCid) || |