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

Unified Diff: runtime/vm/raw_object.h

Issue 1147303002: Support untagged object pool entries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: rebased Created 5 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
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 217f30f4bf54851e7e75a45ce60e0de3add2c71d..d43424ef5d2e9cec7446ef1a4d2c9cb69bf7d763 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) \
@@ -991,6 +992,28 @@ class RawCode : public RawObject {
};
+class RawObjectPool : public RawObject {
+ RAW_HEAP_OBJECT_IMPLEMENTATION(ObjectPool);
+
+ intptr_t length_;
+ intptr_t num_tagged_entries_;
+
+ 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* from();
+ Entry* to();
+
+ friend class Object;
+};
+
+
class RawInstructions : public RawObject {
RAW_HEAP_OBJECT_IMPLEMENTATION(Instructions);
@@ -998,7 +1021,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_);
}
@@ -2098,6 +2121,7 @@ inline bool RawObject::IsVariableSizeClassId(intptr_t index) {
(index == kContextCid) ||
(index == kTypeArgumentsCid) ||
(index == kInstructionsCid) ||
+ (index == kObjectPoolCid) ||
(index == kPcDescriptorsCid) ||
(index == kStackmapCid) ||
(index == kLocalVarDescriptorsCid) ||

Powered by Google App Engine
This is Rietveld 408576698