Chromium Code Reviews| 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 63b7528d0711955e8457fc49d0e0b6d417b1e67b..3e990abf6cf37ea86fc8ce99aaee35055f4777d9 100644 |
| --- a/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart |
| +++ b/pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart |
| @@ -114,7 +114,7 @@ class Variable extends Node { |
| assert(host != null); |
| } |
| - String toString() => element == null ? 'Variable' : element.toString(); |
| + String toString() => element == null ? 'Variable.${hashCode}' : element.toString(); |
| } |
| /// Read the value of a variable. |
| @@ -669,7 +669,7 @@ class CreateBox extends Expression { |
| class CreateInstance extends Expression { |
| ClassElement classElement; |
| List<Expression> arguments; |
| - List<Expression> typeInformation; |
| + Expression typeInformation; |
| SourceInformation sourceInformation; |
| CreateInstance(this.classElement, this.arguments, |
| @@ -904,8 +904,9 @@ class ForeignStatement extends ForeignCode implements Statement { |
| class TypeExpression extends Expression { |
| final DartType dartType; |
| final List<Expression> arguments; |
| + final bool isForInstance; |
| - TypeExpression(this.dartType, this.arguments); |
| + TypeExpression(this.dartType, this.arguments, this.isForInstance); |
| accept(ExpressionVisitor visitor) { |
| return visitor.visitTypeExpression(this); |
| @@ -1216,7 +1217,7 @@ abstract class RecursiveVisitor implements StatementVisitor, ExpressionVisitor { |
| visitCreateInstance(CreateInstance node) { |
| node.arguments.forEach(visitExpression); |
| - node.typeInformation.forEach(visitExpression); |
| + if (node.typeInformation != null) visitExpression(node.typeInformation); |
| } |
| visitReifyRuntimeType(ReifyRuntimeType node) { |
| @@ -1457,7 +1458,8 @@ class RecursiveTransformer extends Transformer { |
| visitCreateInstance(CreateInstance node) { |
| _replaceExpressions(node.arguments); |
| - _replaceExpressions(node.typeInformation); |
| + if (node.typeInformation != null) |
| + node.typeInformation = visitExpression(node.typeInformation); |
|
asgerf
2016/01/26 10:30:01
I have been told we need {} around the body of mul
sra1
2016/01/26 22:21:08
Done.
|
| return node; |
| } |