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

Unified Diff: pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart

Issue 861713002: Handle super-method invocations in CPS->JS backend. (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/dart_backend/backend_ast_emitter.dart
diff --git a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
index 26a0fa57e735e696a91fcfa490e0838bf6abc0bc..7adc39fb50501a0f44d5d99112d8f3f2aebcd573 100644
--- a/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
+++ b/pkg/compiler/lib/src/dart_backend/backend_ast_emitter.dart
@@ -777,8 +777,12 @@ class ASTEmitter
}
@override
- Expression visitInvokeSuperMethod(tree.InvokeSuperMethod exp,
- BuilderContext<Statement> context) {
+ Expression visitInvokeMethodDirectly(tree.InvokeMethodDirectly exp,
+ BuilderContext<Statement> context) {
+ // When targeting Dart, InvokeMethodDirectly is only used for super calls.
+ // The receiver is known to be `this`, and the target method is a method
+ // on the super class. So we just translate it as a method call with the
+ // super receiver.
sigurdm 2015/01/20 10:54:25 Perhaps put asserts here that the invariant is mai
asgerf 2015/01/20 13:07:50 Unfortunately there is no good way to do that. If
return emitMethodCall(exp, new SuperReceiver(), context);
}

Powered by Google App Engine
This is Rietveld 408576698