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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10008017: Do not require upper bounds to be resolved and finalized before comparing them (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/class_finalizer.h ('k') | runtime/vm/object.h » ('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 6231)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -57,7 +57,7 @@
}
ResolveSuperType(cls);
if (cls.is_interface()) {
- ResolveDefaultClass(cls);
+ ResolveFactoryClass(cls);
}
}
// Finalize all classes.
@@ -339,7 +339,7 @@
}
-void ClassFinalizer::ResolveDefaultClass(const Class& interface) {
+void ClassFinalizer::ResolveFactoryClass(const Class& interface) {
ASSERT(interface.is_interface());
if (interface.is_finalized() ||
!interface.HasFactoryClass() ||
@@ -369,7 +369,8 @@
factory_name.ToCString());
}
interface.set_factory_class(factory_class);
- ResolveAndFinalizeUpperBounds(factory_class);
+ // It is not necessary to finalize the bounds before comparing them between
+ // the expected and actual factory class.
const Class& factory_signature_class = Class::Handle(
unresolved_factory_class.factory_signature_class());
ASSERT(!factory_signature_class.IsNull());
@@ -377,7 +378,6 @@
// can be omitted), verify that it matches the list of type parameters of
// the factory class in number, names, and bounds.
if (factory_signature_class.NumTypeParameters() > 0) {
- ResolveAndFinalizeUpperBounds(factory_signature_class);
const TypeArguments& expected_type_parameters =
TypeArguments::Handle(factory_signature_class.type_parameters());
const TypeArguments& actual_type_parameters =
@@ -386,10 +386,10 @@
TypeArguments::Handle(factory_signature_class.type_parameter_bounds());
const TypeArguments& actual_type_parameter_bounds =
TypeArguments::Handle(factory_class.type_parameter_bounds());
- if (!TypeArguments::AreIdenticalTypeParameters(expected_type_parameters,
- actual_type_parameters) ||
- !AbstractTypeArguments::AreEqual(expected_type_parameter_bounds,
- actual_type_parameter_bounds)) {
+ if (!AbstractTypeArguments::AreIdentical(expected_type_parameters,
+ actual_type_parameters) ||
+ !AbstractTypeArguments::AreIdentical(expected_type_parameter_bounds,
+ actual_type_parameter_bounds)) {
const String& interface_name = String::Handle(interface.Name());
const String& factory_name = String::Handle(factory_class.Name());
const Script& script = Script::Handle(interface.script());
@@ -407,8 +407,8 @@
TypeArguments::Handle(interface.type_parameters());
const TypeArguments& factory_type_parameters =
TypeArguments::Handle(factory_class.type_parameters());
- if (!TypeArguments::AreIdenticalTypeParameters(interface_type_parameters,
- factory_type_parameters)) {
+ if (!AbstractTypeArguments::AreIdentical(interface_type_parameters,
+ factory_type_parameters)) {
const String& interface_name = String::Handle(interface.Name());
const String& factory_name = String::Handle(factory_class.Name());
const Script& script = Script::Handle(interface.script());
« no previous file with comments | « runtime/vm/class_finalizer.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698