| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/resolver.h" | 5 #include "vm/resolver.h" |
| 6 | 6 |
| 7 #include "vm/flags.h" | 7 #include "vm/flags.h" |
| 8 #include "vm/isolate.h" | 8 #include "vm/isolate.h" |
| 9 #include "vm/object.h" | 9 #include "vm/object.h" |
| 10 #include "vm/object_store.h" | 10 #include "vm/object_store.h" |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 // Now look for an instance function whose name matches function_name | 132 // Now look for an instance function whose name matches function_name |
| 133 // in the class. | 133 // in the class. |
| 134 Function& function = Function::Handle(); | 134 Function& function = Function::Handle(); |
| 135 while (function.IsNull() && !cls.IsNull()) { | 135 while (function.IsNull() && !cls.IsNull()) { |
| 136 function ^= cls.LookupDynamicFunction(function_name); | 136 function ^= cls.LookupDynamicFunction(function_name); |
| 137 | 137 |
| 138 // Getter invocation might actually be a method extraction. | 138 // Getter invocation might actually be a method extraction. |
| 139 if (is_getter && function.IsNull()) { | 139 if (is_getter && function.IsNull()) { |
| 140 function ^= cls.LookupDynamicFunction(field_name); | 140 function ^= cls.LookupDynamicFunction(field_name); |
| 141 if (!function.IsNull() && !function.IsNoSuchMethodDispatcher()) { | 141 if (!function.IsNull()) { |
| 142 // We were looking for the getter but found a method with the same name. | 142 // We were looking for the getter but found a method with the same name. |
| 143 // Create a method extractor and return it. | 143 // Create a method extractor and return it. |
| 144 function ^= CreateMethodExtractor(function_name, function); | 144 function ^= CreateMethodExtractor(function_name, function); |
| 145 } | 145 } |
| 146 } | 146 } |
| 147 | 147 |
| 148 cls = cls.SuperClass(); | 148 cls = cls.SuperClass(); |
| 149 } | 149 } |
| 150 return function.raw(); | 150 return function.raw(); |
| 151 } | 151 } |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 OS::Print("ResolveStatic error '%s': %s.\n", | 250 OS::Print("ResolveStatic error '%s': %s.\n", |
| 251 function_name.ToCString(), | 251 function_name.ToCString(), |
| 252 error_message.ToCString()); | 252 error_message.ToCString()); |
| 253 } | 253 } |
| 254 return Function::null(); | 254 return Function::null(); |
| 255 } | 255 } |
| 256 return function.raw(); | 256 return function.raw(); |
| 257 } | 257 } |
| 258 | 258 |
| 259 } // namespace dart | 259 } // namespace dart |
| OLD | NEW |