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

Unified Diff: runtime/vm/raw_object.h

Issue 2281263002: AOT: Reassign class ids so class hierarchies have contiguous ranges. (Closed)
Patch Set: review Created 4 years, 4 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 1e975d7aab9a9246fc07ba1819c0f59a50d95a01..14a9895d999cb7fca3877134d22c6f5f4e1e20a0 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -539,6 +539,11 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID)
return ClassIdTag::decode(tags);
}
+ void SetClassId(intptr_t new_cid) {
+ uword tags = ptr()->tags_;
+ ptr()->tags_ = ClassIdTag::update(new_cid, tags);
+ }
+
template<class TagBitField>
void UpdateTagBit(bool value) {
uword tags = ptr()->tags_;
@@ -596,6 +601,7 @@ CLASS_LIST_TYPED_DATA(DEFINE_IS_CID)
friend class Become; // GetClassId
friend class Bigint;
friend class ByteBuffer;
+ friend class CidRewriteVisitor;
friend class Closure;
friend class Code;
friend class Double;
@@ -719,6 +725,7 @@ class RawClass : public RawObject {
friend class RawInstructions;
friend class SnapshotReader;
friend class InstanceSerializationCluster;
+ friend class CidRewriteVisitor;
};
@@ -947,6 +954,8 @@ class RawField : public RawObject {
int8_t guarded_list_length_in_object_offset_;
uint8_t kind_bits_; // static, final, const, has initializer....
+
+ friend class CidRewriteVisitor;
};
@@ -1681,6 +1690,8 @@ class RawType : public RawAbstractType {
}
TokenPosition token_pos_;
int8_t type_state_;
+
+ friend class CidRewriteVisitor;
};
@@ -1713,6 +1724,8 @@ class RawTypeParameter : public RawAbstractType {
TokenPosition token_pos_;
int16_t index_;
int8_t type_state_;
+
+ friend class CidRewriteVisitor;
};
« runtime/vm/isolate.cc ('K') | « runtime/vm/profiler.cc ('k') | runtime/vm/raw_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698