Commit 3978bb02 authored by Benedikt Meurer's avatar Benedikt Meurer Committed by Commit Bot

[turbofan] Remove unused JSToInteger operator.

The JSToInteger operator is not used anywhere in TurboFan nowadays, so
no point in keeping the dead code in the tree.

Bug: v8:8015
Change-Id: If03ba63c4b932ba0aac60b9bbc89fee3909a93c6
Reviewed-on: https://chromium-review.googlesource.com/1238238Reviewed-by: 's avatarSigurd Schneider <sigurds@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56126}
parent 08aec7d7
......@@ -79,7 +79,6 @@ REPLACE_STUB_CALL(Increment)
REPLACE_STUB_CALL(Negate)
REPLACE_STUB_CALL(HasProperty)
REPLACE_STUB_CALL(Equal)
REPLACE_STUB_CALL(ToInteger)
REPLACE_STUB_CALL(ToLength)
REPLACE_STUB_CALL(ToNumber)
REPLACE_STUB_CALL(ToNumberConvertBigInt)
......
......@@ -609,7 +609,6 @@ CompareOperationHint CompareOperationHintOf(const Operator* op) {
V(Decrement, Operator::kNoProperties, 1, 1) \
V(Increment, Operator::kNoProperties, 1, 1) \
V(Negate, Operator::kNoProperties, 1, 1) \
V(ToInteger, Operator::kNoProperties, 1, 1) \
V(ToLength, Operator::kNoProperties, 1, 1) \
V(ToName, Operator::kNoProperties, 1, 1) \
V(ToNumber, Operator::kNoProperties, 1, 1) \
......
......@@ -703,7 +703,6 @@ class V8_EXPORT_PRIVATE JSOperatorBuilder final
const Operator* Increment();
const Operator* Negate();
const Operator* ToInteger();
const Operator* ToLength();
const Operator* ToName();
const Operator* ToNumber();
......
......@@ -892,17 +892,6 @@ Reduction JSTypedLowering::ReduceJSStrictEqual(Node* node) {
return NoChange();
}
Reduction JSTypedLowering::ReduceJSToInteger(Node* node) {
Node* const input = NodeProperties::GetValueInput(node, 0);
Type const input_type = NodeProperties::GetType(input);
if (input_type.Is(type_cache_.kIntegerOrMinusZero)) {
// JSToInteger(x:integer) => x
ReplaceWithValue(node, input);
return Replace(input);
}
return NoChange();
}
Reduction JSTypedLowering::ReduceJSToName(Node* node) {
Node* const input = NodeProperties::GetValueInput(node, 0);
Type const input_type = NodeProperties::GetType(input);
......@@ -2269,8 +2258,6 @@ Reduction JSTypedLowering::Reduce(Node* node) {
return ReduceJSHasInPrototypeChain(node);
case IrOpcode::kJSOrdinaryHasInstance:
return ReduceJSOrdinaryHasInstance(node);
case IrOpcode::kJSToInteger:
return ReduceJSToInteger(node);
case IrOpcode::kJSToLength:
return ReduceJSToLength(node);
case IrOpcode::kJSToName:
......
......@@ -57,7 +57,6 @@ class V8_EXPORT_PRIVATE JSTypedLowering final
Reduction ReduceJSStoreModule(Node* node);
Reduction ReduceJSEqual(Node* node);
Reduction ReduceJSStrictEqual(Node* node);
Reduction ReduceJSToInteger(Node* node);
Reduction ReduceJSToLength(Node* node);
Reduction ReduceJSToName(Node* node);
Reduction ReduceJSToNumberInput(Node* input);
......
......@@ -599,7 +599,6 @@ bool NodeProperties::CanBeNullOrUndefined(Isolate* isolate, Node* receiver,
case IrOpcode::kCheckSmi:
case IrOpcode::kCheckString:
case IrOpcode::kCheckSymbol:
case IrOpcode::kJSToInteger:
case IrOpcode::kJSToLength:
case IrOpcode::kJSToName:
case IrOpcode::kJSToNumber:
......
......@@ -117,7 +117,6 @@
V(JSOrdinaryHasInstance)
#define JS_CONVERSION_UNOP_LIST(V) \
V(JSToInteger) \
V(JSToLength) \
V(JSToName) \
V(JSToNumber) \
......
......@@ -91,7 +91,6 @@ bool OperatorProperties::HasFrameStateInput(const Operator* op) {
case IrOpcode::kJSDeleteProperty:
// Conversions
case IrOpcode::kJSToInteger:
case IrOpcode::kJSToLength:
case IrOpcode::kJSToName:
case IrOpcode::kJSToNumber:
......
......@@ -3189,7 +3189,6 @@ class RepresentationSelector {
case IrOpcode::kJSDecrement:
case IrOpcode::kJSIncrement:
case IrOpcode::kJSNegate:
case IrOpcode::kJSToInteger:
case IrOpcode::kJSToLength:
case IrOpcode::kJSToName:
case IrOpcode::kJSToObject:
......
......@@ -1114,10 +1114,6 @@ Type Typer::Visitor::TypeToBoolean(Node* node) {
return TypeUnaryOp(node, ToBoolean);
}
Type Typer::Visitor::TypeJSToInteger(Node* node) {
return TypeUnaryOp(node, ToInteger);
}
Type Typer::Visitor::TypeJSToLength(Node* node) {
return TypeUnaryOp(node, ToLength);
}
......
......@@ -617,10 +617,6 @@ void Verifier::Visitor::Check(Node* node, const AllNodes& all) {
// Type is Boolean.
CheckTypeIs(node, Type::Boolean());
break;
case IrOpcode::kJSToInteger:
// Type is OrderedNumber.
CheckTypeIs(node, Type::OrderedNumber());
break;
case IrOpcode::kJSToLength:
CheckTypeIs(node, Type::Range(0, kMaxSafeInteger, zone));
break;
......
......@@ -434,7 +434,6 @@ TEST_F(TyperTest, TypeJSStrictEqual) {
TEST_F(TyperTest, Monotonicity_##name) { \
TestUnaryMonotonicity(javascript_.name()); \
}
TEST_MONOTONICITY(ToInteger)
TEST_MONOTONICITY(ToLength)
TEST_MONOTONICITY(ToName)
TEST_MONOTONICITY(ToNumber)
......
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