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

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

Issue 329983002: Implement references to "this" in the new IR. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase 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 07886f8be2cb7b1734bef58d416c06513d792099..018996ad1808673d9feafaae8173881c8cdc3d3c 100644
--- a/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/dart_backend/tree_tracer.dart
@@ -62,6 +62,7 @@ class BlockCollector extends Visitor {
visitLiteralList(LiteralList node) {}
visitLiteralMap(LiteralMap node) {}
visitConstant(Constant node) {}
+ visitThis(This node) {}
visitConditional(Conditional node) {}
visitLogicalOperator(LogicalOperator node) {}
visitNot(Not node) {}
@@ -339,6 +340,10 @@ class SubexpressionVisitor extends ExpressionVisitor<String> {
return "${node.value}";
}
+ String visitThis(This node) {
+ return "this";
+ }
+
bool usesInfixNotation(Expression node) {
return node is Conditional || node is LogicalOperator;
}

Powered by Google App Engine
This is Rietveld 408576698