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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.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/tree_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
index 018996ad1808673d9feafaae8173881c8cdc3d3c..91bca1aeb243151aec8f0a5fd8095a08d8f9ed83 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
@@ -57,6 +57,7 @@ class BlockCollector extends Visitor {
visitVariable(Variable node) {}
visitInvokeStatic(InvokeStatic node) {}
visitInvokeMethod(InvokeMethod node) {}
+ visitInvokeSuperMethod(InvokeSuperMethod node) {}
visitInvokeConstructor(InvokeConstructor node) {}
visitConcatenateStrings(ConcatenateStrings node) {}
visitLiteralList(LiteralList node) {}
@@ -304,6 +305,13 @@ class SubexpressionVisitor extends ExpressionVisitor<String> {
return "$receiver.$name($args)";
}
+ String visitInvokeSuperMethod(InvokeSuperMethod node) {
+ String receiver = node.receiver.accept(this);
+ String name = node.selector.name;
+ String args = formatArguments(node);
+ return "super.$name($args)";
+ }
+
String visitInvokeConstructor(InvokeConstructor node) {
String callName;
if (node.target.name.isEmpty) {

Powered by Google App Engine
This is Rietveld 408576698