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

Unified Diff: pkg/compiler/lib/src/enqueue.dart

Issue 996263002: Don't generate forwarding hooks if all noSuchMethod implementations (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: More tests Created 5 years, 9 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: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index e00b7502307ec18991bc98417fd171974ca51c46..571b08897ca6f7878f3d7cfa7790b5d031d44d2d 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -162,7 +162,7 @@ abstract class Enqueuer {
FunctionElement function = member;
function.computeSignature(compiler);
if (function.name == Compiler.NO_SUCH_METHOD) {
- enableNoSuchMethod(function);
+ compiler.backend.registerNoSuchMethod(function, this);
Johnni Winther 2015/03/16 14:20:43 Move this to the ResolutionEnqueuer; only resoluti
Harry Terkelsen 2015/03/17 21:43:11 I am calling Enqueuer.registerNoSuchMethod here be
}
if (function.name == Compiler.CALL_OPERATOR_NAME &&
!cls.typeVariables.isEmpty) {
@@ -212,7 +212,6 @@ abstract class Enqueuer {
.add(member);
}
- void enableNoSuchMethod(Element element) {}
void enableIsolateSupport() {}
void processInstantiatedClass(ClassElement cls) {
@@ -741,14 +740,6 @@ class ResolutionEnqueuer extends Enqueuer {
compiler.backend.enableIsolateSupport(this);
}
- void enableNoSuchMethod(Element element) {
- if (compiler.enabledNoSuchMethod) return;
- if (compiler.backend.isDefaultNoSuchMethodImplementation(element)) return;
-
- compiler.enabledNoSuchMethod = true;
- compiler.backend.enableNoSuchMethod(element, this);
- }
-
/**
* Adds an action to the deferred task queue.
*

Powered by Google App Engine
This is Rietveld 408576698