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

Side by Side Diff: pkg/compiler/lib/src/dart_backend/backend.dart

Issue 1880323002: dart2js cleanup: remove unused imports and variables (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: merge master Created 4 years, 8 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/dart2js.dart ('k') | pkg/compiler/lib/src/dart_types.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 part of dart_backend; 5 part of dart_backend;
6 6
7 // TODO(ahe): This class is simply wrong. This backend should use 7 // TODO(ahe): This class is simply wrong. This backend should use
8 // elements when it can, not AST nodes. Perhaps a [Map<Element, 8 // elements when it can, not AST nodes. Perhaps a [Map<Element,
9 // TreeElements>] is what is needed. 9 // TreeElements>] is what is needed.
10 class ElementAst { 10 class ElementAst {
(...skipping 299 matching lines...) Expand 10 before | Expand all | Expand 10 after
310 ClassElement superclass = supertype.element; 310 ClassElement superclass = supertype.element;
311 LibraryElement library = superclass.library; 311 LibraryElement library = superclass.library;
312 if (library.isPlatformLibrary) { 312 if (library.isPlatformLibrary) {
313 if (_userImplementedPlatformClasses.add(superclass)) { 313 if (_userImplementedPlatformClasses.add(superclass)) {
314 // Register selectors for all instance methods since these might 314 // Register selectors for all instance methods since these might
315 // be called on user classes from within the platform 315 // be called on user classes from within the platform
316 // implementation. 316 // implementation.
317 superclass.forEachLocalMember((MemberElement element) { 317 superclass.forEachLocalMember((MemberElement element) {
318 if (element.isConstructor || element.isStatic) return; 318 if (element.isConstructor || element.isStatic) return;
319 319
320 FunctionElement function = element.asFunctionElement();
321 element.computeType(resolution); 320 element.computeType(resolution);
322 Selector selector = new Selector.fromElement(element); 321 Selector selector = new Selector.fromElement(element);
323 registerUse(new DynamicUse(selector, null)); 322 registerUse(new DynamicUse(selector, null));
324 }); 323 });
325 } 324 }
326 } 325 }
327 } 326 }
328 } 327 }
329 } 328 }
330 329
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 } 531 }
533 532
534 // TODO(johnniwinther): Remove this when values are computed from the 533 // TODO(johnniwinther): Remove this when values are computed from the
535 // expressions. 534 // expressions.
536 @override 535 @override
537 void copyConstantValues(DartConstantTask task) { 536 void copyConstantValues(DartConstantTask task) {
538 constantCompiler.constantValueMap 537 constantCompiler.constantValueMap
539 .addAll(task.constantCompiler.constantValueMap); 538 .addAll(task.constantCompiler.constantValueMap);
540 } 539 }
541 } 540 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/dart2js.dart ('k') | pkg/compiler/lib/src/dart_types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698