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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1019903002: Revert "Don't generate forwarding hooks if all noSuchMethod implementations" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index e5285d384610dc4e54dbf1f952c28dd3dcee84f8..61701c3e9f2cc2f6c9499f4d36fa7ef1c0bb801c 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -585,9 +585,6 @@ class JavaScriptBackend extends Backend {
/// constructors for custom elements.
CustomElementsAnalysis customElementsAnalysis;
- /// Support for classifying `noSuchMethod` implementations.
- NoSuchMethodRegistry noSuchMethodRegistry;
-
JavaScriptConstantTask constantCompilerTask;
JavaScriptResolutionCallbacks resolutionCallbacks;
@@ -596,8 +593,6 @@ class JavaScriptBackend extends Backend {
bool get canHandleCompilationFailed => true;
- bool enabledNoSuchMethod = false;
-
JavaScriptBackend(Compiler compiler, bool generateSourceMap)
: namer = determineNamer(compiler),
oneShotInterceptors = new Map<String, Selector>(),
@@ -608,7 +603,6 @@ class JavaScriptBackend extends Backend {
emitter = new CodeEmitterTask(compiler, namer, generateSourceMap);
typeVariableHandler = new TypeVariableHandler(this);
customElementsAnalysis = new CustomElementsAnalysis(this);
- noSuchMethodRegistry = new NoSuchMethodRegistry(this);
constantCompilerTask = new JavaScriptConstantTask(compiler);
resolutionCallbacks = new JavaScriptResolutionCallbacks(this);
patchResolverTask = new PatchResolverTask(compiler);
@@ -1216,13 +1210,11 @@ class JavaScriptBackend extends Backend {
enqueueClass(compiler.enqueuer.resolution, compiler.stringClass, registry);
}
- void registerNoSuchMethod(Element noSuchMethod) {
- noSuchMethodRegistry.registerNoSuchMethod(noSuchMethod);
- }
-
- void enableNoSuchMethod(Enqueuer world) {
+ void enableNoSuchMethod(Element context, Enqueuer world) {
enqueue(world, getCreateInvocationMirror(), compiler.globalDependencies);
world.registerInvocation(compiler.noSuchMethodSelector);
+ // TODO(tyoverby): Send the context element to DumpInfoTask to be
+ // blamed.
}
void enableIsolateSupport(Enqueuer enqueuer) {
@@ -2411,14 +2403,6 @@ class JavaScriptBackend extends Backend {
customElementsAnalysis.onQueueEmpty(enqueuer);
if (!enqueuer.queueIsEmpty) return false;
- noSuchMethodRegistry.onQueueEmpty();
- if (!enabledNoSuchMethod &&
- (noSuchMethodRegistry.hasThrowingNoSuchMethod ||
- noSuchMethodRegistry.hasComplexNoSuchMethod)) {
- enableNoSuchMethod(enqueuer);
- enabledNoSuchMethod = true;
- }
-
if (compiler.hasIncrementalSupport) {
// Always enable tear-off closures during incremental compilation.
Element e = findHelper('closureFromTearOff');
« no previous file with comments | « pkg/compiler/lib/src/enqueue.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698