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

Unified Diff: sdk/lib/_internal/compiler/implementation/ir/ir_nodes.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/ir/ir_nodes.dart
diff --git a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
index d7e61f51cc3299f5dd0fcd714ae85b8042746126..bd0ec30726045bd8bbf58d454d623aa2cffc9370 100644
--- a/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
+++ b/sdk/lib/_internal/compiler/implementation/ir/ir_nodes.dart
@@ -307,6 +307,12 @@ class Constant extends Primitive {
accept(Visitor visitor) => visitor.visitConstant(this);
}
+class This extends Primitive {
+ This();
+
+ accept(Visitor visitor) => visitor.visitThis(this);
+}
+
class LiteralList extends Primitive {
/// The List type being created; this is not the type argument.
final GenericType type;
@@ -406,6 +412,7 @@ abstract class Visitor<T> {
T visitLiteralList(LiteralList node) => visitPrimitive(node);
T visitLiteralMap(LiteralMap node) => visitPrimitive(node);
T visitConstant(Constant node) => visitPrimitive(node);
+ T visitThis(This node) => visitPrimitive(node);
T visitInvokeConstConstructor(InvokeConstConstructor node) => visitPrimitive(node);
T visitParameter(Parameter node) => visitPrimitive(node);
T visitContinuation(Continuation node) => visitDefinition(node);

Powered by Google App Engine
This is Rietveld 408576698