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

Unified Diff: runtime/vm/raw_object.h

Issue 1965493004: Canonicalize generic types in an isolate specific hash table (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« runtime/vm/object.h ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 977ba55040acdc93904c958016db44714e6dce62..3f9830b3c06e680d2c2349e6d26e2f21655821ef 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -771,6 +771,8 @@ class RawTypeArguments : public RawObject {
// Instantiations leading to bound errors do not get cached.
RawSmi* length_;
+ RawSmi* hash_;
+
// Variable length data follows here.
RawAbstractType* const* types() const {
OPEN_ARRAY_START(RawAbstractType*, RawAbstractType*);
@@ -1687,6 +1689,7 @@ class RawType : public RawAbstractType {
}
RawObject* type_class_; // Either resolved class or unresolved class.
RawTypeArguments* arguments_;
+ RawSmi* hash_;
// This type object represents a function type if its signature field is a
// non-null function object.
// If this type is malformed or malbounded, the signature field gets
@@ -1728,6 +1731,7 @@ class RawTypeParameter : public RawAbstractType {
}
RawClass* parameterized_class_;
RawString* name_;
+ RawSmi* hash_;
RawAbstractType* bound_; // ObjectType if no explicit bound specified.
RawObject** to() { return reinterpret_cast<RawObject**>(&ptr()->bound_); }
TokenPosition token_pos_;
@@ -1745,6 +1749,7 @@ class RawBoundedType : public RawAbstractType {
}
RawAbstractType* type_;
RawAbstractType* bound_;
+ RawSmi* hash_;
RawTypeParameter* type_parameter_; // For more detailed error reporting.
RawObject** to() {
return reinterpret_cast<RawObject**>(&ptr()->type_parameter_);
@@ -1760,6 +1765,7 @@ class RawMixinAppType : public RawAbstractType {
return reinterpret_cast<RawObject**>(&ptr()->super_type_);
}
RawAbstractType* super_type_;
+ RawSmi* hash_;
RawArray* mixin_types_; // Array of AbstractType.
RawObject** to() {
return reinterpret_cast<RawObject**>(&ptr()->mixin_types_);
« runtime/vm/object.h ('K') | « runtime/vm/object.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698