Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index cee25ed21cb7ff14611581c2b438edcd70f4d69f..be762f47aed28bd3b4117ffbac1e929098034c97 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -223,6 +223,13 @@ BinaryOperationHints::Hint BinaryOperationHintOf(const Operator* op) { |
return OpParameter<BinaryOperationHints::Hint>(op); |
} |
+CompareOperationHints::Hint CompareOperationHintOf(const Operator* op) { |
+ DCHECK(op->opcode() == IrOpcode::kSpeculativeNumberEqual || |
+ op->opcode() == IrOpcode::kSpeculativeNumberLessThan || |
+ op->opcode() == IrOpcode::kSpeculativeNumberLessThanOrEqual); |
+ return OpParameter<CompareOperationHints::Hint>(op); |
+} |
+ |
#define PURE_OP_LIST(V) \ |
V(BooleanNot, Operator::kNoProperties, 1) \ |
V(BooleanToNumber, Operator::kNoProperties, 1) \ |
@@ -497,6 +504,27 @@ const Operator* SimplifiedOperatorBuilder::SpeculativeNumberSubtract( |
"SpeculativeNumberSubtract", 2, 1, 1, 1, 1, 1, hint); |
} |
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberEqual( |
+ CompareOperationHints::Hint hint) { |
+ return new (zone()) Operator1<CompareOperationHints::Hint>( |
+ IrOpcode::kSpeculativeNumberEqual, Operator::kPure, |
+ "SpeculativeNumberEqual", 2, 1, 1, 1, 1, 1, hint); |
+} |
+ |
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberLessThan( |
+ CompareOperationHints::Hint hint) { |
+ return new (zone()) Operator1<CompareOperationHints::Hint>( |
+ IrOpcode::kSpeculativeNumberLessThan, Operator::kPure, |
+ "SpeculativeNumberLessThan", 2, 1, 1, 1, 1, 1, hint); |
+} |
+ |
+const Operator* SimplifiedOperatorBuilder::SpeculativeNumberLessThanOrEqual( |
+ CompareOperationHints::Hint hint) { |
+ return new (zone()) Operator1<CompareOperationHints::Hint>( |
+ IrOpcode::kSpeculativeNumberLessThanOrEqual, Operator::kPure, |
+ "SpeculativeNumberLessThanOrEqual", 2, 1, 1, 1, 1, 1, hint); |
+} |
+ |
#define ACCESS_OP_LIST(V) \ |
V(LoadField, FieldAccess, Operator::kNoWrite, 1, 1, 1) \ |
V(StoreField, FieldAccess, Operator::kNoRead, 2, 1, 0) \ |