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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 2632643002: Remove LibraryEntity.libraryName (Closed)
Patch Set: Created 3 years, 11 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/elements/entities.dart ('k') | pkg/compiler/lib/src/elements/names.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/names.dart' show Identifiers; 8 import '../common/names.dart' show Identifiers;
9 import '../common/resolution.dart' show Resolution, ParsingContext; 9 import '../common/resolution.dart' show Resolution, ParsingContext;
10 import '../compiler.dart' show Compiler; 10 import '../compiler.dart' show Compiler;
(...skipping 1199 matching lines...) Expand 10 before | Expand all | Expand 10 after
1210 } 1210 }
1211 1211
1212 Iterable<Element> getNonPrivateElementsInScope() { 1212 Iterable<Element> getNonPrivateElementsInScope() {
1213 return localScope.values.where((Element element) { 1213 return localScope.values.where((Element element) {
1214 // At this point [localScope] only contains members so we don't need 1214 // At this point [localScope] only contains members so we don't need
1215 // to check for foreign or prefix elements. 1215 // to check for foreign or prefix elements.
1216 return !Name.isPrivateName(element.name); 1216 return !Name.isPrivateName(element.name);
1217 }); 1217 });
1218 } 1218 }
1219 1219
1220 String get name => hasLibraryName ? libraryName : super.name;
Siggi Cherem (dart-lang) 2017/01/13 16:51:18 I'm not sure I follow why we also need to change `
Johnni Winther 2017/01/16 10:07:38 [name] is available on Entity but for a library it
1221
1220 bool get hasLibraryName => libraryTag != null; 1222 bool get hasLibraryName => libraryTag != null;
1221 1223
1222 String get libraryName { 1224 String get libraryName {
1223 if (libraryTag == null) return ''; 1225 if (libraryTag == null) return '';
1224 return libraryTag.name.toString(); 1226 return libraryTag.name.toString();
1225 } 1227 }
1226 1228
1227 String get libraryOrScriptName { 1229 String get libraryOrScriptName {
1228 if (libraryTag != null) { 1230 if (libraryTag != null) {
1229 return libraryTag.name.toString(); 1231 return libraryTag.name.toString();
(...skipping 2191 matching lines...) Expand 10 before | Expand all | Expand 10 after
3421 body = node.asFunctionExpression().body; 3423 body = node.asFunctionExpression().body;
3422 } 3424 }
3423 return new ParsedResolvedAst( 3425 return new ParsedResolvedAst(
3424 declaration, 3426 declaration,
3425 node, 3427 node,
3426 body, 3428 body,
3427 definingElement.treeElements, 3429 definingElement.treeElements,
3428 definingElement.compilationUnit.script.resourceUri); 3430 definingElement.compilationUnit.script.resourceUri);
3429 } 3431 }
3430 } 3432 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/entities.dart ('k') | pkg/compiler/lib/src/elements/names.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698