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

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

Issue 10836261: dart2dart Preproces placeholders instead of renaming them lazily, (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 | lib/compiler/implementation/dart_backend/dart_backend.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 class DartBackend extends Backend { 5 class DartBackend extends Backend {
6 final List<CompilerTask> tasks; 6 final List<CompilerTask> tasks;
7 final UnparseValidator unparseValidator; 7 final UnparseValidator unparseValidator;
8 8
9 Map<Element, TreeElements> get resolvedElements() => 9 Map<Element, TreeElements> get resolvedElements() =>
10 compiler.enqueuer.resolution.resolvedElements; 10 compiler.enqueuer.resolution.resolvedElements;
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 new ReferencedElementCollector( 68 new ReferencedElementCollector(
69 compiler, element, treeElements, typedefs, classes) 69 compiler, element, treeElements, typedefs, classes)
70 .collect(); 70 .collect();
71 }); 71 });
72 final emptyTreeElements = new TreeElementMapping(); 72 final emptyTreeElements = new TreeElementMapping();
73 collectElement(element) { collector.collect(element, emptyTreeElements); } 73 collectElement(element) { collector.collect(element, emptyTreeElements); }
74 typedefs.forEach(collectElement); 74 typedefs.forEach(collectElement);
75 classes.forEach(collectElement); 75 classes.forEach(collectElement);
76 76
77 ConflictingRenamer renamer = 77 ConflictingRenamer renamer =
78 new ConflictingRenamer(compiler, collector.placeholders); 78 new ConflictingRenamer(compiler, collector);
79 Emitter emitter = new Emitter(compiler, renamer); 79 Emitter emitter = new Emitter(compiler, renamer);
80 resolvedElements.forEach((element, treeElements) { 80 resolvedElements.forEach((element, treeElements) {
81 if (!shouldOutput(element)) return; 81 if (!shouldOutput(element)) return;
82 if (element.isMember()) { 82 if (element.isMember()) {
83 ClassElement enclosingClass = element.getEnclosingClass(); 83 ClassElement enclosingClass = element.getEnclosingClass();
84 assert(enclosingClass.isClass()); 84 assert(enclosingClass.isClass());
85 assert(enclosingClass.isTopLevel()); 85 assert(enclosingClass.isTopLevel());
86 addMemberToClass(element, enclosingClass); 86 addMemberToClass(element, enclosingClass);
87 return; 87 return;
88 } 88 }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 typeAnnotation.visitChildren(this); 163 typeAnnotation.visitChildren(this);
164 } 164 }
165 165
166 void collect() { 166 void collect() {
167 compiler.withCurrentElement(rootElement, () { 167 compiler.withCurrentElement(rootElement, () {
168 rootElement.parseNode(compiler).accept(this); 168 rootElement.parseNode(compiler).accept(this);
169 }); 169 });
170 } 170 }
171 } 171 }
OLDNEW
« no previous file with comments | « no previous file | lib/compiler/implementation/dart_backend/dart_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698