Index: runtime/vm/resolver.cc |
diff --git a/runtime/vm/resolver.cc b/runtime/vm/resolver.cc |
index 954f34076d069794050032ec65bd8c87f0e6a889..9d6972876468ae95f240f49e6af60904ace112ce 100644 |
--- a/runtime/vm/resolver.cc |
+++ b/runtime/vm/resolver.cc |
@@ -114,6 +114,32 @@ RawFunction* Resolver::ResolveDynamicAnyArgs( |
String& field_name = String::Handle(); |
if (is_getter) { |
field_name ^= Field::NameFromGetter(function_name); |
+ |
+ if (field_name.CharAt(0) == '#') { |
Ivan Posva
2015/07/17 08:35:42
Please add explanation here how we generate the cl
hausner
2015/07/17 17:53:51
Correct. I will add a comment. The # in the getter
|
+ String& property_name = String::Handle(String::SubString(field_name, 1)); |
+ |
+ ASSERT(!Field::IsGetterName(property_name)); |
+ String& method_name = String::Handle(); |
+ if (!Field::IsSetterName(property_name)) { |
Ivan Posva
2015/07/17 08:35:42
Please add comment why the property name needs to
hausner
2015/07/17 17:53:51
Will do.
|
+ method_name = Field::GetterName(property_name); |
+ } |
+ |
+ Function& function = Function::Handle(); |
+ while (!cls.IsNull()) { |
+ function = cls.LookupDynamicFunction(property_name); |
+ if (!function.IsNull()) { |
+ return CreateMethodExtractor(function_name, function); |
+ } |
+ if (!method_name.IsNull()) { |
+ function = cls.LookupDynamicFunction(method_name); |
+ if (!function.IsNull()) { |
+ return CreateMethodExtractor(function_name, function); |
+ } |
+ } |
+ cls = cls.SuperClass(); |
+ } |
+ return Function::null(); |
+ } |
} |
// Now look for an instance function whose name matches function_name |