| Index: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
|
| diff --git a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
|
| index 2b37c176b1c5e4c80d67e887ab929d4f10d7ca8c..e0d82f7e76a2be8e816e5539e5c9646aa5be4e5c 100644
|
| --- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
|
| +++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart
|
| @@ -6,7 +6,7 @@ library tree_ir_nodes;
|
|
|
| import '../constants/expressions.dart';
|
| import '../constants/values.dart' as values;
|
| -import '../dart_types.dart' show DartType, GenericType;
|
| +import '../dart_types.dart' show DartType, GenericType, TypeVariableType;
|
| import '../elements/elements.dart';
|
| import '../universe/universe.dart';
|
| import '../universe/universe.dart' show Selector;
|
| @@ -230,7 +230,7 @@ class This extends Expression {
|
| accept1(ExpressionVisitor1 visitor, arg) => visitor.visitThis(this, arg);
|
| }
|
|
|
| -class ReifyTypeVar extends Expression {
|
| +class ReifyTypeVar extends Expression implements DartSpecificNode {
|
| TypeVariableElement typeVariable;
|
|
|
| ReifyTypeVar(this.typeVariable);
|
| @@ -717,6 +717,36 @@ class SetField extends Statement implements JsSpecificNode {
|
| accept1(StatementVisitor1 visitor, arg) => visitor.visitSetField(this, arg);
|
| }
|
|
|
| +class ReifyRuntimeType extends Expression implements JsSpecificNode {
|
| + Expression value;
|
| +
|
| + ReifyRuntimeType(this.value);
|
| +
|
| + accept(ExpressionVisitor visitor) {
|
| + return visitor.visitReifyRuntimeType(this);
|
| + }
|
| +
|
| + accept1(ExpressionVisitor1 visitor, arg) {
|
| + return visitor.visitReifyRuntimeType(this, arg);
|
| + }
|
| +}
|
| +
|
| +class ReadTypeVariable extends Expression implements JsSpecificNode {
|
| + final TypeVariableType variable;
|
| + final ClassElement context;
|
| + Expression target;
|
| +
|
| + ReadTypeVariable(this.variable, this.context, this.target);
|
| +
|
| + accept(ExpressionVisitor visitor) {
|
| + return visitor.visitReadTypeVariable(this);
|
| + }
|
| +
|
| + accept1(ExpressionVisitor1 visitor, arg) {
|
| + return visitor.visitReadTypeVariable(this, arg);
|
| + }
|
| +}
|
| +
|
| abstract class ExpressionVisitor<E> {
|
| E visitExpression(Expression e) => e.accept(this);
|
| E visitVariable(Variable node);
|
| @@ -740,6 +770,8 @@ abstract class ExpressionVisitor<E> {
|
| E visitGetField(GetField node);
|
| E visitCreateBox(CreateBox node);
|
| E visitCreateInstance(CreateInstance node);
|
| + E visitReifyRuntimeType(ReifyRuntimeType node);
|
| + E visitReadTypeVariable(ReadTypeVariable node);
|
| }
|
|
|
| abstract class ExpressionVisitor1<E, A> {
|
| @@ -765,6 +797,8 @@ abstract class ExpressionVisitor1<E, A> {
|
| E visitGetField(GetField node, A arg);
|
| E visitCreateBox(CreateBox node, A arg);
|
| E visitCreateInstance(CreateInstance node, A arg);
|
| + E visitReifyRuntimeType(ReifyRuntimeType reifyRuntimeType, A arg);
|
| + E visitReadTypeVariable(ReadTypeVariable readTypeVariable, A arg);
|
| }
|
|
|
| abstract class StatementVisitor<S> {
|
| @@ -954,4 +988,12 @@ class RecursiveVisitor extends Visitor {
|
| visitCreateInstance(CreateInstance node) {
|
| node.arguments.forEach(visitExpression);
|
| }
|
| +
|
| + visitReifyRuntimeType(ReifyRuntimeType node) {
|
| + visitExpression(node.value);
|
| + }
|
| +
|
| + visitReadTypeVariable(ReadTypeVariable node) {
|
| + visitExpression(node.target);
|
| + }
|
| }
|
|
|