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

Unified Diff: pkg/kernel/lib/type_propagation/builder.dart

Issue 2767773004: Add Vector type to Kernel (Closed)
Patch Set: Update binary.md file to include Vector AST nodes Created 3 years, 9 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: 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);

Powered by Google App Engine
This is Rietveld 408576698