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

Unified Diff: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart

Issue 727403002: Only emit support for aliasing methods if super calls are present. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
index 0ea1989c086d203fba248ef852890c3e388e6e12..91d8ff4647a2ce72f195947a87cfa4e8e811fff6 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/emitter.dart
@@ -355,6 +355,7 @@ class OldEmitter implements Emitter {
}
List buildSplitOffAliases() {
+ if (backend.aliasedSuperMembers.isEmpty) return [];
return [js(r'''
var splitOffAliases = function(constructor) {
var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -543,7 +544,7 @@ class OldEmitter implements Emitter {
// Process aliased members due to super calls. We have to do this early
// to ensure that we also hit the object class.
- splitOffAliases(constructor);
+ if (#) splitOffAliases(constructor);
// The superclass is only false (empty string) for the Dart Object
// class. The minifier together with noSuchMethod can put methods on
@@ -609,6 +610,7 @@ class OldEmitter implements Emitter {
}
}
}''', [finishedClassesAccess,
+ backend.aliasedSuperMembers.isNotEmpty,
!nativeClasses.isEmpty,
interceptorsByTagAccess,
leafTagsAccess,
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698