Index: runtime/vm/kernel_binary.cc |
diff --git a/runtime/vm/kernel_binary.cc b/runtime/vm/kernel_binary.cc |
index 8c7aaee98b169a6e506df6298a320a5a73807c45..002dc789a80aa16d25cb1b44eb5a1d6fe60bd018 100644 |
--- a/runtime/vm/kernel_binary.cc |
+++ b/runtime/vm/kernel_binary.cc |
@@ -205,9 +205,6 @@ Library* Library::ReadFrom(Reader* reader) { |
fields().ReadFrom<Field>(reader, this); |
procedures().ReadFrom<Procedure>(reader, this); |
- can_stream_ = |
- classes().CanStream() && fields().CanStream() && procedures().CanStream(); |
- |
return this; |
} |
@@ -239,8 +236,6 @@ Class* Class::ReadFrom(Reader* reader) { |
reader->record_token_position(position_); |
annotations_.ReadFromStatic<Expression>(reader); |
- can_stream_ = annotations_.CanStream(); |
- |
return this; |
} |
@@ -261,27 +256,6 @@ NormalClass* NormalClass::ReadFrom(Reader* reader) { |
constructors_.ReadFrom<Constructor>(reader, this); |
procedures_.ReadFrom<Procedure>(reader, this); |
- can_stream_ = can_stream_ && fields_.CanStream() && |
- constructors_.CanStream() && procedures_.CanStream(); |
- |
- return this; |
-} |
- |
- |
-MixinClass* MixinClass::ReadFrom(Reader* reader) { |
- TRACE_READ_OFFSET(); |
- TypeParameterScope<ReaderHelper> scope(reader->helper()); |
- |
- Class::ReadFrom(reader); |
- type_parameters_.ReadFrom(reader); |
- first_ = InterfaceType::Cast(DartType::ReadFrom(reader)); |
- second_ = InterfaceType::Cast(DartType::ReadFrom(reader)); |
- implemented_classes_.ReadFromStatic<DowncastReader<DartType, InterfaceType> >( |
- reader); |
- constructors_.ReadFrom<Constructor>(reader, this); |
- |
- can_stream_ = constructors_.CanStream(); |
- |
return this; |
} |
@@ -336,9 +310,6 @@ Field* Field::ReadFrom(Reader* reader) { |
type_ = DartType::ReadFrom(reader); |
initializer_ = reader->ReadOptional<Expression>(); |
- can_stream_ = (initializer_ == NULL || initializer_->can_stream()) && |
- annotations_.CanStream(); |
- |
return this; |
} |
@@ -360,9 +331,6 @@ Constructor* Constructor::ReadFrom(Reader* reader) { |
function_ = FunctionNode::ReadFrom(reader); |
initializers_.ReadFromStatic<Initializer>(reader); |
- can_stream_ = annotations_.CanStream() && function_->can_stream() && |
- initializers_.CanStream(); |
- |
return this; |
} |
@@ -388,9 +356,6 @@ Procedure* Procedure::ReadFrom(Reader* reader) { |
annotations_.ReadFromStatic<Expression>(reader); |
function_ = reader->ReadOptional<FunctionNode>(); |
- can_stream_ = annotations_.CanStream() && |
- (function_ == NULL || function_->can_stream()); |
- |
return this; |
} |
@@ -428,8 +393,6 @@ FieldInitializer* FieldInitializer::ReadFromImpl(Reader* reader) { |
initializer->field_reference_ = Reference::ReadMemberFrom(reader); |
initializer->value_ = Expression::ReadFrom(reader); |
- initializer->can_stream_ = initializer->value_->can_stream(); |
- |
return initializer; |
} |
@@ -440,8 +403,6 @@ SuperInitializer* SuperInitializer::ReadFromImpl(Reader* reader) { |
init->target_reference_ = Reference::ReadMemberFrom(reader); |
init->arguments_ = Arguments::ReadFrom(reader); |
- init->can_stream_ = init->arguments_->can_stream(); |
- |
return init; |
} |
@@ -452,8 +413,6 @@ RedirectingInitializer* RedirectingInitializer::ReadFromImpl(Reader* reader) { |
init->target_reference_ = Reference::ReadMemberFrom(reader); |
init->arguments_ = Arguments::ReadFrom(reader); |
- init->can_stream_ = init->arguments_->can_stream(); |
- |
return init; |
} |
@@ -463,8 +422,6 @@ LocalInitializer* LocalInitializer::ReadFromImpl(Reader* reader) { |
LocalInitializer* init = new LocalInitializer(); |
init->variable_ = VariableDeclaration::ReadFromImpl(reader, false); |
- init->can_stream_ = init->variable_->can_stream(); |
- |
return init; |
} |
@@ -626,8 +583,6 @@ VariableSet* VariableSet::ReadFrom(Reader* reader) { |
set->variable_kernel_offset_); |
set->expression_ = Expression::ReadFrom(reader); |
- set->can_stream_ = set->expression_->can_stream(); |
- |
return set; |
} |
@@ -643,8 +598,6 @@ VariableSet* VariableSet::ReadFrom(Reader* reader, uint8_t payload) { |
set->variable_kernel_offset_); |
set->expression_ = Expression::ReadFrom(reader); |
- set->can_stream_ = set->expression_->can_stream(); |
- |
return set; |
} |
@@ -658,8 +611,6 @@ PropertyGet* PropertyGet::ReadFrom(Reader* reader) { |
get->name_ = Name::ReadFrom(reader); |
get->interface_target_reference_ = Reference::ReadMemberFrom(reader, true); |
- get->can_stream_ = get->receiver_->can_stream(); |
- |
return get; |
} |
@@ -674,8 +625,6 @@ PropertySet* PropertySet::ReadFrom(Reader* reader) { |
set->value_ = Expression::ReadFrom(reader); |
set->interface_target_reference_ = Reference::ReadMemberFrom(reader, true); |
- set->can_stream_ = set->receiver_->can_stream() && set->value_->can_stream(); |
- |
return set; |
} |
@@ -688,8 +637,6 @@ DirectPropertyGet* DirectPropertyGet::ReadFrom(Reader* reader) { |
get->receiver_ = Expression::ReadFrom(reader); |
get->target_reference_ = Reference::ReadMemberFrom(reader); |
- get->can_stream_ = get->receiver_->can_stream(); |
- |
return get; |
} |
@@ -703,8 +650,6 @@ DirectPropertySet* DirectPropertySet::ReadFrom(Reader* reader) { |
set->target_reference_ = Reference::ReadMemberFrom(reader); |
set->value_ = Expression::ReadFrom(reader); |
- set->can_stream_ = set->receiver_->can_stream() && set->value_->can_stream(); |
- |
return set; |
} |
@@ -727,8 +672,6 @@ StaticSet* StaticSet::ReadFrom(Reader* reader) { |
set->target_reference_ = Reference::ReadMemberFrom(reader); |
set->expression_ = Expression::ReadFrom(reader); |
- set->can_stream_ = set->expression_->can_stream(); |
- |
return set; |
} |
@@ -742,9 +685,6 @@ Arguments* Arguments::ReadFrom(Reader* reader) { |
arguments->named().ReadFromStatic<NamedExpression>(reader); |
ASSERT(arguments->count() == num_arguments); |
- arguments->can_stream_ = |
- arguments->positional().CanStream() && arguments->named().CanStream(); |
- |
return arguments; |
} |
@@ -755,8 +695,6 @@ NamedExpression* NamedExpression::ReadFrom(Reader* reader) { |
Expression* expression = Expression::ReadFrom(reader); |
NamedExpression* named = new NamedExpression(name_index, expression); |
- named->can_stream_ = expression->can_stream(); |
- |
return named; |
} |
@@ -772,9 +710,6 @@ MethodInvocation* MethodInvocation::ReadFrom(Reader* reader) { |
invocation->interface_target_reference_ = |
Reference::ReadMemberFrom(reader, true); |
- invocation->can_stream_ = invocation->receiver_->can_stream() && |
- invocation->arguments_->can_stream(); |
- |
return invocation; |
} |
@@ -787,9 +722,6 @@ DirectMethodInvocation* DirectMethodInvocation::ReadFrom(Reader* reader) { |
invocation->target_reference_ = Reference::ReadMemberFrom(reader); |
invocation->arguments_ = Arguments::ReadFrom(reader); |
- invocation->can_stream_ = invocation->receiver_->can_stream() && |
- invocation->arguments_->can_stream(); |
- |
return invocation; |
} |
@@ -803,8 +735,6 @@ StaticInvocation* StaticInvocation::ReadFrom(Reader* reader, bool is_const) { |
invocation->procedure_reference_ = Reference::ReadMemberFrom(reader); |
invocation->arguments_ = Arguments::ReadFrom(reader); |
- invocation->can_stream_ = invocation->arguments_->can_stream(); |
- |
return invocation; |
} |
@@ -819,8 +749,6 @@ ConstructorInvocation* ConstructorInvocation::ReadFrom(Reader* reader, |
invocation->target_reference_ = Reference::ReadMemberFrom(reader); |
invocation->arguments_ = Arguments::ReadFrom(reader); |
- invocation->can_stream_ = invocation->arguments_->can_stream(); |
- |
return invocation; |
} |
@@ -831,8 +759,6 @@ Not* Not::ReadFrom(Reader* reader) { |
n->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte. |
n->expression_ = Expression::ReadFrom(reader); |
- n->can_stream_ = n->expression_->can_stream(); |
- |
return n; |
} |
@@ -845,8 +771,6 @@ LogicalExpression* LogicalExpression::ReadFrom(Reader* reader) { |
expr->operator_ = static_cast<Operator>(reader->ReadByte()); |
expr->right_ = Expression::ReadFrom(reader); |
- expr->can_stream_ = expr->left_->can_stream() && expr->right_->can_stream(); |
- |
return expr; |
} |
@@ -860,10 +784,6 @@ ConditionalExpression* ConditionalExpression::ReadFrom(Reader* reader) { |
expr->otherwise_ = Expression::ReadFrom(reader); |
reader->ReadOptional<DartType>(); // Unused static type. |
- expr->can_stream_ = expr->condition_->can_stream() && |
- expr->then_->can_stream() && |
- expr->otherwise_->can_stream(); |
- |
return expr; |
} |
@@ -875,8 +795,6 @@ StringConcatenation* StringConcatenation::ReadFrom(Reader* reader) { |
concat->position_ = reader->ReadPosition(); |
concat->expressions_.ReadFromStatic<Expression>(reader); |
- concat->can_stream_ = concat->expressions_.CanStream(); |
- |
return concat; |
} |
@@ -889,8 +807,6 @@ IsExpression* IsExpression::ReadFrom(Reader* reader) { |
expr->operand_ = Expression::ReadFrom(reader); |
expr->type_ = DartType::ReadFrom(reader); |
- expr->can_stream_ = expr->operand_->can_stream(); |
- |
return expr; |
} |
@@ -903,8 +819,6 @@ AsExpression* AsExpression::ReadFrom(Reader* reader) { |
expr->operand_ = Expression::ReadFrom(reader); |
expr->type_ = DartType::ReadFrom(reader); |
- expr->can_stream_ = expr->operand_->can_stream(); |
- |
return expr; |
} |
@@ -1014,8 +928,6 @@ Throw* Throw::ReadFrom(Reader* reader) { |
t->position_ = reader->ReadPosition(); |
t->expression_ = Expression::ReadFrom(reader); |
- t->can_stream_ = t->expression_->can_stream(); |
- |
return t; |
} |
@@ -1029,8 +941,6 @@ ListLiteral* ListLiteral::ReadFrom(Reader* reader, bool is_const) { |
literal->type_ = DartType::ReadFrom(reader); |
literal->expressions_.ReadFromStatic<Expression>(reader); |
- literal->can_stream_ = literal->expressions_.CanStream(); |
- |
return literal; |
} |
@@ -1045,8 +955,6 @@ MapLiteral* MapLiteral::ReadFrom(Reader* reader, bool is_const) { |
literal->value_type_ = DartType::ReadFrom(reader); |
literal->entries_.ReadFromStatic<MapEntry>(reader); |
- literal->can_stream_ = literal->entries_.CanStream(); |
- |
return literal; |
} |
@@ -1056,8 +964,6 @@ MapEntry* MapEntry::ReadFrom(Reader* reader) { |
entry->key_ = Expression::ReadFrom(reader); |
entry->value_ = Expression::ReadFrom(reader); |
- entry->can_stream_ = entry->key_->can_stream() && entry->value_->can_stream(); |
- |
return entry; |
} |
@@ -1068,8 +974,6 @@ AwaitExpression* AwaitExpression::ReadFrom(Reader* reader) { |
await->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte. |
await->operand_ = Expression::ReadFrom(reader); |
- await->can_stream_ = await->operand_->can_stream(); |
- |
return await; |
} |
@@ -1081,8 +985,6 @@ FunctionExpression* FunctionExpression::ReadFrom(Reader* reader) { |
expr->kernel_offset_ = reader->offset() - 1; // -1 to include tag byte. |
expr->function_ = FunctionNode::ReadFrom(reader); |
- expr->can_stream_ = false; |
- |
return expr; |
} |
@@ -1099,8 +1001,6 @@ Let* Let::ReadFrom(Reader* reader) { |
let->position_ = reader->min_position(); |
let->end_position_ = reader->max_position(); |
- let->can_stream_ = let->variable_->can_stream() && let->body_->can_stream(); |
- |
return let; |
} |
@@ -1125,8 +1025,6 @@ VectorGet* VectorGet::ReadFrom(Reader* reader) { |
vector_get->vector_expression_ = Expression::ReadFrom(reader); |
vector_get->index_ = reader->ReadUInt(); |
- vector_get->can_stream_ = false; |
- |
return vector_get; |
} |
@@ -1140,8 +1038,6 @@ VectorSet* VectorSet::ReadFrom(Reader* reader) { |
vector_set->index_ = reader->ReadUInt(); |
vector_set->value_ = Expression::ReadFrom(reader); |
- vector_set->can_stream_ = false; |
- |
return vector_set; |
} |
@@ -1154,8 +1050,6 @@ VectorCopy* VectorCopy::ReadFrom(Reader* reader) { |
reader->offset() - 1; // -1 to include tag byte. |
vector_copy->vector_expression_ = Expression::ReadFrom(reader); |
- vector_copy->can_stream_ = false; |
- |
return vector_copy; |
} |
@@ -1172,8 +1066,6 @@ ClosureCreation* ClosureCreation::ReadFrom(Reader* reader) { |
closure_creation->function_type_ = |
FunctionType::Cast(DartType::ReadFrom(reader)); |
- closure_creation->can_stream_ = false; |
- |
return closure_creation; |
} |
@@ -1246,8 +1138,6 @@ ExpressionStatement* ExpressionStatement::ReadFrom(Reader* reader) { |
new ExpressionStatement(Expression::ReadFrom(reader)); |
stmt->kernel_offset_ = offset; |
- stmt->can_stream_ = stmt->expression_->can_stream(); |
- |
return stmt; |
} |
@@ -1263,8 +1153,6 @@ Block* Block::ReadFromImpl(Reader* reader) { |
block->position_ = reader->min_position(); |
block->end_position_ = reader->max_position(); |
- block->can_stream_ = block->statements().CanStream(); |
- |
return block; |
} |
@@ -1284,9 +1172,6 @@ AssertStatement* AssertStatement::ReadFrom(Reader* reader) { |
stmt->condition_ = Expression::ReadFrom(reader); |
stmt->message_ = reader->ReadOptional<Expression>(); |
- stmt->can_stream_ = stmt->condition_->can_stream() && |
- (stmt->message_ == NULL || stmt->message_->can_stream()); |
- |
return stmt; |
} |
@@ -1300,8 +1185,6 @@ LabeledStatement* LabeledStatement::ReadFrom(Reader* reader) { |
stmt->body_ = Statement::ReadFrom(reader); |
reader->helper()->labels()->Pop(stmt); |
- stmt->can_stream_ = stmt->body_->can_stream(); |
- |
return stmt; |
} |
@@ -1323,9 +1206,6 @@ WhileStatement* WhileStatement::ReadFrom(Reader* reader) { |
stmt->condition_ = Expression::ReadFrom(reader); |
stmt->body_ = Statement::ReadFrom(reader); |
- stmt->can_stream_ = |
- stmt->condition_->can_stream() && stmt->body_->can_stream(); |
- |
return stmt; |
} |
@@ -1337,9 +1217,6 @@ DoStatement* DoStatement::ReadFrom(Reader* reader) { |
dostmt->body_ = Statement::ReadFrom(reader); |
dostmt->condition_ = Expression::ReadFrom(reader); |
- dostmt->can_stream_ = |
- dostmt->body_->can_stream() && dostmt->condition_->can_stream(); |
- |
return dostmt; |
} |
@@ -1358,11 +1235,6 @@ ForStatement* ForStatement::ReadFrom(Reader* reader) { |
forstmt->end_position_ = reader->max_position(); |
forstmt->position_ = reader->min_position(); |
- forstmt->can_stream_ = |
- forstmt->body_->can_stream() && |
- (forstmt->condition_ == NULL || forstmt->condition_->can_stream()) && |
- forstmt->variables_.CanStream() && forstmt->updates_.CanStream(); |
- |
return forstmt; |
} |
@@ -1385,10 +1257,6 @@ ForInStatement* ForInStatement::ReadFrom(Reader* reader, bool is_async) { |
} |
forinstmt->variable_->set_end_position(forinstmt->position_); |
- forinstmt->can_stream_ = forinstmt->variable_->can_stream() && |
- forinstmt->iterable_->can_stream() && |
- forinstmt->body_->can_stream(); |
- |
return forinstmt; |
} |
@@ -1405,9 +1273,6 @@ SwitchStatement* SwitchStatement::ReadFrom(Reader* reader) { |
sc->ReadFrom(reader); |
} |
- stmt->can_stream_ = |
- stmt->condition_->can_stream() && stmt->cases_.CanStream(); |
- |
return stmt; |
} |
@@ -1426,8 +1291,6 @@ SwitchCase* SwitchCase::ReadFrom(Reader* reader) { |
is_default_ = reader->ReadBool(); |
body_ = Statement::ReadFrom(reader); |
- can_stream_ = expressions_.CanStream() && body_->can_stream(); |
- |
return this; |
} |
@@ -1450,10 +1313,6 @@ IfStatement* IfStatement::ReadFrom(Reader* reader) { |
ifstmt->then_ = Statement::ReadFrom(reader); |
ifstmt->otherwise_ = Statement::ReadFrom(reader); |
- ifstmt->can_stream_ = ifstmt->condition_->can_stream() && |
- ifstmt->then_->can_stream() && |
- ifstmt->otherwise_->can_stream(); |
- |
return ifstmt; |
} |
@@ -1465,9 +1324,6 @@ ReturnStatement* ReturnStatement::ReadFrom(Reader* reader) { |
ret->position_ = reader->ReadPosition(); |
ret->expression_ = reader->ReadOptional<Expression>(); |
- ret->can_stream_ = |
- (ret->expression_ == NULL || ret->expression_->can_stream()); |
- |
return ret; |
} |
@@ -1483,8 +1339,6 @@ TryCatch* TryCatch::ReadFrom(Reader* reader) { |
tc->catches_.ReadFromStatic<Catch>(reader); |
tc->position_ = reader->min_position(); |
- tc->can_stream_ = tc->body_->can_stream() && tc->catches_.CanStream(); |
- |
return tc; |
} |
@@ -1505,8 +1359,6 @@ Catch* Catch::ReadFrom(Reader* reader) { |
c->end_position_ = reader->max_position(); |
c->position_ = reader->min_position(); |
- c->can_stream_ = c->body_->can_stream(); |
- |
return c; |
} |
@@ -1518,8 +1370,6 @@ TryFinally* TryFinally::ReadFrom(Reader* reader) { |
tf->body_ = Statement::ReadFrom(reader); |
tf->finalizer_ = Statement::ReadFrom(reader); |
- tf->can_stream_ = tf->body_->can_stream() && tf->finalizer_->can_stream(); |
- |
return tf; |
} |
@@ -1533,8 +1383,6 @@ YieldStatement* YieldStatement::ReadFrom(Reader* reader) { |
stmt->flags_ = reader->ReadByte(); |
stmt->expression_ = Expression::ReadFrom(reader); |
- stmt->can_stream_ = stmt->expression_->can_stream(); |
- |
return stmt; |
} |
@@ -1570,9 +1418,6 @@ VariableDeclaration* VariableDeclaration::ReadFromImpl(Reader* reader, |
decl->end_position_ = position; |
reader->helper()->variables().Push(decl); |
- decl->can_stream_ = |
- (decl->initializer_ == NULL || decl->initializer_->can_stream()); |
- |
return decl; |
} |
@@ -1586,8 +1431,6 @@ FunctionDeclaration* FunctionDeclaration::ReadFrom(Reader* reader) { |
VariableScope<ReaderHelper> parameters(reader->helper()); |
decl->function_ = FunctionNode::ReadFrom(reader); |
- decl->can_stream_ = false; |
- |
return decl; |
} |
@@ -1784,8 +1627,6 @@ Program* Program::ReadFrom(Reader* reader) { |
program->main_method_reference_ = |
Reference::ReadMemberFrom(reader, /*allow_null=*/true); |
- program->can_stream_ = false; |
- |
return program; |
} |
@@ -1818,11 +1659,6 @@ FunctionNode* FunctionNode::ReadFrom(Reader* reader) { |
VariableScope<ReaderHelper> vars(reader->helper()); |
function->body_ = reader->ReadOptional<Statement>(); |
- function->can_stream_ = |
- function->positional_parameters_.CanStream() && |
- function->named_parameters_.CanStream() && |
- (function->body_ == NULL || function->body_->can_stream()); |
- |
return function; |
} |