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

Unified Diff: runtime/vm/kernel.h

Issue 2931803002: [kernel] Cleanup kernel code after streaming (part 1). (Closed)
Patch Set: Created 3 years, 6 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
« no previous file with comments | « no previous file | runtime/vm/kernel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel.h
diff --git a/runtime/vm/kernel.h b/runtime/vm/kernel.h
index d3d37dfe72e5f00ffcf9eb76f0460b606d217bee..1326b95413fbd1937dfc1e92eda841c5cb35b14f 100644
--- a/runtime/vm/kernel.h
+++ b/runtime/vm/kernel.h
@@ -122,13 +122,7 @@
#define KERNEL_VISITORS_DO(M) \
M(ExpressionVisitor) \
- M(StatementVisitor) \
- M(MemberVisitor) \
- M(ClassVisitor) \
- M(InitializerVisitor) \
M(DartTypeVisitor) \
- M(TreeVisitor) \
- M(Visitor)
namespace dart {
@@ -376,9 +370,6 @@ class Node {
DEFINE_ALL_IS_OPERATIONS();
DEFINE_CASTING_OPERATIONS(Node);
- virtual void AcceptVisitor(Visitor* visitor) = 0;
- virtual void VisitChildren(Visitor* visitor) = 0;
-
protected:
Node() {}
@@ -393,23 +384,18 @@ class TreeNode : public Node {
DEFINE_CASTING_OPERATIONS(TreeNode);
- virtual void AcceptVisitor(Visitor* visitor);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor) = 0;
intptr_t kernel_offset() const {
ASSERT(kernel_offset_ > 0);
return kernel_offset_;
}
- bool can_stream() { return can_stream_; }
protected:
- TreeNode() : kernel_offset_(-1), can_stream_(true) {}
+ TreeNode() : kernel_offset_(-1) {}
// Offset for this node in the kernel-binary. If this node has a tag the
// offset includes the tag. Can be -1 to indicate "unknown" or invalid offset.
intptr_t kernel_offset_;
- bool can_stream_;
-
private:
DISALLOW_COPY_AND_ASSIGN(TreeNode);
};
@@ -439,9 +425,6 @@ class Library : public LinkedNode {
DEFINE_CASTING_OPERATIONS(Library);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
StringIndex import_uri() { return import_uri_index_; }
intptr_t source_uri_index() { return source_uri_index_; }
StringIndex name() { return name_index_; }
@@ -481,9 +464,6 @@ class Typedef : public LinkedNode {
DEFINE_CASTING_OPERATIONS(Typedef);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Library* parent() { return parent_; }
StringIndex name() { return name_index_; }
intptr_t source_uri_index() { return source_uri_index_; }
@@ -515,9 +495,6 @@ class Class : public LinkedNode {
DEFINE_CASTING_OPERATIONS(Class);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void AcceptClassVisitor(ClassVisitor* visitor) = 0;
-
Library* parent() { return parent_; }
StringIndex name() { return name_index_; }
intptr_t source_uri_index() { return source_uri_index_; }
@@ -557,9 +534,6 @@ class NormalClass : public Class {
DEFINE_CASTING_OPERATIONS(NormalClass);
- virtual void AcceptClassVisitor(ClassVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
virtual TypeParameterList& type_parameters() { return type_parameters_; }
InterfaceType* super_class() { return super_class_; }
virtual List<InterfaceType>& implemented_classes() {
@@ -586,56 +560,12 @@ class NormalClass : public Class {
};
-class MixinClass : public Class {
- public:
- MixinClass* ReadFrom(Reader* reader);
-
- virtual ~MixinClass();
-
- DEFINE_CASTING_OPERATIONS(MixinClass);
-
- virtual void AcceptClassVisitor(ClassVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
- virtual TypeParameterList& type_parameters() { return type_parameters_; }
- InterfaceType* first() { return first_; }
- InterfaceType* second() { return second_; }
- virtual List<InterfaceType>& implemented_classes() {
- return implemented_classes_;
- }
- virtual List<Constructor>& constructors() { return constructors_; }
- virtual List<Field>& fields() { return fields_; }
- virtual List<Procedure>& procedures() { return procedures_; }
-
- private:
- MixinClass() {}
-
- template <typename T>
- friend class List;
-
- TypeParameterList type_parameters_;
- Child<InterfaceType> first_;
- Child<InterfaceType> second_;
- List<InterfaceType> implemented_classes_;
- List<Constructor> constructors_;
-
- // Dummy instances which are empty lists.
- List<Field> fields_;
- List<Procedure> procedures_;
-
- DISALLOW_COPY_AND_ASSIGN(MixinClass);
-};
-
-
class Member : public LinkedNode {
public:
virtual ~Member();
DEFINE_CASTING_OPERATIONS(Member);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void AcceptMemberVisitor(MemberVisitor* visitor) = 0;
-
TreeNode* parent() { return parent_; }
Name* name() { return name_; }
List<Expression>& annotations() { return annotations_; }
@@ -675,9 +605,6 @@ class Field : public Member {
DEFINE_CASTING_OPERATIONS(Field);
- virtual void AcceptMemberVisitor(MemberVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; }
bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; }
bool IsStatic() { return (flags_ & kFlagStatic) == kFlagStatic; }
@@ -714,9 +641,6 @@ class Constructor : public Member {
DEFINE_CASTING_OPERATIONS(Constructor);
- virtual void AcceptMemberVisitor(MemberVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
bool IsExternal() { return (flags_ & kFlagExternal) == kFlagExternal; }
bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; }
@@ -763,9 +687,6 @@ class Procedure : public Member {
DEFINE_CASTING_OPERATIONS(Procedure);
- virtual void AcceptMemberVisitor(MemberVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
ProcedureKind kind() { return kind_; }
FunctionNode* function() { return function_; }
@@ -798,9 +719,6 @@ class Initializer : public TreeNode {
DEFINE_CASTING_OPERATIONS(Initializer);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor) = 0;
-
protected:
Initializer() {}
@@ -816,8 +734,6 @@ class InvalidInitializer : public Initializer {
virtual ~InvalidInitializer();
DEFINE_CASTING_OPERATIONS(InvalidInitializer);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
InvalidInitializer() {}
@@ -834,9 +750,6 @@ class FieldInitializer : public Initializer {
DEFINE_CASTING_OPERATIONS(FieldInitializer);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
NameIndex field() { return field_reference_; }
Expression* value() { return value_; }
@@ -858,9 +771,6 @@ class SuperInitializer : public Initializer {
DEFINE_CASTING_OPERATIONS(SuperInitializer);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
NameIndex target() { return target_reference_; }
Arguments* arguments() { return arguments_; }
@@ -882,9 +792,6 @@ class RedirectingInitializer : public Initializer {
DEFINE_CASTING_OPERATIONS(RedirectingInitializer);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
NameIndex target() { return target_reference_; }
Arguments* arguments() { return arguments_; }
@@ -906,9 +813,6 @@ class LocalInitializer : public Initializer {
DEFINE_CASTING_OPERATIONS(LocalInitializer);
- virtual void AcceptInitializerVisitor(InitializerVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
VariableDeclaration* variable() { return variable_; }
private:
@@ -936,9 +840,6 @@ class FunctionNode : public TreeNode {
DEFINE_CASTING_OPERATIONS(FunctionNode);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
AsyncMarker async_marker() { return async_marker_; }
AsyncMarker dart_async_marker() { return dart_async_marker_; }
TypeParameterList& type_parameters() { return type_parameters_; }
@@ -983,7 +884,6 @@ class Expression : public TreeNode {
DEFINE_CASTING_OPERATIONS(Expression);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor) = 0;
TokenPosition position() { return position_; }
void set_position(TokenPosition position) { position_ = position; }
@@ -1002,7 +902,6 @@ class InvalidExpression : public Expression {
static InvalidExpression* ReadFrom(Reader* reader);
virtual ~InvalidExpression();
- virtual void VisitChildren(Visitor* visitor);
DEFINE_CASTING_OPERATIONS(InvalidExpression);
@@ -1025,7 +924,6 @@ class VariableGet : public Expression {
DEFINE_CASTING_OPERATIONS(VariableGet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
VariableDeclaration* variable() { return variable_; }
@@ -1049,7 +947,6 @@ class VariableSet : public Expression {
DEFINE_CASTING_OPERATIONS(VariableSet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
VariableDeclaration* variable() { return variable_; }
Expression* expression() { return expression_; }
@@ -1074,7 +971,6 @@ class PropertyGet : public Expression {
DEFINE_CASTING_OPERATIONS(PropertyGet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* receiver() { return receiver_; }
Name* name() { return name_; }
@@ -1099,7 +995,6 @@ class PropertySet : public Expression {
DEFINE_CASTING_OPERATIONS(PropertySet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* receiver() { return receiver_; }
Name* name() { return name_; }
@@ -1126,7 +1021,6 @@ class DirectPropertyGet : public Expression {
DEFINE_CASTING_OPERATIONS(DirectPropertyGet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* receiver() { return receiver_; }
NameIndex target() { return target_reference_; }
@@ -1150,7 +1044,6 @@ class DirectPropertySet : public Expression {
DEFINE_CASTING_OPERATIONS(DirectPropertySet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex target() { return target_reference_; }
Expression* receiver() { return receiver_; }
@@ -1169,10 +1062,6 @@ class DirectPropertySet : public Expression {
class StaticGet : public Expression {
public:
- StaticGet(NameIndex target, bool can_stream) : target_reference_(target) {
- can_stream_ = can_stream;
- }
-
static StaticGet* ReadFrom(Reader* reader);
virtual ~StaticGet();
@@ -1180,7 +1069,6 @@ class StaticGet : public Expression {
DEFINE_CASTING_OPERATIONS(StaticGet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex target() { return target_reference_; }
@@ -1202,7 +1090,6 @@ class StaticSet : public Expression {
DEFINE_CASTING_OPERATIONS(StaticSet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex target() { return target_reference_; }
Expression* expression() { return expression_; }
@@ -1225,9 +1112,6 @@ class Arguments : public TreeNode {
DEFINE_CASTING_OPERATIONS(Arguments);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
List<DartType>& types() { return types_; }
List<Expression>& positional() { return positional_; }
List<NamedExpression>& named() { return named_; }
@@ -1255,9 +1139,6 @@ class NamedExpression : public TreeNode {
DEFINE_CASTING_OPERATIONS(NamedExpression);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
StringIndex name() { return name_index_; }
Expression* expression() { return expression_; }
@@ -1280,7 +1161,6 @@ class MethodInvocation : public Expression {
DEFINE_CASTING_OPERATIONS(MethodInvocation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* receiver() { return receiver_; }
Name* name() { return name_; }
@@ -1307,7 +1187,6 @@ class DirectMethodInvocation : public Expression {
DEFINE_CASTING_OPERATIONS(DirectMethodInvocation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* receiver() { return receiver_; }
NameIndex target() { return target_reference_; }
@@ -1332,7 +1211,6 @@ class StaticInvocation : public Expression {
DEFINE_CASTING_OPERATIONS(StaticInvocation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex procedure() { return procedure_reference_; }
Arguments* arguments() { return arguments_; }
@@ -1358,7 +1236,6 @@ class ConstructorInvocation : public Expression {
DEFINE_CASTING_OPERATIONS(ConstructorInvocation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
bool is_const() { return is_const_; }
NameIndex target() { return target_reference_; }
@@ -1384,7 +1261,6 @@ class Not : public Expression {
DEFINE_CASTING_OPERATIONS(Not);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* expression() { return expression_; }
@@ -1408,7 +1284,6 @@ class LogicalExpression : public Expression {
DEFINE_CASTING_OPERATIONS(LogicalExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* left() { return left_; }
Operator op() { return operator_; }
@@ -1434,7 +1309,6 @@ class ConditionalExpression : public Expression {
DEFINE_CASTING_OPERATIONS(ConditionalExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* condition() { return condition_; }
Expression* then() { return then_; }
@@ -1460,7 +1334,6 @@ class StringConcatenation : public Expression {
DEFINE_CASTING_OPERATIONS(StringConcatenation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
List<Expression>& expressions() { return expressions_; }
@@ -1482,7 +1355,6 @@ class IsExpression : public Expression {
DEFINE_CASTING_OPERATIONS(IsExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* operand() { return operand_; }
DartType* type() { return type_; }
@@ -1506,7 +1378,6 @@ class AsExpression : public Expression {
DEFINE_CASTING_OPERATIONS(AsExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* operand() { return operand_; }
DartType* type() { return type_; }
@@ -1526,8 +1397,6 @@ class BasicLiteral : public Expression {
virtual ~BasicLiteral();
DEFINE_CASTING_OPERATIONS(BasicLiteral);
-
- virtual void VisitChildren(Visitor* visitor);
};
@@ -1664,7 +1533,6 @@ class SymbolLiteral : public Expression {
DEFINE_CASTING_OPERATIONS(SymbolLiteral);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
StringIndex value() { return value_index_; }
@@ -1686,7 +1554,6 @@ class TypeLiteral : public Expression {
DEFINE_CASTING_OPERATIONS(TypeLiteral);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
DartType* type() { return type_; }
@@ -1708,7 +1575,6 @@ class ThisExpression : public Expression {
DEFINE_CASTING_OPERATIONS(ThisExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
ThisExpression() {}
@@ -1726,7 +1592,6 @@ class Rethrow : public Expression {
DEFINE_CASTING_OPERATIONS(Rethrow);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
Rethrow() {}
@@ -1744,7 +1609,6 @@ class Throw : public Expression {
DEFINE_CASTING_OPERATIONS(Throw);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* expression() { return expression_; }
@@ -1766,7 +1630,6 @@ class ListLiteral : public Expression {
DEFINE_CASTING_OPERATIONS(ListLiteral);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
bool is_const() { return is_const_; }
DartType* type() { return type_; }
@@ -1792,7 +1655,6 @@ class MapLiteral : public Expression {
DEFINE_CASTING_OPERATIONS(MapLiteral);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
bool is_const() { return is_const_; }
DartType* key_type() { return key_type_; }
@@ -1819,9 +1681,6 @@ class MapEntry : public TreeNode {
DEFINE_CASTING_OPERATIONS(MapEntry);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* key() { return key_; }
Expression* value() { return value_; }
@@ -1847,7 +1706,6 @@ class AwaitExpression : public Expression {
DEFINE_CASTING_OPERATIONS(AwaitExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* operand() { return operand_; }
@@ -1869,7 +1727,6 @@ class FunctionExpression : public Expression {
DEFINE_CASTING_OPERATIONS(FunctionExpression);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
FunctionNode* function() { return function_; }
@@ -1891,7 +1748,6 @@ class Let : public Expression {
DEFINE_CASTING_OPERATIONS(Let);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
VariableDeclaration* variable() { return variable_; }
Expression* body() { return body_; }
@@ -1921,7 +1777,6 @@ class VectorCreation : public Expression {
DEFINE_CASTING_OPERATIONS(VectorCreation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
intptr_t value() { return value_; }
@@ -1943,7 +1798,6 @@ class VectorGet : public Expression {
DEFINE_CASTING_OPERATIONS(VectorGet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* vector_expression() { return vector_expression_; }
intptr_t index() { return index_; }
@@ -1967,7 +1821,6 @@ class VectorSet : public Expression {
DEFINE_CASTING_OPERATIONS(VectorSet);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* vector_expression() { return vector_expression_; }
intptr_t index() { return index_; }
@@ -1993,7 +1846,6 @@ class VectorCopy : public Expression {
DEFINE_CASTING_OPERATIONS(VectorCopy);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
Expression* vector_expression() { return vector_expression_; }
@@ -2015,7 +1867,6 @@ class ClosureCreation : public Expression {
DEFINE_CASTING_OPERATIONS(ClosureCreation);
virtual void AcceptExpressionVisitor(ExpressionVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex top_level_function() { return top_level_function_reference_; }
Expression* context_vector() { return context_vector_; }
@@ -2040,8 +1891,6 @@ class Statement : public TreeNode {
DEFINE_CASTING_OPERATIONS(Statement);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor) = 0;
TokenPosition position() { return position_; }
protected:
@@ -2061,9 +1910,6 @@ class InvalidStatement : public Statement {
DEFINE_CASTING_OPERATIONS(InvalidStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
private:
InvalidStatement() {}
@@ -2080,9 +1926,6 @@ class ExpressionStatement : public Statement {
DEFINE_CASTING_OPERATIONS(ExpressionStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* expression() { return expression_; }
private:
@@ -2102,9 +1945,6 @@ class Block : public Statement {
DEFINE_CASTING_OPERATIONS(Block);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
List<Statement>& statements() { return statements_; }
TokenPosition end_position() { return end_position_; }
@@ -2126,9 +1966,6 @@ class EmptyStatement : public Statement {
DEFINE_CASTING_OPERATIONS(EmptyStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
private:
EmptyStatement() {}
@@ -2144,9 +1981,6 @@ class AssertStatement : public Statement {
DEFINE_CASTING_OPERATIONS(AssertStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* condition() { return condition_; }
Expression* message() { return message_; }
@@ -2168,9 +2002,6 @@ class LabeledStatement : public Statement {
DEFINE_CASTING_OPERATIONS(LabeledStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Statement* body() { return body_; }
private:
@@ -2190,9 +2021,6 @@ class BreakStatement : public Statement {
DEFINE_CASTING_OPERATIONS(BreakStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
intptr_t target_index() { return target_index_; }
private:
@@ -2212,9 +2040,6 @@ class WhileStatement : public Statement {
DEFINE_CASTING_OPERATIONS(WhileStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* condition() { return condition_; }
Statement* body() { return body_; }
@@ -2236,9 +2061,6 @@ class DoStatement : public Statement {
DEFINE_CASTING_OPERATIONS(DoStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* condition() { return condition_; }
Statement* body() { return body_; }
@@ -2260,9 +2082,6 @@ class ForStatement : public Statement {
DEFINE_CASTING_OPERATIONS(ForStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
List<VariableDeclaration>& variables() { return variables_; }
Expression* condition() { return condition_; }
List<Expression>& updates() { return updates_; }
@@ -2294,9 +2113,6 @@ class ForInStatement : public Statement {
DEFINE_CASTING_OPERATIONS(ForInStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
VariableDeclaration* variable() { return variable_; }
Expression* iterable() { return iterable_; }
Statement* body() { return body_; }
@@ -2328,9 +2144,6 @@ class SwitchStatement : public Statement {
DEFINE_CASTING_OPERATIONS(SwitchStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* condition() { return condition_; }
List<SwitchCase>& cases() { return cases_; }
@@ -2352,9 +2165,6 @@ class SwitchCase : public TreeNode {
DEFINE_CASTING_OPERATIONS(SwitchCase);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
List<Expression>& expressions() { return expressions_; }
bool is_default() { return is_default_; }
Statement* body() { return body_; }
@@ -2381,9 +2191,6 @@ class ContinueSwitchStatement : public Statement {
DEFINE_CASTING_OPERATIONS(ContinueSwitchStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
intptr_t target_index() { return target_index_; }
private:
@@ -2403,9 +2210,6 @@ class IfStatement : public Statement {
DEFINE_CASTING_OPERATIONS(IfStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* condition() { return condition_; }
Statement* then() { return then_; }
Statement* otherwise() { return otherwise_; }
@@ -2423,20 +2227,12 @@ class IfStatement : public Statement {
class ReturnStatement : public Statement {
public:
- ReturnStatement(Expression* expression, bool can_stream)
- : expression_(expression) {
- can_stream_ = can_stream;
- }
-
static ReturnStatement* ReadFrom(Reader* reader);
virtual ~ReturnStatement();
DEFINE_CASTING_OPERATIONS(ReturnStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Expression* expression() { return expression_; }
private:
@@ -2456,9 +2252,6 @@ class TryCatch : public Statement {
DEFINE_CASTING_OPERATIONS(TryCatch);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Statement* body() { return body_; }
List<Catch>& catches() { return catches_; }
@@ -2480,9 +2273,6 @@ class Catch : public TreeNode {
DEFINE_CASTING_OPERATIONS(Catch);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
DartType* guard() { return guard_; }
VariableDeclaration* exception() { return exception_; }
VariableDeclaration* stack_trace() { return stack_trace_; }
@@ -2517,9 +2307,6 @@ class TryFinally : public Statement {
DEFINE_CASTING_OPERATIONS(TryFinally);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
Statement* body() { return body_; }
Statement* finalizer() { return finalizer_; }
@@ -2545,9 +2332,6 @@ class YieldStatement : public Statement {
DEFINE_CASTING_OPERATIONS(YieldStatement);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
bool is_yield_start() { return (flags_ & kFlagYieldStar) == kFlagYieldStar; }
bool is_native() { return (flags_ & kFlagNative) == kFlagNative; }
Expression* expression() { return expression_; }
@@ -2576,9 +2360,6 @@ class VariableDeclaration : public Statement {
DEFINE_CASTING_OPERATIONS(VariableDeclaration);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
bool IsConst() { return (flags_ & kFlagConst) == kFlagConst; }
bool IsFinal() { return (flags_ & kFlagFinal) == kFlagFinal; }
@@ -2622,9 +2403,6 @@ class FunctionDeclaration : public Statement {
DEFINE_CASTING_OPERATIONS(FunctionDeclaration);
- virtual void AcceptStatementVisitor(StatementVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
VariableDeclaration* variable() { return variable_; }
FunctionNode* function() { return function_; }
@@ -2646,9 +2424,6 @@ class Name : public Node {
DEFINE_CASTING_OPERATIONS(Name);
- virtual void AcceptVisitor(Visitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
StringIndex string_index() { return string_index_; }
NameIndex library() { return library_reference_; }
@@ -2672,7 +2447,6 @@ class DartType : public Node {
DEFINE_CASTING_OPERATIONS(DartType);
- virtual void AcceptVisitor(Visitor* visitor);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor) = 0;
protected:
@@ -2692,7 +2466,6 @@ class InvalidType : public DartType {
DEFINE_CASTING_OPERATIONS(InvalidType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
InvalidType() {}
@@ -2710,7 +2483,6 @@ class DynamicType : public DartType {
DEFINE_CASTING_OPERATIONS(DynamicType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
DynamicType() {}
@@ -2728,7 +2500,6 @@ class VoidType : public DartType {
DEFINE_CASTING_OPERATIONS(VoidType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
VoidType() {}
@@ -2746,7 +2517,6 @@ class BottomType : public DartType {
DEFINE_CASTING_OPERATIONS(BottomType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
BottomType() {}
@@ -2767,7 +2537,6 @@ class InterfaceType : public DartType {
DEFINE_CASTING_OPERATIONS(InterfaceType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex klass() { return class_reference_; }
List<DartType>& type_arguments() { return type_arguments_; }
@@ -2793,7 +2562,6 @@ class TypedefType : public DartType {
DEFINE_CASTING_OPERATIONS(TypedefType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
NameIndex typedef_reference() { return typedef_reference_; }
List<DartType>& type_arguments() { return type_arguments_; }
@@ -2838,7 +2606,6 @@ class FunctionType : public DartType {
DEFINE_CASTING_OPERATIONS(FunctionType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
TypeParameterList& type_parameters() { return type_parameters_; }
int required_parameter_count() { return required_parameter_count_; }
@@ -2868,7 +2635,6 @@ class TypeParameterType : public DartType {
DEFINE_CASTING_OPERATIONS(TypeParameterType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
TypeParameter* parameter() { return parameter_; }
@@ -2890,7 +2656,6 @@ class VectorType : public DartType {
DEFINE_CASTING_OPERATIONS(VectorType);
virtual void AcceptDartTypeVisitor(DartTypeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
private:
VectorType() {}
@@ -2907,9 +2672,6 @@ class TypeParameter : public TreeNode {
DEFINE_CASTING_OPERATIONS(TypeParameter);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
StringIndex name() { return name_index_; }
DartType* bound() { return bound_; }
@@ -2935,9 +2697,6 @@ class Program : public TreeNode {
DEFINE_CASTING_OPERATIONS(Program);
- virtual void AcceptTreeVisitor(TreeVisitor* visitor);
- virtual void VisitChildren(Visitor* visitor);
-
SourceTable& source_table() { return source_table_; }
List<Library>& libraries() { return libraries_; }
NameIndex main_method() { return main_method_reference_; }
@@ -3087,114 +2846,6 @@ class ExpressionVisitor {
};
-class StatementVisitor {
- public:
- virtual ~StatementVisitor() {}
-
- virtual void VisitDefaultStatement(Statement* node) = 0;
- virtual void VisitInvalidStatement(InvalidStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitExpressionStatement(ExpressionStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitBlock(Block* node) { VisitDefaultStatement(node); }
- virtual void VisitEmptyStatement(EmptyStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitAssertStatement(AssertStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitLabeledStatement(LabeledStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitBreakStatement(BreakStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitWhileStatement(WhileStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitDoStatement(DoStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitForStatement(ForStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitForInStatement(ForInStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitSwitchStatement(SwitchStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitContinueSwitchStatement(ContinueSwitchStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitIfStatement(IfStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitReturnStatement(ReturnStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitTryCatch(TryCatch* node) { VisitDefaultStatement(node); }
- virtual void VisitTryFinally(TryFinally* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitYieldStatement(YieldStatement* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitVariableDeclaration(VariableDeclaration* node) {
- VisitDefaultStatement(node);
- }
- virtual void VisitFunctionDeclaration(FunctionDeclaration* node) {
- VisitDefaultStatement(node);
- }
-};
-
-
-class MemberVisitor {
- public:
- virtual ~MemberVisitor() {}
-
- virtual void VisitDefaultMember(Member* node) = 0;
- virtual void VisitConstructor(Constructor* node) { VisitDefaultMember(node); }
- virtual void VisitProcedure(Procedure* node) { VisitDefaultMember(node); }
- virtual void VisitField(Field* node) { VisitDefaultMember(node); }
-};
-
-
-class ClassVisitor {
- public:
- virtual ~ClassVisitor() {}
-
- virtual void VisitDefaultClass(Class* node) = 0;
- virtual void VisitNormalClass(NormalClass* node) { VisitDefaultClass(node); }
- virtual void VisitMixinClass(MixinClass* node) { VisitDefaultClass(node); }
-};
-
-
-class InitializerVisitor {
- public:
- virtual ~InitializerVisitor() {}
-
- virtual void VisitDefaultInitializer(Initializer* node) = 0;
- virtual void VisitInvalidInitializer(InvalidInitializer* node) {
- VisitDefaultInitializer(node);
- }
- virtual void VisitFieldInitializer(FieldInitializer* node) {
- VisitDefaultInitializer(node);
- }
- virtual void VisitSuperInitializer(SuperInitializer* node) {
- VisitDefaultInitializer(node);
- }
- virtual void VisitRedirectingInitializer(RedirectingInitializer* node) {
- VisitDefaultInitializer(node);
- }
- virtual void VisitLocalInitializer(LocalInitializer* node) {
- VisitDefaultInitializer(node);
- }
-};
-
-
class DartTypeVisitor {
public:
virtual ~DartTypeVisitor() {}
@@ -3224,74 +2875,6 @@ class DartTypeVisitor {
};
-class TreeVisitor : public ExpressionVisitor,
- public StatementVisitor,
- public MemberVisitor,
- public ClassVisitor,
- public InitializerVisitor {
- public:
- virtual ~TreeVisitor() {}
-
- virtual void VisitDefaultTreeNode(TreeNode* node) = 0;
- virtual void VisitDefaultStatement(Statement* node) {
- VisitDefaultTreeNode(node);
- }
- virtual void VisitDefaultExpression(Expression* node) {
- VisitDefaultTreeNode(node);
- }
- virtual void VisitDefaultMember(Member* node) { VisitDefaultTreeNode(node); }
- virtual void VisitDefaultClass(Class* node) { VisitDefaultTreeNode(node); }
- virtual void VisitDefaultInitializer(Initializer* node) {
- VisitDefaultTreeNode(node);
- }
-
- virtual void VisitLibrary(Library* node) { VisitDefaultTreeNode(node); }
- virtual void VisitTypeParameter(TypeParameter* node) {
- VisitDefaultTreeNode(node);
- }
- virtual void VisitFunctionNode(FunctionNode* node) {
- VisitDefaultTreeNode(node);
- }
- virtual void VisitArguments(Arguments* node) { VisitDefaultTreeNode(node); }
- virtual void VisitNamedExpression(NamedExpression* node) {
- VisitDefaultTreeNode(node);
- }
- virtual void VisitSwitchCase(SwitchCase* node) { VisitDefaultTreeNode(node); }
- virtual void VisitCatch(Catch* node) { VisitDefaultTreeNode(node); }
- virtual void VisitMapEntry(MapEntry* node) { VisitDefaultTreeNode(node); }
- virtual void VisitProgram(Program* node) { VisitDefaultTreeNode(node); }
- virtual void VisitTypedef(Typedef* node) { VisitDefaultTreeNode(node); }
-};
-
-
-class Visitor : public TreeVisitor, public DartTypeVisitor {
- public:
- virtual ~Visitor() {}
-
- virtual void VisitDefaultNode(Node* node) = 0;
- virtual void VisitDefaultTreeNode(TreeNode* node) { VisitDefaultNode(node); }
- virtual void VisitDefaultDartType(DartType* node) { VisitDefaultNode(node); }
- virtual void VisitName(Name* node) { VisitDefaultNode(node); }
- virtual void VisitDefaultClassReference(Class* node) {
- VisitDefaultNode(node);
- }
- virtual void VisitDefaultMemberReference(Member* node) {
- VisitDefaultNode(node);
- }
-};
-
-
-class RecursiveVisitor : public Visitor {
- public:
- virtual ~RecursiveVisitor() {}
-
- virtual void VisitDefaultNode(Node* node) { node->VisitChildren(this); }
-
- virtual void VisitDefaultClassReference(Class* node) {}
- virtual void VisitDefaultMemberReference(Member* node) {}
-};
-
-
template <typename T>
List<T>::~List() {
for (int i = 0; i < length_; i++) {
« no previous file with comments | « no previous file | runtime/vm/kernel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698