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

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

Issue 881363006: Store the aliasName of a method in the model. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/js_emitter/old_emitter/container_builder.dart
diff --git a/pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart b/pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart
index 9b9e2519326b39c49343898e3e0562cd10e183a1..77df71f9d49817a524dd7067c4d7aa919cbe6b72 100644
--- a/pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart
+++ b/pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart
@@ -252,7 +252,9 @@ class ContainerBuilder extends CodeEmitterHelper {
bool canTearOff = method.needsTearOff;
String tearOffName = method.tearOffName;
final bool isClosure = method is InstanceMethod && method.isClosure;
- final bool hasSuperAlias = method is InstanceMethod && method.hasSuperAlias;
+ final String superAlias = method is InstanceMethod ? method.aliasName
floitsch 2015/01/29 15:24:35 Remove the `final` if that makes it fit on one lin
herhut 2015/02/03 10:20:16 Removed them all.
+ : null;
+ final bool hasSuperAlias = superAlias != null;
bool canBeReflected = backend.isAccessibleByReflection(member);
// During incremental compilation, we have to assume that reflection
@@ -322,9 +324,8 @@ class ContainerBuilder extends CodeEmitterHelper {
List<jsAst.Expression> expressions = <jsAst.Expression>[];
// Create the optional aliasing entry if this method is called via super.
- if (backend.isAliasedSuperMember(member)) {
- expressions.add(new jsAst.LiteralString(
- '"${namer.getNameOfAliasedSuperMember(member)}"'));
+ if (hasSuperAlias) {
+ expressions.add(new jsAst.LiteralString('"${superAlias}"'));
}
expressions.add(code);

Powered by Google App Engine
This is Rietveld 408576698