Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 12857) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -2975,6 +2975,7 @@ |
| RawAbstractType* Type::Canonicalize() const { |
| ASSERT(IsFinalized()); |
| if (IsCanonical() || IsMalformed()) { |
| + ASSERT(IsMalformed() || AbstractTypeArguments::Handle(arguments()).IsOld()); |
| return this->raw(); |
| } |
| const Class& cls = Class::Handle(type_class()); |
| @@ -3005,6 +3006,10 @@ |
| } |
| index++; |
| } |
| + // Canonicalize the type arguments. |
| + AbstractTypeArguments& type_args = AbstractTypeArguments::Handle(arguments()); |
| + type_args = type_args.Canonicalize(); |
| + set_arguments(type_args); |
| // The type needs to be added to the list. Grow the list if it is full. |
| if (index == canonical_types_len) { |
| const intptr_t kLengthIncrement = 2; // Raw and parameterized. |
| @@ -3645,7 +3650,8 @@ |
| RawAbstractTypeArguments* TypeArguments::Canonicalize() const { |
| - if (IsNull() || IsCanonical() || !IsInstantiated()) { |
| + if (IsNull() || IsCanonical()) { |
| + ASSERT(IsOld()); |
| return this->raw(); |
| } |
|
siva
2012/09/25 18:55:45
Should we have an assert here:
ASSERT(IsInstantia
regis
2012/09/25 19:26:25
It is not a problem to canonicalize an uninstantia
|
| ObjectStore* object_store = Isolate::Current()->object_store(); |