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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 137983006: Leave uninitialized type arguments of a type being finalized as null instead of (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 11 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 | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 31842)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -577,7 +577,8 @@
cls, super_type_arg, kFinalize, pending_types);
super_type_args.SetTypeAt(i, super_type_arg);
}
- if (!super_type_arg.IsInstantiated()) {
+ if (!super_type_arg.IsBeingFinalized() &&
+ !super_type_arg.IsInstantiated()) {
Error& error = Error::Handle();
super_type_arg = super_type_arg.InstantiateFrom(arguments, &error);
if (!error.IsNull()) {
@@ -745,7 +746,6 @@
}
return type.raw();
}
- ASSERT(type.IsResolved());
ASSERT(finalization >= kFinalize);
if (type.IsTypeRef()) {
@@ -763,6 +763,7 @@
return TypeRef::New(type);
}
+ ASSERT(type.IsResolved());
if (FLAG_trace_type_finalization) {
OS::Print("Finalizing type '%s' for class '%s'\n",
String::Handle(type.Name()).ToCString(),
@@ -864,11 +865,7 @@
// argument vector.
const intptr_t offset = num_type_arguments - num_type_parameters;
AbstractType& type_arg = AbstractType::Handle(Type::DynamicType());
- // TODO(regis): Leave the temporary type argument values as null.
- for (intptr_t i = 0; i < offset; i++) {
- // Temporarily set the type arguments of the super classes to dynamic.
- full_arguments.SetTypeAt(i, type_arg);
- }
+ // Leave the temporary type arguments at indices [0..offset[ as null.
for (intptr_t i = 0; i < num_type_parameters; i++) {
// If no type parameters were provided, a raw type is desired, so we
// create a vector of dynamic.
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698