| 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/object.h" | 5 #include "vm/object.h" |
| 6 | 6 |
| 7 #include "include/dart_api.h" | 7 #include "include/dart_api.h" |
| 8 #include "platform/assert.h" | 8 #include "platform/assert.h" |
| 9 #include "vm/assembler.h" | 9 #include "vm/assembler.h" |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| (...skipping 10785 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10796 if (!setter_name.IsNull()) { | 10796 if (!setter_name.IsNull()) { |
| 10797 obj = lib.LookupEntry(setter_name, &ignore); | 10797 obj = lib.LookupEntry(setter_name, &ignore); |
| 10798 } | 10798 } |
| 10799 } | 10799 } |
| 10800 } | 10800 } |
| 10801 | 10801 |
| 10802 // Library prefixes are not exported. | 10802 // Library prefixes are not exported. |
| 10803 if (obj.IsNull() || obj.IsLibraryPrefix()) { | 10803 if (obj.IsNull() || obj.IsLibraryPrefix()) { |
| 10804 // Lookup in the re-exported symbols. | 10804 // Lookup in the re-exported symbols. |
| 10805 obj = lib.LookupReExport(name); | 10805 obj = lib.LookupReExport(name); |
| 10806 if (obj.IsNull() && !Field::IsSetterName(name)) { |
| 10807 // LookupReExport() only returns objects that match the given name. |
| 10808 // If there is no field/func/getter, try finding a setter. |
| 10809 const String& setter_name = |
| 10810 String::Handle(Field::LookupSetterSymbol(name)); |
| 10811 if (!setter_name.IsNull()) { |
| 10812 obj = lib.LookupReExport(setter_name); |
| 10813 } |
| 10814 } |
| 10806 } | 10815 } |
| 10807 if (obj.IsNull() || HidesName(name) || obj.IsLibraryPrefix()) { | 10816 if (obj.IsNull() || HidesName(name) || obj.IsLibraryPrefix()) { |
| 10808 return Object::null(); | 10817 return Object::null(); |
| 10809 } | 10818 } |
| 10810 return obj.raw(); | 10819 return obj.raw(); |
| 10811 } | 10820 } |
| 10812 | 10821 |
| 10813 | 10822 |
| 10814 RawNamespace* Namespace::New() { | 10823 RawNamespace* Namespace::New() { |
| 10815 ASSERT(Object::namespace_class() != Class::null()); | 10824 ASSERT(Object::namespace_class() != Class::null()); |
| (...skipping 10911 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 21727 return UserTag::null(); | 21736 return UserTag::null(); |
| 21728 } | 21737 } |
| 21729 | 21738 |
| 21730 | 21739 |
| 21731 const char* UserTag::ToCString() const { | 21740 const char* UserTag::ToCString() const { |
| 21732 const String& tag_label = String::Handle(label()); | 21741 const String& tag_label = String::Handle(label()); |
| 21733 return tag_label.ToCString(); | 21742 return tag_label.ToCString(); |
| 21734 } | 21743 } |
| 21735 | 21744 |
| 21736 } // namespace dart | 21745 } // namespace dart |
| OLD | NEW |