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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart

Issue 22791002: Add renames in output when using the mirror helper library. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments and fixed some latent bugs in other parts of the code. Created 7 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: sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
index db7b9eef095b278e8cc5f71915683b62b1627e48..8edbba9044505251112df41511b60c3a0fe9ed03 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/placeholder_collector.dart
@@ -45,7 +45,6 @@ class SendVisitor extends ResolvedVisitor {
final PlaceholderCollector collector;
get compiler => collector.compiler;
- DartBackend get backend => compiler.backend;
SendVisitor(this.collector, TreeElements elements) : super(elements);
@@ -107,7 +106,7 @@ class SendVisitor extends ResolvedVisitor {
visitStaticSend(Send node) {
final element = elements[node];
- backend.registerStaticSend(element, node);
+ collector.backend.registerStaticSend(element, node);
if (Elements.isUnresolved(element)
|| identical(element, compiler.assertMethod)) {
@@ -161,6 +160,7 @@ class PlaceholderCollector extends Visitor {
LibraryElement get coreLibrary => compiler.coreLibrary;
FunctionElement get entryFunction => compiler.mainApp.find(Compiler.MAIN);
+ DartBackend get backend => compiler.backend;
get currentFunctionScope => functionScopes.putIfAbsent(
topmostEnclosingFunction, () => new FunctionScope());
@@ -538,6 +538,9 @@ class PlaceholderCollector extends Visitor {
id != null && Keyword.keywords[id.source.slowToString()] != null;
Element element = treeElements[node];
+ if (element == backend.mirrorHelperGetNameFunction) {
+ backend.registerHelperFunction(element, node);
+ }
// May get null here in case of A(int this.f());
if (element != null) {
// Rename only local functions.

Powered by Google App Engine
This is Rietveld 408576698