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 package com.google.dart.compiler.resolver; | 5 package com.google.dart.compiler.resolver; |
6 | 6 |
7 import com.google.common.annotations.VisibleForTesting; | 7 import com.google.common.annotations.VisibleForTesting; |
8 import com.google.common.base.Objects; | 8 import com.google.common.base.Objects; |
9 import com.google.common.collect.Iterables; | 9 import com.google.common.collect.Iterables; |
10 import com.google.common.collect.Lists; | 10 import com.google.common.collect.Lists; |
(...skipping 743 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
754 public static boolean isCoreLibrarySource(Source source) { | 754 public static boolean isCoreLibrarySource(Source source) { |
755 if (source != null && source.getUri() != null | 755 if (source != null && source.getUri() != null |
756 && source.getUri().toString().equals("libraries.dart")) { | 756 && source.getUri().toString().equals("libraries.dart")) { |
757 return true; | 757 return true; |
758 } | 758 } |
759 // TODO (danrubel) remove these when dartc libraries are removed | 759 // TODO (danrubel) remove these when dartc libraries are removed |
760 // Old core library file names | 760 // Old core library file names |
761 return Elements.isLibrarySource(source, "/core/corelib.dart") | 761 return Elements.isLibrarySource(source, "/core/corelib.dart") |
762 || Elements.isLibrarySource(source, "/core/corelib_impl.dart") | 762 || Elements.isLibrarySource(source, "/core/corelib_impl.dart") |
763 // New core library file names | 763 // New core library file names |
764 || Elements.isLibrarySource(source, "/core/core.dart") | 764 || Elements.isLibrarySource(source, "/core/core.dart"); |
765 || Elements.isLibrarySource(source, "/core/coreimpl.dart") | |
766 || Elements.isLibrarySource(source, "/coreimpl/coreimpl.dart"); | |
767 } | 765 } |
768 | 766 |
769 public static boolean isHtmlLibrarySource(Source source) { | 767 public static boolean isHtmlLibrarySource(Source source) { |
770 return Elements.isLibrarySource(source, "/html/dartium/html_dartium.dart"); | 768 return Elements.isLibrarySource(source, "/html/dartium/html_dartium.dart"); |
771 } | 769 } |
772 | 770 |
773 /** | 771 /** |
774 * @return the {@link LibraryElement} which declares given {@link Element}. | 772 * @return the {@link LibraryElement} which declares given {@link Element}. |
775 */ | 773 */ |
776 public static LibraryElement getDeclaringLibrary(Element element) { | 774 public static LibraryElement getDeclaringLibrary(Element element) { |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
887 { | 885 { |
888 InterfaceType superType = classElement.getSupertype(); | 886 InterfaceType superType = classElement.getSupertype(); |
889 if (superType != null) | 887 if (superType != null) |
890 addAllMembers(visited, allMembers, superType.getElement()); | 888 addAllMembers(visited, allMembers, superType.getElement()); |
891 } | 889 } |
892 for (InterfaceType intf : classElement.getInterfaces()) { | 890 for (InterfaceType intf : classElement.getInterfaces()) { |
893 addAllMembers(visited, allMembers, intf.getElement()); | 891 addAllMembers(visited, allMembers, intf.getElement()); |
894 } | 892 } |
895 } | 893 } |
896 } | 894 } |
OLD | NEW |