OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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/parser.h" | 5 #include "vm/parser.h" |
6 #include "vm/flags.h" | 6 #include "vm/flags.h" |
7 | 7 |
8 #ifndef DART_PRECOMPILED_RUNTIME | 8 #ifndef DART_PRECOMPILED_RUNTIME |
9 | 9 |
10 #include "lib/invocation_mirror.h" | 10 #include "lib/invocation_mirror.h" |
(...skipping 11614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11625 Object& obj = Object::Handle(Z); | 11625 Object& obj = Object::Handle(Z); |
11626 const bool is_private_name = | 11626 const bool is_private_name = |
11627 (extractor_name.CharAt(0) == Library::kPrivateIdentifierStart); | 11627 (extractor_name.CharAt(0) == Library::kPrivateIdentifierStart); |
11628 if (!is_private_name) { | 11628 if (!is_private_name) { |
11629 // Private names are not exported by libraries. The name mangling | 11629 // Private names are not exported by libraries. The name mangling |
11630 // of private names with a library-specific suffix usually ensures | 11630 // of private names with a library-specific suffix usually ensures |
11631 // that _x in library A is not found when looked up from library B. | 11631 // that _x in library A is not found when looked up from library B. |
11632 // In the pathological case where a library imports itself with | 11632 // In the pathological case where a library imports itself with |
11633 // a prefix, the name mangling does not help in hiding the private | 11633 // a prefix, the name mangling does not help in hiding the private |
11634 // name, so we explicitly prevent lookup of private names here. | 11634 // name, so we explicitly prevent lookup of private names here. |
11635 obj = prefix.LookupObject(extractor_name); | 11635 if (is_setter_name) { |
| 11636 String& setter_name = |
| 11637 String::Handle(Z, Field::SetterName(extractor_name)); |
| 11638 obj = prefix.LookupObject(setter_name); |
| 11639 } |
| 11640 if (obj.IsNull()) { |
| 11641 obj = prefix.LookupObject(extractor_name); |
| 11642 } |
11636 } | 11643 } |
11637 if (!prefix.is_loaded() && (parsed_function() != NULL)) { | 11644 if (!prefix.is_loaded() && (parsed_function() != NULL)) { |
11638 // Remember that this function depends on an import prefix of an | 11645 // Remember that this function depends on an import prefix of an |
11639 // unloaded deferred library. | 11646 // unloaded deferred library. |
11640 parsed_function()->AddDeferredPrefix(prefix); | 11647 parsed_function()->AddDeferredPrefix(prefix); |
11641 } | 11648 } |
11642 | 11649 |
11643 if (obj.IsFunction()) { | 11650 if (obj.IsFunction()) { |
11644 const Function& func = Function::Cast(obj); | 11651 const Function& func = Function::Cast(obj); |
11645 if (!func.IsSetterFunction() || is_setter_name) { | 11652 if (!func.IsSetterFunction() || is_setter_name) { |
(...skipping 2794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
14440 const ArgumentListNode& function_args, | 14447 const ArgumentListNode& function_args, |
14441 const LocalVariable* temp_for_last_arg, | 14448 const LocalVariable* temp_for_last_arg, |
14442 bool is_super_invocation) { | 14449 bool is_super_invocation) { |
14443 UNREACHABLE(); | 14450 UNREACHABLE(); |
14444 return NULL; | 14451 return NULL; |
14445 } | 14452 } |
14446 | 14453 |
14447 } // namespace dart | 14454 } // namespace dart |
14448 | 14455 |
14449 #endif // DART_PRECOMPILED_RUNTIME | 14456 #endif // DART_PRECOMPILED_RUNTIME |
OLD | NEW |