Chromium Code Reviews| Index: pkg/kernel/lib/type_propagation/builder.dart |
| diff --git a/pkg/kernel/lib/type_propagation/builder.dart b/pkg/kernel/lib/type_propagation/builder.dart |
| index 2ac6e19b631d99390054b4991984e70bdd17572b..8bea26a7c73a0b1612217d750bf010c6d91d4223 100644 |
| --- a/pkg/kernel/lib/type_propagation/builder.dart |
| +++ b/pkg/kernel/lib/type_propagation/builder.dart |
| @@ -116,6 +116,7 @@ class Builder { |
| int futureNode; |
| int streamNode; |
| int functionValueNode; |
| + int vectorNode; |
| int iteratorField; |
| int currentField; |
| @@ -229,6 +230,7 @@ class Builder { |
| streamNode = getExternalInstanceVariable(coreTypes.streamClass); |
| functionValueNode = getExternalInstanceVariable(coreTypes.functionClass); |
| nullNode = newVariable(null, 'Null'); |
| + vectorNode = newVariable(null, 'Vector'); |
| iteratorField = getPropertyField(Names.iterator); |
| currentField = getPropertyField(Names.current); |
| @@ -1802,6 +1804,10 @@ class CovariantExternalTypeVisitor extends DartTypeVisitor<int> { |
| return builder.nullNode; |
| } |
| + int visitVectorType(VectorType node) { |
| + return builder.vectorNode; |
|
asgerf
2017/03/27 11:15:39
Just throw an exception here. This visitor analyse
Dmitry Stefantsov
2017/03/27 12:17:24
Done.
|
| + } |
| + |
| int visitInterfaceType(InterfaceType node) { |
| int object = builder.getExternalInstanceVariable(node.classNode); |
| for (int i = 0; i < node.typeArguments.length; ++i) { |
| @@ -1909,6 +1915,8 @@ class ContravariantExternalTypeVisitor extends DartTypeVisitor<Null> { |
| visitVoidType(VoidType node) {} |
| + visitVectorType(VectorType node) {} |
| + |
| visitInterfaceType(InterfaceType node) { |
| int escapePoint = builder.getInterfaceEscapeVariable(node.classNode); |
| environment.addAssign(input, escapePoint); |