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

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

Issue 16042014: Implement operator== and hashCode for bound closures. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/enqueue.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/enqueue.dart (revision 23339)
+++ sdk/lib/_internal/compiler/implementation/enqueue.dart (working copy)
@@ -209,20 +209,19 @@
if (member.name == Compiler.NO_SUCH_METHOD) {
enableNoSuchMethod(member);
}
- if (universe.hasInvocation(member, compiler)) {
- return addToWorkList(member);
- }
// If there is a property access with the same name as a method we
// need to emit the method.
if (universe.hasInvokedGetter(member, compiler)) {
- // We will emit a closure, so make sure the closure class is
+ // We will emit a closure, so make sure the bound closure class is
// generated.
- compiler.closureClass.ensureResolved(compiler);
- registerInstantiatedClass(compiler.closureClass,
+ registerInstantiatedClass(compiler.boundClosureClass,
// Precise dependency is not important here.
compiler.globalDependencies);
return addToWorkList(member);
}
+ if (universe.hasInvocation(member, compiler)) {
+ return addToWorkList(member);
+ }
} else if (member.kind == ElementKind.GETTER) {
if (universe.hasInvokedGetter(member, compiler)) {
return addToWorkList(member);
@@ -420,6 +419,10 @@
} else {
addToWorkList(member);
}
+ if (selector.isGetter() && member.isFunction()) {
+ registerInstantiatedClass(compiler.boundClosureClass,
+ compiler.globalDependencies);
+ }
return true;
}
return false;
@@ -439,6 +442,8 @@
void registerGetOfStaticFunction(FunctionElement element) {
registerStaticUse(element);
+ registerInstantiatedClass(compiler.closureClass,
+ compiler.globalDependencies);
universe.staticFunctionsNeedingGetter.add(element);
}

Powered by Google App Engine
This is Rietveld 408576698