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

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

Issue 2843283004: Use more entities in program_builder, collector and registry (Closed)
Patch Set: Updated cf. comments. Created 3 years, 7 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
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 elements; 5 library elements;
6 6
7 import 'package:front_end/src/fasta/parser/async_modifier.dart' 7 import 'package:front_end/src/fasta/parser/async_modifier.dart'
8 show AsyncModifier; 8 show AsyncModifier;
9 9
10 import '../common.dart'; 10 import '../common.dart';
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 CompilationUnitElement a, CompilationUnitElement b) { 736 CompilationUnitElement a, CompilationUnitElement b) {
737 if (a == b) return 0; 737 if (a == b) return 0;
738 // Compilation units are compared only within the same library so we expect 738 // Compilation units are compared only within the same library so we expect
739 // the Uris to usually be clustered together with a common scheme and path 739 // the Uris to usually be clustered together with a common scheme and path
740 // prefix. 740 // prefix.
741 Uri aUri = a.script.readableUri; 741 Uri aUri = a.script.readableUri;
742 Uri bUri = b.script.readableUri; 742 Uri bUri = b.script.readableUri;
743 return '${aUri}'.compareTo('${bUri}'); 743 return '${aUri}'.compareTo('${bUri}');
744 } 744 }
745 745
746 static List<Element> sortedByPosition(Iterable<Element> elements) { 746 static List<E> sortedByPosition<E extends Element>(Iterable<E> elements) {
747 return elements.toList()..sort(compareByPosition); 747 return elements.toList()..sort(compareByPosition);
748 } 748 }
749 749
750 static bool isFixedListConstructorCall( 750 static bool isFixedListConstructorCall(
751 ConstructorEntity element, Send node, CommonElements commonElements) { 751 ConstructorEntity element, Send node, CommonElements commonElements) {
752 return commonElements.isUnnamedListConstructor(element) && 752 return commonElements.isUnnamedListConstructor(element) &&
753 node.isCall && 753 node.isCall &&
754 !node.arguments.isEmpty && 754 !node.arguments.isEmpty &&
755 node.arguments.tail.isEmpty; 755 node.arguments.tail.isEmpty;
756 } 756 }
(...skipping 1277 matching lines...) Expand 10 before | Expand all | Expand 10 after
2034 /// by a field. 2034 /// by a field.
2035 bool get isDeclaredByField; 2035 bool get isDeclaredByField;
2036 2036
2037 /// Returns `true` if this member is abstract. 2037 /// Returns `true` if this member is abstract.
2038 bool get isAbstract; 2038 bool get isAbstract;
2039 2039
2040 /// If abstract, [implementation] points to the overridden concrete member, 2040 /// If abstract, [implementation] points to the overridden concrete member,
2041 /// if any. Otherwise [implementation] points to the member itself. 2041 /// if any. Otherwise [implementation] points to the member itself.
2042 Member get implementation; 2042 Member get implementation;
2043 } 2043 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/runtime_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698