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

Unified Diff: runtime/vm/object.h

Issue 10368004: Properly set the element type of literal lists. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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/intermediate_language.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 7336)
+++ runtime/vm/object.h (working copy)
@@ -1054,6 +1054,7 @@
virtual RawAbstractTypeArguments* arguments() const;
virtual intptr_t token_index() const;
virtual bool IsInstantiated() const { return true; }
+ virtual bool Equals(const AbstractType& other) const;
RawAbstractType* uninstantiated_type() const {
return raw_ptr()->uninstantiated_type_;
@@ -3608,9 +3609,9 @@
RawObject* RemoveLast() const;
virtual RawAbstractTypeArguments* GetTypeArguments() const {
- // TODO(regis): Enable asserts once allocation of array literal fixed.
- // ASSERT(Array::Handle(data()).GetTypeArguments() ==
- // raw_ptr()->type_arguments_);
+ ASSERT(AbstractTypeArguments::AreEqual(
+ AbstractTypeArguments::Handle(Array::Handle(data()).GetTypeArguments()),
+ AbstractTypeArguments::Handle(raw_ptr()->type_arguments_)));
return raw_ptr()->type_arguments_;
}
virtual void SetTypeArguments(const AbstractTypeArguments& value) const {
« no previous file with comments | « runtime/vm/intermediate_language.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698