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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 212883009: Handle creating ParameterMirrors for the parameters of forwarding constructors. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: test more levels of forwarding Created 6 years, 9 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
Index: runtime/vm/class_finalizer.cc
diff --git a/runtime/vm/class_finalizer.cc b/runtime/vm/class_finalizer.cc
index c49794a57e510fd78c1c49814da310e8a9adc925..ee618f25f0f7e735294ed53d5cbcf0d55768dfa0 100644
--- a/runtime/vm/class_finalizer.cc
+++ b/runtime/vm/class_finalizer.cc
@@ -491,7 +491,7 @@ void ClassFinalizer::ResolveType(const Class& cls, const AbstractType& type) {
void ClassFinalizer::FinalizeTypeParameters(
const Class& cls,
GrowableObjectArray* pending_types) {
- if (cls.IsMixinApplication()) {
+ if (cls.IsAnonymousMixinApplication()) {
// Setup the type parameters of the mixin application and finalize the
// mixin type.
ApplyMixinType(cls, pending_types);
@@ -1708,7 +1708,7 @@ void ClassFinalizer::ApplyMixinAppAlias(const Class& mixin_app_class,
// to the super class.
Class& super_class = Class::Handle(isolate, super_type.type_class());
ASSERT(mixin_app_class.SuperClass() == super_class.raw());
- while (super_class.IsMixinApplication()) {
+ while (super_class.IsAnonymousMixinApplication()) {
super_class = super_class.SuperClass();
}
const intptr_t num_super_type_params = super_class.NumTypeParameters();
@@ -1945,6 +1945,7 @@ void ClassFinalizer::CreateForwardingConstructors(
for (intptr_t n = 0; n < num_parameters; n++) {
clone.SetParameterTypeAt(n, dynamic_type);
}
+ clone.SetForwardingTarget(func);
cloned_funcs.Add(clone);
}
}
@@ -2168,7 +2169,7 @@ void ClassFinalizer::FinalizeClass(const Class& cls) {
if (FLAG_trace_class_finalization) {
OS::Print("Finalize %s\n", cls.ToCString());
}
- if (cls.IsMixinApplication()) {
+ if (cls.IsAnonymousMixinApplication()) {
// Copy instance methods and fields from the mixin class.
// This has to happen before the check whether the methods of
// the class conflict with inherited methods.
@@ -2327,7 +2328,7 @@ bool ClassFinalizer::IsMixinCycleFree(const Class& cls,
visited->Add(cls.id());
Class& super_class = Class::Handle(cls.raw());
do {
- if (super_class.IsMixinApplication()) {
+ if (super_class.IsAnonymousMixinApplication()) {
const Type& mixin_type = Type::Handle(super_class.mixin());
ASSERT(!mixin_type.IsNull());
ASSERT(mixin_type.HasResolvedTypeClass());

Powered by Google App Engine
This is Rietveld 408576698