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

Side by Side Diff: pkg/compiler/lib/src/native/enqueue.dart

Issue 1173403002: dart2js: Fix hints in code base. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Updated to latest revision Created 5 years, 6 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) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 part of native; 5 part of native;
6 6
7 /** 7 /**
8 * This could be an abstract class but we use it as a stub for the dart_backend. 8 * This could be an abstract class but we use it as a stub for the dart_backend.
9 */ 9 */
10 class NativeEnqueuer { 10 class NativeEnqueuer {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 // 167 //
168 // class B extends foo.A {} 168 // class B extends foo.A {}
169 // 169 //
170 // String "A" has a potential subclass B. 170 // String "A" has a potential subclass B.
171 171
172 var potentialExtends = new Map<String, Set<ClassElement>>(); 172 var potentialExtends = new Map<String, Set<ClassElement>>();
173 173
174 libraries.forEach((library) { 174 libraries.forEach((library) {
175 library.implementation.forEachLocalMember((element) { 175 library.implementation.forEachLocalMember((element) {
176 if (element.isClass) { 176 if (element.isClass) {
177 String name = element.name;
178 String extendsName = findExtendsNameOfClass(element); 177 String extendsName = findExtendsNameOfClass(element);
179 if (extendsName != null) { 178 if (extendsName != null) {
180 Set<ClassElement> potentialSubclasses = 179 Set<ClassElement> potentialSubclasses =
181 potentialExtends.putIfAbsent( 180 potentialExtends.putIfAbsent(
182 extendsName, 181 extendsName,
183 () => new Set<ClassElement>()); 182 () => new Set<ClassElement>());
184 potentialSubclasses.add(element); 183 potentialSubclasses.add(element);
185 } 184 }
186 } 185 }
187 }); 186 });
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
689 superclass, 688 superclass,
690 () => <ClassElement>[]); 689 () => <ClassElement>[]);
691 directSubtypes.add(cls); 690 directSubtypes.add(cls);
692 } 691 }
693 692
694 void logSummary(log(message)) { 693 void logSummary(log(message)) {
695 log('Compiled ${registeredClasses.length} native classes, ' 694 log('Compiled ${registeredClasses.length} native classes, '
696 '${unusedClasses.length} native classes omitted.'); 695 '${unusedClasses.length} native classes omitted.');
697 } 696 }
698 } 697 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698