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

Unified Diff: lib/compiler/implementation/dart_backend/backend.dart

Issue 10836128: A visitor that builds a map from node to "Usage". (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 side-by-side diff with in-line comments
Download patch
Index: lib/compiler/implementation/dart_backend/backend.dart
diff --git a/lib/compiler/implementation/dart_backend/backend.dart b/lib/compiler/implementation/dart_backend/backend.dart
index ac03dfe86c7658f555d6a303d7397fb7859583d2..443aa6df145ba6f22bbcd04b7e5019c45e13a93f 100644
--- a/lib/compiler/implementation/dart_backend/backend.dart
+++ b/lib/compiler/implementation/dart_backend/backend.dart
@@ -70,7 +70,16 @@ class DartBackend extends Backend {
!isDartCoreLib(compiler, element.getLibrary());
try {
- Emitter emitter = new Emitter(compiler);
+ Usager usager = new Usager(compiler);
+ resolvedElements.forEach((element, treeElements) {
+ if (!shouldOutput(element)
+ || element is SynthesizedConstructorElement
+ || element is AbstractFieldElement) return;
+ usager.process(element, treeElements);
+ });
+ ConflictingRenamer renamer =
+ new ConflictingRenamer(compiler, usager.usages);
+ Emitter emitter = new Emitter(compiler, renamer);
resolvedElements.forEach((element, treeElements) {
if (!shouldOutput(element)) return;
if (element.isMember()) {

Powered by Google App Engine
This is Rietveld 408576698