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

Unified Diff: runtime/vm/object.h

Issue 102053010: - Use canonicalized type of non-parameterized classes when (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years 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/object.h
===================================================================
--- runtime/vm/object.h (revision 31170)
+++ runtime/vm/object.h (working copy)
@@ -778,6 +778,13 @@
return OFFSET_OF(RawClass, type_arguments_field_offset_in_words_);
}
+ RawType* CanonicalType() const {
+ if ((NumTypeArguments() == 0) && !IsSignatureClass()) {
+ return reinterpret_cast<RawType*>(raw_ptr()->canonical_types_);
+ }
+ return reinterpret_cast<RawType*>(Object::null());
+ }
+
// The super type of this class, Object type if not explicitly specified.
// Note that the super type may be bounded, as in this example:
// class C<T> extends S<T> { }; class S<T extends num> { };
@@ -1084,8 +1091,8 @@
void set_constants(const Array& value) const;
- void set_canonical_types(const Array& value) const;
- RawArray* canonical_types() const;
+ void set_canonical_types(const Object& value) const;
+ RawObject* canonical_types() const;
RawArray* invocation_dispatcher_cache() const;
void set_invocation_dispatcher_cache(const Array& cache) const;

Powered by Google App Engine
This is Rietveld 408576698