Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(343)

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 2632643002: Remove LibraryEntity.libraryName (Closed)
Patch Set: Updated cf. comments. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 library dart2js.resolution.members; 5 library dart2js.resolution.members;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Selectors; 8 import '../common/names.dart' show Selectors;
9 import '../common/resolution.dart' show Resolution; 9 import '../common/resolution.dart' show Resolution;
10 import '../compile_time_constants.dart'; 10 import '../compile_time_constants.dart';
(...skipping 1790 matching lines...) Expand 10 before | Expand all | Expand 10 after
1801 /// Handle qualified access of an inaccessible private static class member, 1801 /// Handle qualified access of an inaccessible private static class member,
1802 /// like `a._b` or `a._b()` where `a` is class, `_b` is static member of `a` 1802 /// like `a._b` or `a._b()` where `a` is class, `_b` is static member of `a`
1803 /// but `a` is not defined in the current library. 1803 /// but `a` is not defined in the current library.
1804 ResolutionResult handlePrivateStaticMemberAccess( 1804 ResolutionResult handlePrivateStaticMemberAccess(
1805 Send node, Name name, ClassElement receiverClass, Element member) { 1805 Send node, Name name, ClassElement receiverClass, Element member) {
1806 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); 1806 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
1807 ErroneousElement error = reportAndCreateErroneousElement( 1807 ErroneousElement error = reportAndCreateErroneousElement(
1808 node, 1808 node,
1809 name.text, 1809 name.text,
1810 MessageKind.PRIVATE_ACCESS, 1810 MessageKind.PRIVATE_ACCESS,
1811 {'libraryName': member.library.libraryOrScriptName, 'name': name}); 1811 {'libraryName': member.library.name, 'name': name});
1812 // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static 1812 // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
1813 // member access. 1813 // member access.
1814 return handleErroneousAccess( 1814 return handleErroneousAccess(
1815 node, name, new StaticAccess.unresolved(error)); 1815 node, name, new StaticAccess.unresolved(error));
1816 } 1816 }
1817 1817
1818 /// Handle qualified update of an inaccessible private static class member, 1818 /// Handle qualified update of an inaccessible private static class member,
1819 /// like `a._b = c` or `a._b++` where `a` is class, `_b` is static member of 1819 /// like `a._b = c` or `a._b++` where `a` is class, `_b` is static member of
1820 /// `a` but `a` is not defined in the current library. 1820 /// `a` but `a` is not defined in the current library.
1821 ResolutionResult handlePrivateStaticMemberUpdate( 1821 ResolutionResult handlePrivateStaticMemberUpdate(
1822 SendSet node, Name name, ClassElement receiverClass, Element member) { 1822 SendSet node, Name name, ClassElement receiverClass, Element member) {
1823 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD); 1823 registry.registerFeature(Feature.THROW_NO_SUCH_METHOD);
1824 ErroneousElement error = reportAndCreateErroneousElement( 1824 ErroneousElement error = reportAndCreateErroneousElement(
1825 node, 1825 node,
1826 name.text, 1826 name.text,
1827 MessageKind.PRIVATE_ACCESS, 1827 MessageKind.PRIVATE_ACCESS,
1828 {'libraryName': member.library.libraryOrScriptName, 'name': name}); 1828 {'libraryName': member.library.name, 'name': name});
1829 // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static 1829 // TODO(johnniwinther): Add an [AccessSemantics] for unresolved static
1830 // member access. 1830 // member access.
1831 return handleUpdate(node, name, new StaticAccess.unresolved(error)); 1831 return handleUpdate(node, name, new StaticAccess.unresolved(error));
1832 } 1832 }
1833 1833
1834 /// Handle qualified access to a static member, like `a.b` or `a.b()` where 1834 /// Handle qualified access to a static member, like `a.b` or `a.b()` where
1835 /// `a` is a class and `b` is a static member of `a`. 1835 /// `a` is a class and `b` is a static member of `a`.
1836 ResolutionResult handleStaticMemberAccess( 1836 ResolutionResult handleStaticMemberAccess(
1837 Send node, Name memberName, ClassElement receiverClass) { 1837 Send node, Name memberName, ClassElement receiverClass) {
1838 String name = memberName.text; 1838 String name = memberName.text;
(...skipping 2952 matching lines...) Expand 10 before | Expand all | Expand 10 after
4791 } 4791 }
4792 return const NoneResult(); 4792 return const NoneResult();
4793 } 4793 }
4794 } 4794 }
4795 4795
4796 /// Looks up [name] in [scope] and unwraps the result. 4796 /// Looks up [name] in [scope] and unwraps the result.
4797 Element lookupInScope( 4797 Element lookupInScope(
4798 DiagnosticReporter reporter, Node node, Scope scope, String name) { 4798 DiagnosticReporter reporter, Node node, Scope scope, String name) {
4799 return Elements.unwrap(scope.lookup(name), reporter, node); 4799 return Elements.unwrap(scope.lookup(name), reporter, node);
4800 } 4800 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/mirrors_used.dart ('k') | pkg/compiler/lib/src/serialization/modelz.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698