[kernel] Remove Vector-related Kernel nodes
They were supposed to be used as a part of the closure conversion pass,
which is now obsoleted.
Change-Id: Ie063f6c44487df7cd5d21895e8edc03251525d5f
Reviewed-on: https://dart-review.googlesource.com/68662
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index 61c71c7..0d008cc 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -2450,9 +2450,6 @@
}
@override
- visitVectorType(type) => defaultDartType(type);
-
- @override
visitFunctionType(type, {Member member, bool lazy = false}) {
var requiredTypes =
type.positionalParameters.take(type.requiredParameterCount).toList();
@@ -4884,21 +4881,6 @@
@override
visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) => js.boolean(true);
- @override
- visitVectorCreation(VectorCreation node) => defaultExpression(node);
-
- @override
- visitVectorGet(VectorGet node) => defaultExpression(node);
-
- @override
- visitVectorSet(VectorSet node) => defaultExpression(node);
-
- @override
- visitVectorCopy(VectorCopy node) => defaultExpression(node);
-
- @override
- visitClosureCreation(ClosureCreation node) => defaultExpression(node);
-
bool _reifyFunctionType(FunctionNode f) {
if (_currentLibrary.importUri.scheme != 'dart') return true;
var parent = f.parent;
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index 4ecc1ec..8f800cc 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -131,7 +131,7 @@
type ComponentFile {
UInt32 magic = 0x90ABCDEF;
- UInt32 formatVersion = 10;
+ UInt32 formatVersion = 11;
Library[] libraries;
UriSource sourceMap;
List<CanonicalName> canonicalNames;
@@ -834,37 +834,6 @@
LibraryDependencyReference deferredImport;
}
-type VectorCreation extends Expression {
- Byte tag = 102;
- UInt length;
-}
-
-type VectorGet extends Expression {
- Byte tag = 103;
- Expression vectorExpression;
- UInt index;
-}
-
-type VectorSet extends Expression {
- Byte tag = 104;
- Expression vectorExpression;
- UInt index;
- Expression value;
-}
-
-type VectorCopy extends Expression {
- Byte tag = 105;
- Expression vectorExpression;
-}
-
-type ClosureCreation extends Expression {
- Byte tag = 106;
- MemberReference topLevelFunctionReference;
- Expression contextVector;
- FunctionType functionType;
- List<DartType> typeArguments;
-}
-
type ConstantExpression extends Expression {
Byte tag = 107;
ConstantReference constantReference;
@@ -1134,10 +1103,6 @@
abstract type DartType extends Node {}
-type VectorType extends DartType {
- Byte tag = 88;
-}
-
type InvalidType extends DartType {
Byte tag = 90;
}
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 4796c39..2117eb1 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -3576,181 +3576,6 @@
transformChildren(Transformer v) {}
}
-/// Expression of the form `MakeVector(N)` where `N` is an integer representing
-/// the length of the vector.
-///
-/// For detailed comment about Vectors see [VectorType].
-class VectorCreation extends Expression {
- int length;
-
- VectorCreation(this.length);
-
- accept(ExpressionVisitor v) => v.visitVectorCreation(this);
- accept1(ExpressionVisitor1 v, arg) => v.visitVectorCreation(this, arg);
-
- visitChildren(Visitor v) {}
-
- transformChildren(Transformer v) {}
-
- DartType getStaticType(TypeEnvironment types) {
- return const VectorType();
- }
-}
-
-/// Expression of the form `v[i]` where `v` is a vector expression, and `i` is
-/// an integer index.
-class VectorGet extends Expression {
- Expression vectorExpression;
- int index;
-
- VectorGet(this.vectorExpression, this.index) {
- vectorExpression?.parent = this;
- }
-
- accept(ExpressionVisitor v) => v.visitVectorGet(this);
- accept1(ExpressionVisitor1 v, arg) => v.visitVectorGet(this, arg);
-
- visitChildren(Visitor v) {
- vectorExpression.accept(v);
- }
-
- transformChildren(Transformer v) {
- if (vectorExpression != null) {
- vectorExpression = vectorExpression.accept(v);
- vectorExpression?.parent = this;
- }
- }
-
- DartType getStaticType(TypeEnvironment types) {
- return const DynamicType();
- }
-}
-
-/// Expression of the form `v[i] = x` where `v` is a vector expression, `i` is
-/// an integer index, and `x` is an arbitrary expression.
-class VectorSet extends Expression {
- Expression vectorExpression;
- int index;
- Expression value;
-
- VectorSet(this.vectorExpression, this.index, this.value) {
- vectorExpression?.parent = this;
- value?.parent = this;
- }
-
- accept(ExpressionVisitor v) => v.visitVectorSet(this);
- accept1(ExpressionVisitor1 v, arg) => v.visitVectorSet(this, arg);
-
- visitChildren(Visitor v) {
- vectorExpression.accept(v);
- value.accept(v);
- }
-
- transformChildren(Transformer v) {
- if (vectorExpression != null) {
- vectorExpression = vectorExpression.accept(v);
- vectorExpression?.parent = this;
- }
- if (value != null) {
- value = value.accept(v);
- value?.parent = this;
- }
- }
-
- DartType getStaticType(TypeEnvironment types) {
- return value.getStaticType(types);
- }
-}
-
-/// Expression of the form `CopyVector(v)` where `v` is a vector expression.
-class VectorCopy extends Expression {
- Expression vectorExpression;
-
- VectorCopy(this.vectorExpression) {
- vectorExpression?.parent = this;
- }
-
- accept(ExpressionVisitor v) => v.visitVectorCopy(this);
- accept1(ExpressionVisitor1 v, arg) => v.visitVectorCopy(this, arg);
-
- visitChildren(Visitor v) {
- vectorExpression.accept(v);
- }
-
- transformChildren(Transformer v) {
- if (vectorExpression != null) {
- vectorExpression = vectorExpression.accept(v);
- vectorExpression?.parent = this;
- }
- }
-
- DartType getStaticType(TypeEnvironment types) {
- return const VectorType();
- }
-}
-
-/// Expression of the form `MakeClosure<T>(f, c, t)` where `f` is a name of a
-/// closed top-level function, `c` is a Vector representing closure context, `t`
-/// is the type of the resulting closure and `T` is a vector of type arguments
-/// to be passed to `f`.
-///
-/// Note these restrictions on its usage:
-///
-/// 1. `f` must reference a statically-resolved top-level function.
-///
-/// 2. The length of `T` must be less than or equal to the number of type
-/// parameters on `f`.
-///
-/// 3. It is disallowed to use `MakeClosure` on the same function twice with
-/// different numbers of type arguments.
-///
-/// 4. The type arguments `T` must be guaranteed to satisfy the bounds of the
-/// corresponding type parameters on `f`.
-class ClosureCreation extends Expression {
- Reference topLevelFunctionReference;
- Expression contextVector;
- FunctionType functionType;
- List<DartType> typeArguments;
-
- ClosureCreation(Member topLevelFunction, Expression contextVector,
- FunctionType functionType, List<DartType> typeArguments)
- : this.byReference(getMemberReference(topLevelFunction), contextVector,
- functionType, typeArguments);
-
- ClosureCreation.byReference(this.topLevelFunctionReference,
- this.contextVector, this.functionType, this.typeArguments) {
- contextVector?.parent = this;
- }
-
- Procedure get topLevelFunction => topLevelFunctionReference?.asProcedure;
-
- void set topLevelFunction(Member topLevelFunction) {
- topLevelFunctionReference = getMemberReference(topLevelFunction);
- }
-
- accept(ExpressionVisitor v) => v.visitClosureCreation(this);
- accept1(ExpressionVisitor1 v, arg) => v.visitClosureCreation(this, arg);
-
- visitChildren(Visitor v) {
- contextVector?.accept(v);
- functionType.accept(v);
- visitList(typeArguments, v);
- }
-
- transformChildren(Transformer v) {
- if (contextVector != null) {
- contextVector = contextVector.accept(v);
- contextVector?.parent = this;
- }
- functionType = v.visitDartType(functionType);
- transformTypeList(typeArguments, v);
- }
-
- DartType getStaticType(TypeEnvironment types) {
- return functionType;
- }
-}
-
// ------------------------------------------------------------------------
// STATEMENTS
// ------------------------------------------------------------------------
@@ -4774,36 +4599,6 @@
}
}
-/// [VectorType] represents Vectors, a special kind of data that is not
-/// available for use by Dart programmers directly. It is used by Kernel
-/// transformations as efficient index-based storage.
-///
-/// * Vectors aren't user-visible. For example, they are not supposed to be
-/// exposed to Dart programs through variables or be visible in stack traces.
-///
-/// * Vectors have fixed length at runtime. The length is known at compile
-/// time, and [VectorCreation] AST node stores it in a field.
-///
-/// * Indexes for accessing and assigning Vector items are known at compile
-/// time. The corresponding [VectorGet] and [VectorSet] AST nodes store the
-/// index in a field.
-///
-/// * For efficiency considerations, bounds checks aren't performed for Vectors.
-/// If necessary, a transformer or verifier can do this checks at compile-time,
-/// after adding length field to [VectorType], to make sure that previous
-/// transformations didn't introduce any access errors.
-///
-/// * Access to Vectors is untyped.
-///
-/// * Vectors can be used by various transformations of Kernel components.
-/// Currently they are used by Closure Conversion to represent closure contexts.
-class VectorType extends DartType {
- const VectorType();
-
- accept(DartTypeVisitor v) => v.visitVectorType(this);
- visitChildren(Visitor v) {}
-}
-
/// A possibly generic function type.
@coq
class FunctionType extends DartType {
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 12dbeef..db54b4a 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -1529,28 +1529,6 @@
var expression = readExpression();
var typeArguments = readDartTypeList();
return new Instantiation(expression, typeArguments);
- case Tag.VectorCreation:
- var length = readUInt();
- return new VectorCreation(length);
- case Tag.VectorGet:
- var vectorExpression = readExpression();
- var index = readUInt();
- return new VectorGet(vectorExpression, index);
- case Tag.VectorSet:
- var vectorExpression = readExpression();
- var index = readUInt();
- var value = readExpression();
- return new VectorSet(vectorExpression, index, value);
- case Tag.VectorCopy:
- var vectorExpression = readExpression();
- return new VectorCopy(vectorExpression);
- case Tag.ClosureCreation:
- var topLevelFunctionReference = readMemberReference();
- var contextVector = readExpression();
- var functionType = readDartType();
- var typeArgs = readDartTypeList();
- return new ClosureCreation.byReference(
- topLevelFunctionReference, contextVector, functionType, typeArgs);
case Tag.ConstantExpression:
return new ConstantExpression(readConstantReference());
default:
@@ -1809,8 +1787,6 @@
case Tag.TypedefType:
return new TypedefType.byReference(
readTypedefReference(), readDartTypeList());
- case Tag.VectorType:
- return const VectorType();
case Tag.BottomType:
return const BottomType();
case Tag.InvalidType:
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 4ca3688..528aeb95 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1353,42 +1353,6 @@
writeLibraryDependencyReference(node.import);
}
- @override
- void visitVectorCreation(VectorCreation node) {
- writeByte(Tag.VectorCreation);
- writeUInt30(node.length);
- }
-
- @override
- void visitVectorGet(VectorGet node) {
- writeByte(Tag.VectorGet);
- writeNode(node.vectorExpression);
- writeUInt30(node.index);
- }
-
- @override
- void visitVectorSet(VectorSet node) {
- writeByte(Tag.VectorSet);
- writeNode(node.vectorExpression);
- writeUInt30(node.index);
- writeNode(node.value);
- }
-
- @override
- void visitVectorCopy(VectorCopy node) {
- writeByte(Tag.VectorCopy);
- writeNode(node.vectorExpression);
- }
-
- @override
- void visitClosureCreation(ClosureCreation node) {
- writeByte(Tag.ClosureCreation);
- writeReference(node.topLevelFunctionReference);
- writeNode(node.contextVector);
- writeNode(node.functionType);
- writeNodeList(node.typeArguments);
- }
-
writeStatementOrEmpty(Statement node) {
if (node == null) {
writeByte(Tag.EmptyStatement);
@@ -1712,11 +1676,6 @@
}
@override
- void visitVectorType(VectorType node) {
- writeByte(Tag.VectorType);
- }
-
- @override
void visitTypedefType(TypedefType node) {
writeByte(Tag.TypedefType);
writeReference(node.typedefReference);
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index ac97b98..beb113c 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -94,7 +94,6 @@
static const int AssertBlock = 81;
static const int TypedefType = 87;
- static const int VectorType = 88;
static const int BottomType = 89;
static const int InvalidType = 90;
static const int DynamicType = 91;
@@ -109,13 +108,6 @@
static const int ClassReference = 100;
static const int MemberReference = 101;
- static const int VectorCreation = 102;
- static const int VectorGet = 103;
- static const int VectorSet = 104;
- static const int VectorCopy = 105;
-
- static const int ClosureCreation = 106;
-
static const int ConstantExpression = 107;
// Note that 108 is occupied by [RedirectingFactoryConstructor] above.
@@ -135,7 +127,7 @@
/// Internal version of kernel binary format.
/// Bump it when making incompatible changes in kernel binaries.
/// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
- static const int BinaryFormatVersion = 10;
+ static const int BinaryFormatVersion = 11;
}
abstract class ConstantTag {
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index f26f83c..2fae8ce 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -269,31 +269,6 @@
return new Let(newVariable, clone(node.body));
}
- visitVectorCreation(VectorCreation node) {
- return new VectorCreation(node.length);
- }
-
- visitClosureCreation(ClosureCreation node) {
- return new ClosureCreation.byReference(
- node.topLevelFunctionReference,
- cloneOptional(node.contextVector),
- visitOptionalType(node.functionType),
- node.typeArguments.map(visitType).toList());
- }
-
- visitVectorSet(VectorSet node) {
- return new VectorSet(
- clone(node.vectorExpression), node.index, clone(node.value));
- }
-
- visitVectorGet(VectorGet node) {
- return new VectorGet(clone(node.vectorExpression), node.index);
- }
-
- visitVectorCopy(VectorCopy node) {
- return new VectorCopy(clone(node.vectorExpression));
- }
-
visitExpressionStatement(ExpressionStatement node) {
return new ExpressionStatement(clone(node.expression));
}
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index 7b9d3cd..a756595 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -581,10 +581,6 @@
}
}
- visitVectorType(VectorType type) {
- writeWord('Vector');
- }
-
visitTypedefType(TypedefType type) {
writeTypedefReference(type.typedefNode);
if (type.typeArguments.isNotEmpty) {
@@ -1345,50 +1341,6 @@
state = WORD;
}
- visitVectorCreation(VectorCreation node) {
- writeWord('MakeVector');
- writeSymbol('(');
- writeWord(node.length.toString());
- writeSymbol(')');
- }
-
- visitVectorGet(VectorGet node) {
- writeExpression(node.vectorExpression);
- writeSymbol('[');
- writeWord(node.index.toString());
- writeSymbol(']');
- }
-
- visitVectorSet(VectorSet node) {
- writeExpression(node.vectorExpression);
- writeSymbol('[');
- writeWord(node.index.toString());
- writeSymbol(']');
- writeSpaced('=');
- writeExpression(node.value);
- }
-
- visitVectorCopy(VectorCopy node) {
- writeWord('CopyVector');
- writeSymbol('(');
- writeExpression(node.vectorExpression);
- writeSymbol(')');
- }
-
- visitClosureCreation(ClosureCreation node) {
- writeWord('MakeClosure');
- writeSymbol('<');
- writeNode(node.functionType);
- if (node.typeArguments.length > 0) writeSymbol(', ');
- writeList(node.typeArguments, writeType);
- writeSymbol('>');
- writeSymbol('(');
- writeMemberReferenceFromReference(node.topLevelFunctionReference);
- writeComma();
- writeExpression(node.contextVector);
- writeSymbol(')');
- }
-
visitLibraryDependency(LibraryDependency node) {
writeIndentation();
writeWord(node.isImport ? 'import' : 'export');
diff --git a/pkg/kernel/lib/transformations/treeshaker.dart b/pkg/kernel/lib/transformations/treeshaker.dart
index 2d50eda..8d35913 100644
--- a/pkg/kernel/lib/transformations/treeshaker.dart
+++ b/pkg/kernel/lib/transformations/treeshaker.dart
@@ -1190,8 +1190,6 @@
void visitVoidType(VoidType node) {}
- void visitVectorType(VectorType node) {}
-
void visitInterfaceType(InterfaceType node) {
if (isCovariant) {
shaker._addInstantiatedExternalSubclass(node.classNode);
diff --git a/pkg/kernel/lib/type_algebra.dart b/pkg/kernel/lib/type_algebra.dart
index b66ee8c..6094e62 100644
--- a/pkg/kernel/lib/type_algebra.dart
+++ b/pkg/kernel/lib/type_algebra.dart
@@ -529,7 +529,6 @@
DartType visitDynamicType(DynamicType node) => node;
DartType visitVoidType(VoidType node) => node;
DartType visitBottomType(BottomType node) => node;
- DartType visitVector(VectorType node) => node;
DartType visitInterfaceType(InterfaceType node) {
if (node.typeArguments.isEmpty) return node;
@@ -713,7 +712,6 @@
if (type1 is VoidType && type2 is VoidType) return true;
if (type1 is InvalidType && type2 is InvalidType) return true;
if (type1 is BottomType && type2 is BottomType) return true;
- if (type1 is VectorType && type2 is VectorType) return true;
if (type1 is InterfaceType && type2 is InterfaceType) {
if (type1.classNode != type2.classNode) return _fail();
assert(type1.typeArguments.length == type2.typeArguments.length);
@@ -822,7 +820,6 @@
bool visitInvalidType(InvalidType node) => false;
bool visitDynamicType(DynamicType node) => false;
bool visitVoidType(VoidType node) => false;
- bool visitVectorType(VectorType node) => false;
bool visitInterfaceType(InterfaceType node) {
return node.typeArguments.any(visit);
@@ -866,7 +863,6 @@
visitInvalidType(InvalidType node);
visitDynamicType(DynamicType node);
visitVoidType(VoidType node);
- visitVectorType(VectorType node);
visitInterfaceType(InterfaceType node) {
for (DartType argument in node.typeArguments) {
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index 39412ae..007cf4a 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -757,59 +757,6 @@
}
@override
- DartType visitVectorCreation(VectorCreation node) {
- return const VectorType();
- }
-
- @override
- DartType visitVectorGet(VectorGet node) {
- var type = visitExpression(node.vectorExpression);
- if (type is! VectorType) {
- fail(
- node.vectorExpression,
- 'The type of vector-expression in vector-get node is expected to be '
- 'VectorType, but $type found');
- }
- return const DynamicType();
- }
-
- @override
- visitVectorSet(VectorSet node) {
- var type = visitExpression(node.vectorExpression);
- if (type is! VectorType) {
- fail(
- node.vectorExpression,
- 'The type of vector-expression in vector-set node is expected to be '
- 'VectorType, but $type found');
- }
- return visitExpression(node.value);
- }
-
- @override
- visitVectorCopy(VectorCopy node) {
- var type = visitExpression(node.vectorExpression);
- if (type is! VectorType) {
- fail(
- node.vectorExpression,
- 'The type of vector-expression in vector-copy node is exected to be '
- 'VectorType, but $type found');
- }
- return const VectorType();
- }
-
- @override
- visitClosureCreation(ClosureCreation node) {
- var contextType = visitExpression(node.contextVector);
- if (contextType is! VectorType) {
- fail(
- node.contextVector,
- "The second child of 'ClosureConversion' node is supposed to be a "
- "Vector, but $contextType found.");
- }
- return node.functionType;
- }
-
- @override
visitAssertStatement(AssertStatement node) {
visitExpression(node.condition);
if (node.message != null) {
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index cde0c92..13ae2ad 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -60,11 +60,6 @@
R visitLoadLibrary(LoadLibrary node) => defaultExpression(node);
R visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) =>
defaultExpression(node);
- R visitVectorCreation(VectorCreation node) => defaultExpression(node);
- R visitVectorGet(VectorGet node) => defaultExpression(node);
- R visitVectorSet(VectorSet node) => defaultExpression(node);
- R visitVectorCopy(VectorCopy node) => defaultExpression(node);
- R visitClosureCreation(ClosureCreation node) => defaultExpression(node);
}
abstract class StatementVisitor<R> {
@@ -186,11 +181,6 @@
R visitLoadLibrary(LoadLibrary node) => defaultExpression(node);
R visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node) =>
defaultExpression(node);
- R visitVectorCreation(VectorCreation node) => defaultExpression(node);
- R visitVectorGet(VectorGet node) => defaultExpression(node);
- R visitVectorSet(VectorSet node) => defaultExpression(node);
- R visitVectorCopy(VectorCopy node) => defaultExpression(node);
- R visitClosureCreation(ClosureCreation node) => defaultExpression(node);
// Statements
R defaultStatement(Statement node) => defaultTreeNode(node);
@@ -266,7 +256,6 @@
R visitVoidType(VoidType node) => defaultDartType(node);
R visitBottomType(BottomType node) => defaultDartType(node);
R visitInterfaceType(InterfaceType node) => defaultDartType(node);
- R visitVectorType(VectorType node) => defaultDartType(node);
R visitFunctionType(FunctionType node) => defaultDartType(node);
R visitTypeParameterType(TypeParameterType node) => defaultDartType(node);
R visitTypedefType(TypedefType node) => defaultDartType(node);
@@ -321,7 +310,6 @@
R visitVoidType(VoidType node) => defaultDartType(node);
R visitBottomType(BottomType node) => defaultDartType(node);
R visitInterfaceType(InterfaceType node) => defaultDartType(node);
- R visitVectorType(VectorType node) => defaultDartType(node);
R visitFunctionType(FunctionType node) => defaultDartType(node);
R visitTypeParameterType(TypeParameterType node) => defaultDartType(node);
R visitTypedefType(TypedefType node) => defaultDartType(node);
@@ -506,13 +494,6 @@
R visitLoadLibrary(LoadLibrary node, T arg) => defaultExpression(node, arg);
R visitCheckLibraryIsLoaded(CheckLibraryIsLoaded node, T arg) =>
defaultExpression(node, arg);
- R visitVectorCreation(VectorCreation node, T arg) =>
- defaultExpression(node, arg);
- R visitVectorGet(VectorGet node, T arg) => defaultExpression(node, arg);
- R visitVectorSet(VectorSet node, T arg) => defaultExpression(node, arg);
- R visitVectorCopy(VectorCopy node, T arg) => defaultExpression(node, arg);
- R visitClosureCreation(ClosureCreation node, T arg) =>
- defaultExpression(node, arg);
}
abstract class StatementVisitor1<R, T> {
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 9f2bac4..9414531 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -2522,9 +2522,6 @@
bool visitBottomType(BottomType node) => false;
@override
- bool visitVectorType(VectorType node) => false;
-
- @override
bool visitTypeParameterType(TypeParameterType node) =>
_declaredTypeParameters == null ||
!_declaredTypeParameters.contains(node.parameter);
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index 4e260da..b17d1ad 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -964,36 +964,6 @@
}
@override
- TypeExpr visitVectorCreation(VectorCreation node) {
- // TODO(alexmarkov): List<_Context>?
- return _staticType(node);
- }
-
- @override
- TypeExpr visitVectorGet(VectorGet node) {
- _visit(node.vectorExpression);
- return _staticType(node);
- }
-
- @override
- TypeExpr visitVectorSet(VectorSet node) {
- _visit(node.vectorExpression);
- return _visit(node.value);
- }
-
- @override
- TypeExpr visitVectorCopy(VectorCopy node) {
- _visit(node.vectorExpression);
- return _staticType(node);
- }
-
- @override
- TypeExpr visitClosureCreation(ClosureCreation node) {
- _visit(node.contextVector);
- return _staticType(node);
- }
-
- @override
TypeExpr visitAssertStatement(AssertStatement node) {
if (!kRemoveAsserts) {
_addUse(_visit(node.condition));
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index adff0d0..1580817 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -17,7 +17,7 @@
// package:kernel/binary.md.
static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
-static const uint32_t kBinaryFormatVersion = 10;
+static const uint32_t kBinaryFormatVersion = 11;
// Keep in sync with package:kernel/lib/binary/tag.dart
#define KERNEL_TAG_LIST(V) \
@@ -104,7 +104,6 @@
V(AsyncForInStatement, 80) \
V(AssertBlock, 81) \
V(TypedefType, 87) \
- V(VectorType, 88) \
V(BottomType, 89) \
V(InvalidType, 90) \
V(DynamicType, 91) \
@@ -117,11 +116,6 @@
V(NullReference, 99) \
V(ClassReference, 100) \
V(MemberReference, 101) \
- V(VectorCreation, 102) \
- V(VectorGet, 103) \
- V(VectorSet, 104) \
- V(VectorCopy, 105) \
- V(ClosureCreation, 106) \
V(ConstantExpression, 107) \
V(SpecializedVariableGet, 128) \
V(SpecializedVariableSet, 136) \