| Index: src/compiler/simplified-operator.cc
|
| diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
|
| index a5f07bfa4f8fda86c1d5fc849f58c960e9168dee..756428ca39cd6c1709f744dfff2ce6c26934fb8d 100644
|
| --- a/src/compiler/simplified-operator.cc
|
| +++ b/src/compiler/simplified-operator.cc
|
| @@ -219,7 +219,10 @@ Type* TypeOf(const Operator* op) {
|
|
|
| BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) {
|
| DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberAdd ||
|
| - op->opcode() == IrOpcode::kSpeculativeNumberSubtract);
|
| + op->opcode() == IrOpcode::kSpeculativeNumberSubtract ||
|
| + op->opcode() == IrOpcode::kSpeculativeNumberMultiply ||
|
| + op->opcode() == IrOpcode::kSpeculativeNumberDivide ||
|
| + op->opcode() == IrOpcode::kSpeculativeNumberModulus);
|
| return OpParameter<BinaryOperationHints::Hint>(op);
|
| }
|
|
|
| @@ -295,6 +298,13 @@ CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) {
|
| V(StringLessThan, Operator::kNoProperties, 2) \
|
| V(StringLessThanOrEqual, Operator::kNoProperties, 2)
|
|
|
| +#define SPECULATIVE_BINOP_LIST(V) \
|
| + V(SpeculativeNumberAdd) \
|
| + V(SpeculativeNumberSubtract) \
|
| + V(SpeculativeNumberDivide) \
|
| + V(SpeculativeNumberMultiply) \
|
| + V(SpeculativeNumberModulus)
|
| +
|
| #define CHECKED_OP_LIST(V) \
|
| V(CheckedUint32ToInt32) \
|
| V(CheckedFloat64ToInt32) \
|
| @@ -496,19 +506,14 @@ const Operator* SimplifiedOperatorBuilder::StoreBuffer(BufferAccess access) {
|
| return nullptr;
|
| }
|
|
|
| -const Operator* SimplifiedOperatorBuilder::SpeculativeNumberAdd(
|
| - BinaryOperationHints::Hint hint) {
|
| - return new (zone()) Operator1<BinaryOperationHints::Hint>(
|
| - IrOpcode::kSpeculativeNumberAdd, Operator::kPure, "SpeculativeNumberAdd",
|
| - 2, 1, 1, 1, 1, 1, hint);
|
| -}
|
| -
|
| -const Operator* SimplifiedOperatorBuilder::SpeculativeNumberSubtract(
|
| - BinaryOperationHints::Hint hint) {
|
| - return new (zone()) Operator1<BinaryOperationHints::Hint>(
|
| - IrOpcode::kSpeculativeNumberSubtract, Operator::kPure,
|
| - "SpeculativeNumberSubtract", 2, 1, 1, 1, 1, 1, hint);
|
| -}
|
| +#define SPECULATIVE_BINOP_DEF(Name) \
|
| + const Operator* SimplifiedOperatorBuilder::Name( \
|
| + BinaryOperationHints::Hint hint) { \
|
| + return new (zone()) Operator1<BinaryOperationHints::Hint>( \
|
| + IrOpcode::k##Name, Operator::kPure, #Name, 2, 1, 1, 1, 1, 1, hint); \
|
| + }
|
| +SPECULATIVE_BINOP_LIST(SPECULATIVE_BINOP_DEF)
|
| +#undef SPECULATIVE_BINOP_DEF
|
|
|
| const Operator* SimplifiedOperatorBuilder::SpeculativeNumberEqual(
|
| CompareOperationHints::Hint hint) {
|
|
|