Commit f9b81189 authored by Toon Verwaest's avatar Toon Verwaest Committed by Commit Bot

[ast] Remove unused DoExpression

Change-Id: Iebdf095600186988abd7b1f13a1a2d9f566e5d7c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2049845
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/master@{#66216}
parent c0fbfcd8
......@@ -294,13 +294,6 @@ void AstTraversalVisitor<Subclass>::VisitNativeFunctionLiteral(
PROCESS_EXPRESSION(expr);
}
template <class Subclass>
void AstTraversalVisitor<Subclass>::VisitDoExpression(DoExpression* expr) {
PROCESS_EXPRESSION(expr);
RECURSE(VisitBlock(expr->block()));
RECURSE(VisitVariableProxy(expr->result()));
}
template <class Subclass>
void AstTraversalVisitor<Subclass>::VisitConditional(Conditional* expr) {
PROCESS_EXPRESSION(expr);
......
......@@ -89,7 +89,6 @@ namespace internal {
V(CompoundAssignment) \
V(Conditional) \
V(CountOperation) \
V(DoExpression) \
V(EmptyParentheses) \
V(FunctionLiteral) \
V(GetTemplateObject) \
......@@ -411,25 +410,6 @@ inline ZonePtrList<const AstRawString>* Block::labels() const {
return nullptr;
}
class DoExpression final : public Expression {
public:
Block* block() { return block_; }
VariableProxy* result() { return result_; }
private:
friend class AstNodeFactory;
DoExpression(Block* block, VariableProxy* result, int pos)
: Expression(pos, kDoExpression), block_(block), result_(result) {
DCHECK_NOT_NULL(block_);
DCHECK_NOT_NULL(result_);
}
Block* block_;
VariableProxy* result_;
};
class Declaration : public AstNode {
public:
using List = base::ThreadedList<Declaration>;
......@@ -3303,11 +3283,6 @@ class AstNodeFactory final {
return new (zone_) NativeFunctionLiteral(name, extension, pos);
}
DoExpression* NewDoExpression(Block* block, Variable* result_var, int pos) {
VariableProxy* result = NewVariableProxy(result_var, pos);
return new (zone_) DoExpression(block, result, pos);
}
SuperPropertyReference* NewSuperPropertyReference(Expression* home_object,
int pos) {
return new (zone_) SuperPropertyReference(home_object, pos);
......
......@@ -238,9 +238,6 @@ void CallPrinter::VisitInitializeClassMembersStatement(
void CallPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {}
void CallPrinter::VisitDoExpression(DoExpression* node) { Find(node->block()); }
void CallPrinter::VisitConditional(Conditional* node) {
Find(node->condition());
Find(node->then_expression());
......@@ -1179,12 +1176,6 @@ void AstPrinter::VisitNativeFunctionLiteral(NativeFunctionLiteral* node) {
}
void AstPrinter::VisitDoExpression(DoExpression* node) {
IndentedScope indent(this, "DO EXPRESSION", node->position());
PrintStatements(node->block()->statements());
}
void AstPrinter::VisitConditional(Conditional* node) {
IndentedScope indent(this, "CONDITIONAL", node->position());
PrintIndentedVisit("CONDITION", node->condition());
......
......@@ -2456,11 +2456,6 @@ void BytecodeGenerator::VisitNativeFunctionLiteral(
native_function_literals_.push_back(std::make_pair(expr, entry));
}
void BytecodeGenerator::VisitDoExpression(DoExpression* expr) {
VisitBlock(expr->block());
VisitVariableProxy(expr->result());
}
void BytecodeGenerator::VisitConditional(Conditional* expr) {
ConditionalControlFlowBuilder conditional_builder(
builder(), block_coverage_builder_, expr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment