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

Unified Diff: lib/compiler/implementation/enqueue.dart

Issue 10854158: Make selector registration in the resolver and code generator more explicit. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Merge from master. 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/enqueue.dart
diff --git a/lib/compiler/implementation/enqueue.dart b/lib/compiler/implementation/enqueue.dart
index 0dc6bf8d2a94702db757d6a86d8da619861289b1..ff5e1a91b49806027de237b0043bbdee21762210 100644
--- a/lib/compiler/implementation/enqueue.dart
+++ b/lib/compiler/implementation/enqueue.dart
@@ -143,31 +143,6 @@ class Enqueuer {
cls.localMembers.forEach(processInstantiatedClassMember);
}
- void registerFieldClosureInvocations() {
- task.measure(() {
- // Make sure that the closure understands a call with the given
- // selector. For a method-invocation of the form o.foo(a: 499), we
- // need to make sure that closures can handle the optional argument if
- // there exists a field or getter 'foo'.
- var names = universe.instantiatedClassInstanceFields;
- // TODO(ahe): Might be enough to use invokedGetters.
- for (SourceString name in names) {
- Set<Selector> invokedSelectors = universe.invokedNames[name];
- if (invokedSelectors != null) {
- for (Selector selector in invokedSelectors) {
- Selector call = new Selector.call(
- compiler.namer.CLOSURE_INVOCATION_NAME,
- selector.library, // TODO(kasperl): Use "default" library?
- selector.argumentCount,
- selector.namedArguments);
- registerDynamicInvocation(compiler.namer.CLOSURE_INVOCATION_NAME,
- call);
- }
- }
- }
- });
- }
-
void processInstantiatedClassMember(Element member) {
if (universe.generatedCode.containsKey(member)) return;
if (resolvedElements[member] !== null) return;
@@ -352,8 +327,6 @@ class Enqueuer {
do {
floitsch 2012/08/15 14:14:04 remove the inner loop.
ahe 2012/08/15 14:32:21 Remove this loop.
kasperl 2012/08/16 10:35:47 Done.
kasperl 2012/08/16 10:35:47 Done.
f(queue.removeLast());
} while (!queue.isEmpty());
- // TODO(ahe): we shouldn't register the field closure invocations here.
- registerFieldClosureInvocations();
ahe 2012/08/15 14:32:21 Yay!
}
}
}

Powered by Google App Engine
This is Rietveld 408576698