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

Unified Diff: sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.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: 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_tree.dart
diff --git a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
index e8f61d009c3b54fc390a098d0bfbc1c422e14394..074521b4aba9a961ed60026dee568777c9909ba7 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/dart_tree.dart
@@ -178,6 +178,10 @@ class This extends Expression {
accept(Visitor visitor) => visitor.visitThis(this);
}
+class Super extends Expression {
asgerf 2014/06/23 10:55:17 I would prefer that we did this like in dart_tree,
sigurdm 2014/06/24 09:23:08 Good point - did that.
+ accept(Visitor visitor) => visitor.visitSuper(this);
+}
+
class LiteralList extends Expression {
final GenericType type;
final List<Expression> values;
@@ -426,6 +430,7 @@ abstract class ExpressionVisitor<E> {
E visitConcatenateStrings(ConcatenateStrings node);
E visitConstant(Constant node);
E visitThis(This node);
+ E visitSuper(Super node);
E visitConditional(Conditional node);
E visitLogicalOperator(LogicalOperator node);
E visitNot(Not node);
@@ -817,6 +822,10 @@ class Builder extends ir.Visitor<Node> {
return new This();
}
+ Expression visitSuper(ir.Super node) {
+ return new Super();
+ }
+
Expression visitLiteralList(ir.LiteralList node) {
return new LiteralList(
node.type,
@@ -1168,6 +1177,10 @@ class StatementRewriter extends Visitor<Statement, Expression> {
return node;
}
+ Expression visitSuper(Super node) {
+ return node;
+ }
+
Expression visitLiteralList(LiteralList node) {
// Process values right-to-left, the opposite of evaluation order.
for (int i = node.values.length - 1; i >= 0; --i) {
@@ -1684,6 +1697,10 @@ class LogicalRewriter extends Visitor<Statement, Expression> {
return node;
}
+ Expression visitSuper(Super node) {
+ return node;
+ }
+
Expression visitNot(Not node) {
return toBoolean(makeCondition(node.operand, false, liftNots: false));
}

Powered by Google App Engine
This is Rietveld 408576698