Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index b7b230fc7b25ce02595684639a0bae1fc08aea49..ee03ba07bc755cb3d8f8b7992cc4875743b3a4e2 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -208,7 +208,8 @@ |
} |
CheckForMinusZeroMode CheckMinusZeroModeOf(const Operator* op) { |
- DCHECK(op->opcode() == IrOpcode::kCheckedInt32Mul || |
+ DCHECK(op->opcode() == IrOpcode::kChangeFloat64ToTagged || |
+ op->opcode() == IrOpcode::kCheckedInt32Mul || |
op->opcode() == IrOpcode::kCheckedFloat64ToInt32 || |
op->opcode() == IrOpcode::kCheckedTaggedToInt32); |
return OpParameter<CheckForMinusZeroMode>(op); |
@@ -398,7 +399,6 @@ |
V(ChangeTaggedToInt32, Operator::kNoProperties, 1, 0) \ |
V(ChangeTaggedToUint32, Operator::kNoProperties, 1, 0) \ |
V(ChangeTaggedToFloat64, Operator::kNoProperties, 1, 0) \ |
- V(ChangeFloat64ToTagged, Operator::kNoProperties, 1, 0) \ |
V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1, 0) \ |
V(ChangeInt32ToTagged, Operator::kNoProperties, 1, 0) \ |
V(ChangeUint32ToTagged, Operator::kNoProperties, 1, 0) \ |
@@ -474,6 +474,19 @@ |
"ArrayBufferWasNeutered", 1, 1, 1, 1, 1, 0) {} |
}; |
ArrayBufferWasNeuteredOperator kArrayBufferWasNeutered; |
+ |
+ template <CheckForMinusZeroMode kMode> |
+ struct ChangeFloat64ToTaggedOperator final |
+ : public Operator1<CheckForMinusZeroMode> { |
+ ChangeFloat64ToTaggedOperator() |
+ : Operator1<CheckForMinusZeroMode>( |
+ IrOpcode::kChangeFloat64ToTagged, Operator::kPure, |
+ "ChangeFloat64ToTagged", 1, 0, 0, 1, 0, 0, kMode) {} |
+ }; |
+ ChangeFloat64ToTaggedOperator<CheckForMinusZeroMode::kCheckForMinusZero> |
+ kChangeFloat64ToTaggedCheckForMinusZeroOperator; |
+ ChangeFloat64ToTaggedOperator<CheckForMinusZeroMode::kDontCheckForMinusZero> |
+ kChangeFloat64ToTaggedDontCheckForMinusZeroOperator; |
template <CheckForMinusZeroMode kMode> |
struct CheckedInt32MulOperator final |
@@ -621,6 +634,18 @@ |
GET_FROM_CACHE(ArrayBufferWasNeutered) |
#undef GET_FROM_CACHE |
+const Operator* SimplifiedOperatorBuilder::ChangeFloat64ToTagged( |
+ CheckForMinusZeroMode mode) { |
+ switch (mode) { |
+ case CheckForMinusZeroMode::kCheckForMinusZero: |
+ return &cache_.kChangeFloat64ToTaggedCheckForMinusZeroOperator; |
+ case CheckForMinusZeroMode::kDontCheckForMinusZero: |
+ return &cache_.kChangeFloat64ToTaggedDontCheckForMinusZeroOperator; |
+ } |
+ UNREACHABLE(); |
+ return nullptr; |
+} |
+ |
const Operator* SimplifiedOperatorBuilder::CheckedInt32Mul( |
CheckForMinusZeroMode mode) { |
switch (mode) { |