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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/dart_backend/backend.dart

Issue 23593002: Only emit members in mirror helper symbolsmap. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Changed comment. Created 7 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/renamer.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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
469 if (element.isClass() && !element.isMixinApplication) { 469 if (element.isClass() && !element.isMixinApplication) {
470 final members = <Node>[]; 470 final members = <Node>[];
471 for (final member in sortedClassMembers[element]) { 471 for (final member in sortedClassMembers[element]) {
472 members.add(elementAsts[member].ast); 472 members.add(elementAsts[member].ast);
473 } 473 }
474 memberNodes[elementAsts[element].ast] = members; 474 memberNodes[elementAsts[element].ast] = members;
475 } 475 }
476 } 476 }
477 477
478 if (useMirrorHelperLibrary) { 478 if (useMirrorHelperLibrary) {
479 mirrorRenamer.addRenames(renames, topLevelNodes); 479 mirrorRenamer.addRenames(renames, topLevelNodes, collector);
480 } 480 }
481 481
482 final unparser = new EmitterUnparser(renames); 482 final unparser = new EmitterUnparser(renames);
483 emitCode(unparser, imports, topLevelNodes, memberNodes); 483 emitCode(unparser, imports, topLevelNodes, memberNodes);
484 compiler.assembledCode = unparser.result; 484 compiler.assembledCode = unparser.result;
485 485
486 // Output verbose info about size ratio of resulting bundle to all 486 // Output verbose info about size ratio of resulting bundle to all
487 // referenced non-platform sources. 487 // referenced non-platform sources.
488 logResultBundleSizeInfo(topLevelElements); 488 logResultBundleSizeInfo(topLevelElements);
489 } 489 }
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
613 } 613 }
614 614
615 compareElements(e0, e1) { 615 compareElements(e0, e1) {
616 int result = compareBy((e) => e.getLibrary().canonicalUri.toString())(e0, e1); 616 int result = compareBy((e) => e.getLibrary().canonicalUri.toString())(e0, e1);
617 if (result != 0) return result; 617 if (result != 0) return result;
618 return compareBy((e) => e.position().charOffset)(e0, e1); 618 return compareBy((e) => e.position().charOffset)(e0, e1);
619 } 619 }
620 620
621 List<Element> sortElements(Iterable<Element> elements) => 621 List<Element> sortElements(Iterable<Element> elements) =>
622 sorted(elements, compareElements); 622 sorted(elements, compareElements);
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/dart_backend/renamer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698