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

Unified Diff: runtime/vm/object.h

Issue 165523002: Avoid repeated resolution of types by marking them as resolved. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 10 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
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 32680)
+++ runtime/vm/object.h (working copy)
@@ -1287,12 +1287,13 @@
bool IsEquivalent(const TypeArguments& other,
GrowableObjectArray* trail = NULL) const;
- bool IsResolved() const;
bool IsInstantiated(GrowableObjectArray* trail = NULL) const;
bool IsUninstantiatedIdentity() const;
bool CanShareInstantiatorTypeArguments(const Class& instantiator_class) const;
- // Returns true if all types of this vector are finalized.
+ // Returns true if all types of this vector are respectively, resolved,
+ // finalized, or bounded.
+ bool IsResolved() const;
bool IsFinalized() const;
bool IsBounded() const;
@@ -4192,8 +4193,8 @@
}
virtual bool IsFinalized() const {
return
- (raw_ptr()->type_state_ == RawType::kFinalizedInstantiated) ||
- (raw_ptr()->type_state_ == RawType::kFinalizedUninstantiated);
+ (raw_ptr()->type_state_ == RawType::kFinalizedInstantiated) ||
+ (raw_ptr()->type_state_ == RawType::kFinalizedUninstantiated);
}
void SetIsFinalized() const;
void ResetIsFinalized() const; // Ignore current state and set again.
@@ -4206,7 +4207,10 @@
virtual bool IsMalformedOrMalbounded() const;
virtual RawLanguageError* error() const { return raw_ptr()->error_; }
virtual void set_error(const LanguageError& value) const;
- virtual bool IsResolved() const; // Class and all arguments classes resolved.
+ virtual bool IsResolved() const {
+ return raw_ptr()->type_state_ >= RawType::kResolved;
+ }
+ void set_is_resolved() const;
virtual bool HasResolvedTypeClass() const; // Own type class resolved.
virtual RawClass* type_class() const;
void set_type_class(const Object& value) const;
« no previous file with comments | « runtime/vm/class_finalizer.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698