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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart

Issue 349923004: Add support for superSend to the new IR and dart backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Also handle implicit this, fix a typeerror. Created 6 years, 6 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: sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
index 4906aaaaaf0a1b4780e0234bb492cd6977a940dc..42febb740c68a2e2cf8aa2e6dd10979bb936e5d7 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_codegen.dart
@@ -389,8 +389,7 @@ class ASTEmitter extends tree.Visitor<dynamic, Expression> {
}
}
- Expression visitInvokeMethod(tree.InvokeMethod exp) {
- Expression receiver = visitExpression(exp.receiver);
+ Expression emitMethodCall(tree.Invoke exp, Receiver receiver) {
List<Argument> args = emitArguments(exp);
switch (exp.selector.kind) {
case SelectorKind.CALL:
@@ -429,6 +428,15 @@ class ASTEmitter extends tree.Visitor<dynamic, Expression> {
}
}
+ Expression visitInvokeMethod(tree.InvokeMethod exp) {
+ Expression receiver = visitExpression(exp.receiver);
+ return emitMethodCall(exp, receiver);
+ }
+
+ Expression visitInvokeSuperMethod(tree.InvokeSuperMethod exp) {
+ return emitMethodCall(exp, new SuperReceiver());
+ }
+
Expression visitInvokeConstructor(tree.InvokeConstructor exp) {
List args = emitArguments(exp);
FunctionElement constructor = exp.target;

Powered by Google App Engine
This is Rietveld 408576698