Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index e8e21bf59cff433270321c3e01ee78f1d3afae0f..9fb0fc55bf953f0cd6aef3bb1139ee4671ce99b6 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -213,7 +213,8 @@ CheckFloat64HoleMode CheckFloat64HoleModeOf(const Operator* op) { |
} |
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); |
@@ -488,7 +489,6 @@ UnicodeEncoding UnicodeEncodingOf(const Operator* op) { |
V(ChangeTaggedToUint32, Operator::kNoProperties, 1, 0) \ |
V(ChangeTaggedToFloat64, Operator::kNoProperties, 1, 0) \ |
V(ChangeTaggedToTaggedSigned, Operator::kNoProperties, 1, 0) \ |
- V(ChangeFloat64ToTagged, Operator::kNoProperties, 1, 0) \ |
V(ChangeFloat64ToTaggedPointer, Operator::kNoProperties, 1, 0) \ |
V(ChangeInt31ToTaggedSigned, Operator::kNoProperties, 1, 0) \ |
V(ChangeInt32ToTagged, Operator::kNoProperties, 1, 0) \ |
@@ -601,6 +601,19 @@ struct SimplifiedOperatorGlobalCache final { |
NewUnmappedArgumentsElementsOperator kNewUnmappedArgumentsElements; |
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 |
: public Operator1<CheckForMinusZeroMode> { |
CheckedInt32MulOperator() |
@@ -757,6 +770,18 @@ GET_FROM_CACHE(ArgumentsFrame) |
GET_FROM_CACHE(NewUnmappedArgumentsElements) |
#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) { |