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

Unified Diff: pkg/compiler/lib/src/compiler.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: Return enum result for _categorizeImpl 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 | « no previous file | pkg/compiler/lib/src/dump_info.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index bd636e43a98c5c2f623e183ea38a58fa566a4e1a..ea8c60cb0b32beb85f61226f7cd163eb7bab370c 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -361,13 +361,14 @@ abstract class Backend {
*/
void registerRuntimeType(Enqueuer enqueuer, Registry registry) {}
- /**
- * Call this method to enable [noSuchMethod] handling in the
- * backend.
- */
- void enableNoSuchMethod(Element context, Enqueuer enqueuer) {
- enqueuer.registerInvocation(compiler.noSuchMethodSelector);
- }
+ /// Call this to register a `noSuchMethod` implementation.
+ void registerNoSuchMethod(Element noSuchMethodElement) {}
+
+ /// Call this method to enable support for `noSuchMethod`.
+ void enableNoSuchMethod(Enqueuer enqueuer) {}
+
+ /// Returns whether or not `noSuchMethod` support has been enabled.
+ bool get enabledNoSuchMethod => false;
/// Call this method to enable support for isolates.
void enableIsolateSupport(Enqueuer enqueuer) {}
@@ -949,7 +950,6 @@ abstract class Compiler implements DiagnosticListener {
final Selector symbolValidatedConstructorSelector = new Selector.call(
'validated', null, 1);
- bool enabledNoSuchMethod = false;
bool enabledRuntimeType = false;
bool enabledFunctionApply = false;
bool enabledInvokeOn = false;
@@ -1623,9 +1623,6 @@ abstract class Compiler implements DiagnosticListener {
if (hasIsolateSupport) {
backend.enableIsolateSupport(enqueuer.codegen);
}
- if (enabledNoSuchMethod) {
- backend.enableNoSuchMethod(null, enqueuer.codegen);
- }
if (compileAll) {
libraryLoader.libraries.forEach((LibraryElement library) {
fullyEnqueueLibrary(library, enqueuer.codegen);
« no previous file with comments | « no previous file | pkg/compiler/lib/src/dump_info.dart » ('j') | pkg/compiler/lib/src/js_backend/backend.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698