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

Unified Diff: pkg/compiler/lib/src/js_emitter/model.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: REBASE 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/model.dart
diff --git a/pkg/compiler/lib/src/js_emitter/model.dart b/pkg/compiler/lib/src/js_emitter/model.dart
index b7c348b9fcfeea9f76a44167dc317e83bdffdd92..6b3ea300512ba3fef7a1f02ffc1efb29616fc4ac 100644
--- a/pkg/compiler/lib/src/js_emitter/model.dart
+++ b/pkg/compiler/lib/src/js_emitter/model.dart
@@ -335,7 +335,6 @@ class DartMethod extends Method {
final bool needsTearOff;
final String tearOffName;
final List<ParameterStubMethod> parameterStubs;
- // TODO(herhut): Directly store aliases instead.
final bool canBeApplied;
final bool canBeReflected;
@@ -357,16 +356,20 @@ class DartMethod extends Method {
}
class InstanceMethod extends DartMethod {
- // TODO(herhut): Directly store aliases instead.
- final bool hasSuperAlias;
+ /// An alternative name for this method. This is used to model calls to
+ /// a method via `super`. If [aliasName] is non-null, the emitter has to
+ /// ensure that this method is registered on the prototype under both [name]
+ /// and [aliasName].
+ final String aliasName;
final bool isClosure;
+
InstanceMethod(Element element, String name, js.Expression code,
List<ParameterStubMethod> parameterStubs,
String callName,
{bool needsTearOff,
String tearOffName,
- this.hasSuperAlias,
+ this.aliasName,
bool canBeApplied,
bool canBeReflected,
this.isClosure})
@@ -375,7 +378,6 @@ class InstanceMethod extends DartMethod {
tearOffName: tearOffName,
canBeApplied: canBeApplied,
canBeReflected: canBeReflected) {
- assert(hasSuperAlias != null);
assert(isClosure != null);
}
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_emitter/old_emitter/container_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698