Remove unused ResolvedProperty AST node
This was added in 2d889aa9a4
but all consumers of it have since been
removed.
Bug: v8:10021
Change-Id: I13aa12853e1720b2f919ca8b29737fedb96bc145
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1938462
Auto-Submit: Shu-yu Guo <syg@chromium.org>
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Georg Neis <neis@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65198}
This commit is contained in:
parent
09a2bc44d3
commit
4fd2a24b33
@ -395,14 +395,6 @@ void AstTraversalVisitor<Subclass>::VisitProperty(Property* expr) {
|
||||
RECURSE_EXPRESSION(Visit(expr->key()));
|
||||
}
|
||||
|
||||
template <class Subclass>
|
||||
void AstTraversalVisitor<Subclass>::VisitResolvedProperty(
|
||||
ResolvedProperty* expr) {
|
||||
PROCESS_EXPRESSION(expr);
|
||||
RECURSE_EXPRESSION(VisitVariableProxy(expr->object()));
|
||||
RECURSE_EXPRESSION(VisitVariableProxy(expr->property()));
|
||||
}
|
||||
|
||||
template <class Subclass>
|
||||
void AstTraversalVisitor<Subclass>::VisitCall(Call* expr) {
|
||||
PROCESS_EXPRESSION(expr);
|
||||
|
@ -847,10 +847,6 @@ Call::CallType Call::GetCallType() const {
|
||||
}
|
||||
}
|
||||
|
||||
if (expression()->IsResolvedProperty()) {
|
||||
return RESOLVED_PROPERTY_CALL;
|
||||
}
|
||||
|
||||
return OTHER_CALL;
|
||||
}
|
||||
|
||||
|
@ -97,7 +97,6 @@ namespace internal {
|
||||
V(NativeFunctionLiteral) \
|
||||
V(OptionalChain) \
|
||||
V(Property) \
|
||||
V(ResolvedProperty) \
|
||||
V(Spread) \
|
||||
V(StoreInArrayLiteral) \
|
||||
V(SuperCallReference) \
|
||||
@ -1692,26 +1691,6 @@ class Property final : public Expression {
|
||||
Expression* key_;
|
||||
};
|
||||
|
||||
// ResolvedProperty pairs a receiver field with a value field. It allows Call
|
||||
// to support arbitrary receivers while still taking advantage of TypeFeedback.
|
||||
class ResolvedProperty final : public Expression {
|
||||
public:
|
||||
VariableProxy* object() const { return object_; }
|
||||
VariableProxy* property() const { return property_; }
|
||||
|
||||
void set_object(VariableProxy* e) { object_ = e; }
|
||||
void set_property(VariableProxy* e) { property_ = e; }
|
||||
|
||||
private:
|
||||
friend class AstNodeFactory;
|
||||
|
||||
ResolvedProperty(VariableProxy* obj, VariableProxy* property, int pos)
|
||||
: Expression(pos, kResolvedProperty), object_(obj), property_(property) {}
|
||||
|
||||
VariableProxy* object_;
|
||||
VariableProxy* property_;
|
||||
};
|
||||
|
||||
class Call final : public Expression {
|
||||
public:
|
||||
Expression* expression() const { return expression_; }
|
||||
@ -1742,7 +1721,6 @@ class Call final : public Expression {
|
||||
KEYED_SUPER_PROPERTY_CALL,
|
||||
PRIVATE_CALL,
|
||||
SUPER_CALL,
|
||||
RESOLVED_PROPERTY_CALL,
|
||||
OTHER_CALL
|
||||
};
|
||||
|
||||
@ -3091,12 +3069,6 @@ class AstNodeFactory final {
|
||||
return new (zone_) Property(obj, key, pos, optional_chain);
|
||||
}
|
||||
|
||||
ResolvedProperty* NewResolvedProperty(VariableProxy* obj,
|
||||
VariableProxy* property,
|
||||
int pos = kNoSourcePosition) {
|
||||
return new (zone_) ResolvedProperty(obj, property, pos);
|
||||
}
|
||||
|
||||
Call* NewCall(Expression* expression,
|
||||
const ScopedPtrList<Expression>& arguments, int pos,
|
||||
Call::PossiblyEval possibly_eval = Call::NOT_EVAL,
|
||||
|
@ -401,8 +401,6 @@ void CallPrinter::VisitProperty(Property* node) {
|
||||
}
|
||||
}
|
||||
|
||||
void CallPrinter::VisitResolvedProperty(ResolvedProperty* node) {}
|
||||
|
||||
void CallPrinter::VisitCall(Call* node) {
|
||||
bool was_found = false;
|
||||
if (node->position() == position_) {
|
||||
@ -1361,15 +1359,6 @@ void AstPrinter::VisitProperty(Property* node) {
|
||||
}
|
||||
}
|
||||
|
||||
void AstPrinter::VisitResolvedProperty(ResolvedProperty* node) {
|
||||
EmbeddedVector<char, 128> buf;
|
||||
SNPrintF(buf, "RESOLVED-PROPERTY");
|
||||
IndentedScope indent(this, buf.begin(), node->position());
|
||||
|
||||
PrintIndentedVisit("RECEIVER", node->object());
|
||||
PrintIndentedVisit("PROPERTY", node->property());
|
||||
}
|
||||
|
||||
void AstPrinter::VisitCall(Call* node) {
|
||||
EmbeddedVector<char, 128> buf;
|
||||
SNPrintF(buf, "CALL");
|
||||
|
@ -4657,11 +4657,6 @@ void BytecodeGenerator::VisitProperty(Property* expr) {
|
||||
}
|
||||
}
|
||||
|
||||
void BytecodeGenerator::VisitResolvedProperty(ResolvedProperty* expr) {
|
||||
// Handled by VisitCall().
|
||||
UNREACHABLE();
|
||||
}
|
||||
|
||||
void BytecodeGenerator::VisitArguments(const ZonePtrList<Expression>* args,
|
||||
RegisterList* arg_regs) {
|
||||
// Visit arguments.
|
||||
@ -4706,13 +4701,6 @@ void BytecodeGenerator::VisitCall(Call* expr) {
|
||||
VisitPropertyLoadForRegister(args.last_register(), property, callee);
|
||||
break;
|
||||
}
|
||||
case Call::RESOLVED_PROPERTY_CALL: {
|
||||
ResolvedProperty* resolved = callee_expr->AsResolvedProperty();
|
||||
VisitAndPushIntoRegisterList(resolved->object(), &args);
|
||||
VisitForAccumulatorValue(resolved->property());
|
||||
builder()->StoreAccumulatorInRegister(callee);
|
||||
break;
|
||||
}
|
||||
case Call::GLOBAL_CALL: {
|
||||
// Receiver is undefined for global calls.
|
||||
if (!is_spread_call && !optimize_as_one_shot) {
|
||||
@ -4828,8 +4816,7 @@ void BytecodeGenerator::VisitCall(Call* expr) {
|
||||
DCHECK(!implicit_undefined_receiver);
|
||||
builder()->CallNoFeedback(callee, args);
|
||||
} else if (call_type == Call::NAMED_PROPERTY_CALL ||
|
||||
call_type == Call::KEYED_PROPERTY_CALL ||
|
||||
call_type == Call::RESOLVED_PROPERTY_CALL) {
|
||||
call_type == Call::KEYED_PROPERTY_CALL) {
|
||||
DCHECK(!implicit_undefined_receiver);
|
||||
builder()->CallProperty(callee, args,
|
||||
feedback_index(feedback_spec()->AddCallICSlot()));
|
||||
|
Loading…
Reference in New Issue
Block a user