Commit 5b99eec3 authored by bmeurer's avatar bmeurer Committed by Commit bot

[turbofan] Remove unused PlainPrimitiveToNumber operator.

At some point we thought about using this instead of JSToNumber, but now
there doesn't seem to be any reason for this anymore.

R=jarin@chromium.org

Review URL: https://codereview.chromium.org/1890763002

Cr-Commit-Position: refs/heads/master@{#35469}
parent a915f5bf
......@@ -247,7 +247,6 @@ class JSBinopReduction final {
// Avoid inserting too many eager ToNumber() operations.
Reduction const reduction = lowering_->ReduceJSToNumberInput(node);
if (reduction.Changed()) return reduction.replacement();
// TODO(jarin) Use PlainPrimitiveToNumber once we have it.
return graph()->NewNode(
javascript()->ToNumber(), node, jsgraph()->NoContextConstant(),
jsgraph()->EmptyFrameState(), graph()->start(), graph()->start());
......
......@@ -195,7 +195,6 @@
V(NumberToInt32) \
V(NumberToUint32) \
V(NumberIsHoleNaN) \
V(PlainPrimitiveToNumber) \
V(StringToNumber) \
V(ChangeTaggedToInt32) \
V(ChangeTaggedToUint32) \
......
......@@ -1017,23 +1017,6 @@ class RepresentationSelector {
}
break;
}
case IrOpcode::kPlainPrimitiveToNumber: {
VisitUnop(node, UseInfo::AnyTagged(), MachineRepresentation::kTagged);
if (lower()) {
// PlainPrimitiveToNumber(x) => Call(ToNumberStub, x, no-context)
Operator::Properties properties = node->op()->properties();
Callable callable = CodeFactory::ToNumber(jsgraph_->isolate());
CallDescriptor::Flags flags = CallDescriptor::kNoFlags;
CallDescriptor* desc = Linkage::GetStubCallDescriptor(
jsgraph_->isolate(), jsgraph_->zone(), callable.descriptor(), 0,
flags, properties);
node->InsertInput(jsgraph_->zone(), 0,
jsgraph_->HeapConstant(callable.code()));
node->AppendInput(jsgraph_->zone(), jsgraph_->NoContextConstant());
NodeProperties::ChangeOp(node, jsgraph_->common()->Call(desc));
}
break;
}
case IrOpcode::kReferenceEqual: {
VisitBinop(node, UseInfo::AnyTagged(), MachineRepresentation::kBit);
if (lower()) {
......
......@@ -181,7 +181,6 @@ const ElementAccess& ElementAccessOf(const Operator* op) {
V(NumberToInt32, Operator::kNoProperties, 1) \
V(NumberToUint32, Operator::kNoProperties, 1) \
V(NumberIsHoleNaN, Operator::kNoProperties, 1) \
V(PlainPrimitiveToNumber, Operator::kNoProperties, 1) \
V(StringToNumber, Operator::kNoProperties, 1) \
V(ChangeTaggedToInt32, Operator::kNoProperties, 1) \
V(ChangeTaggedToUint32, Operator::kNoProperties, 1) \
......
......@@ -152,8 +152,6 @@ class SimplifiedOperatorBuilder final : public ZoneObject {
const Operator* NumberToUint32();
const Operator* NumberIsHoleNaN();
const Operator* PlainPrimitiveToNumber();
const Operator* ReferenceEqual(Type* type);
const Operator* StringEqual();
......
......@@ -1799,12 +1799,6 @@ Type* Typer::Visitor::TypeNumberIsHoleNaN(Node* node) {
return Type::Boolean();
}
Type* Typer::Visitor::TypePlainPrimitiveToNumber(Node* node) {
return TypeUnaryOp(node, ToNumber);
}
// static
Type* Typer::Visitor::ReferenceEqualTyper(Type* lhs, Type* rhs, Typer* t) {
if (lhs->IsConstant() && rhs->Is(lhs)) {
......
......@@ -717,11 +717,6 @@ void Verifier::Visitor::Check(Node* node) {
CheckValueInputIs(node, 0, Type::Number());
CheckUpperIs(node, Type::Boolean());
break;
case IrOpcode::kPlainPrimitiveToNumber:
// PlainPrimitive -> Number
CheckValueInputIs(node, 0, Type::PlainPrimitive());
CheckUpperIs(node, Type::Number());
break;
case IrOpcode::kStringEqual:
case IrOpcode::kStringLessThan:
case IrOpcode::kStringLessThanOrEqual:
......
......@@ -56,7 +56,6 @@ const PureOperator kPureOperators[] = {
PURE(NumberShiftRightLogical, Operator::kNoProperties, 2),
PURE(NumberToInt32, Operator::kNoProperties, 1),
PURE(NumberToUint32, Operator::kNoProperties, 1),
PURE(PlainPrimitiveToNumber, Operator::kNoProperties, 1),
PURE(ChangeTaggedToInt32, Operator::kNoProperties, 1),
PURE(ChangeTaggedToUint32, Operator::kNoProperties, 1),
PURE(ChangeTaggedToFloat64, Operator::kNoProperties, 1),
......
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