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

Unified Diff: runtime/vm/object.h

Issue 11299020: Make creation of list literal more resilient to changes in the underlying (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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 14985)
+++ runtime/vm/object.h (working copy)
@@ -3222,9 +3222,6 @@
// Check if this type represents the 'Function' type.
bool IsFunctionType() const;
- // Check if this type represents the 'List' interface.
- bool IsListInterface() const;
-
// Check if this type is an interface type.
bool IsInterfaceType() const {
if (!HasResolvedTypeClass()) {
@@ -3343,12 +3340,12 @@
// The 'String' type.
static RawType* StringType();
+ // The 'Array' type.
+ static RawType* ArrayType();
+
// The 'Function' interface type.
static RawType* Function();
- // The 'List' interface type.
- static RawType* ListInterface();
-
// The finalized type of the given non-parameterized class.
static RawType* NewNonParameterizedType(const Class& type_class);
@@ -4257,6 +4254,7 @@
return raw_ptr()->type_arguments_;
}
virtual void SetTypeArguments(const AbstractTypeArguments& value) const {
+ ASSERT(value.IsNull() || ((value.Length() == 1) && value.IsInstantiated()));
StorePointer(&raw_ptr()->type_arguments_, value.raw());
}
@@ -4384,6 +4382,7 @@
return raw_ptr()->type_arguments_;
}
virtual void SetTypeArguments(const AbstractTypeArguments& value) const {
+ ASSERT(value.IsNull() || ((value.Length() == 1) && value.IsInstantiated()));
const Array& contents = Array::Handle(data());
contents.SetTypeArguments(value);
StorePointer(&raw_ptr()->type_arguments_, value.raw());

Powered by Google App Engine
This is Rietveld 408576698