Index: src/compiler/simplified-operator.cc |
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc |
index c7abe9c96ecd3a5d890b7e5999728f7e41cd2c76..a5dcbba78c76f7b26a35535fc26bbbc4354a2615 100644 |
--- a/src/compiler/simplified-operator.cc |
+++ b/src/compiler/simplified-operator.cc |
@@ -186,7 +186,6 @@ const ElementAccess& ElementAccessOf(const Operator* op) { |
V(ChangeFloat64ToTagged, Operator::kNoProperties, 1) \ |
V(ChangeBoolToBit, Operator::kNoProperties, 1) \ |
V(ChangeBitToBool, Operator::kNoProperties, 1) \ |
- V(ObjectIsNumber, Operator::kNoProperties, 1) \ |
V(ObjectIsReceiver, Operator::kNoProperties, 1) \ |
V(ObjectIsSmi, Operator::kNoProperties, 1) |
@@ -195,6 +194,8 @@ const ElementAccess& ElementAccessOf(const Operator* op) { |
V(StringLessThan, Operator::kNoThrow, 2) \ |
V(StringLessThanOrEqual, Operator::kNoThrow, 2) |
+#define STATEFUL_OP_LIST(V) V(ObjectIsNumber) |
+ |
struct SimplifiedOperatorGlobalCache final { |
#define PURE(Name, properties, input_count) \ |
struct Name##Operator final : public Operator { \ |
@@ -206,6 +207,16 @@ struct SimplifiedOperatorGlobalCache final { |
PURE_OP_LIST(PURE) |
#undef PURE |
+#define STATEFUL(Name) \ |
+ struct Name##Operator final : public Operator { \ |
+ Name##Operator() \ |
+ : Operator(IrOpcode::k##Name, Operator::kNoProperties, #Name, 1, 1, 1, \ |
+ 1, 1, 1) {} \ |
+ }; \ |
+ Name##Operator k##Name; |
+ STATEFUL_OP_LIST(STATEFUL) |
+#undef STATEFUL |
+ |
#define NO_THROW(Name, properties, input_count) \ |
struct Name##Operator final : public Operator { \ |
Name##Operator() \ |
@@ -252,6 +263,10 @@ PURE_OP_LIST(GET_FROM_CACHE) |
NO_THROW_OP_LIST(GET_FROM_CACHE) |
#undef GET_FROM_CACHE |
+#define GET_FROM_CACHE(Name) \ |
+ const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; } |
+STATEFUL_OP_LIST(GET_FROM_CACHE) |
+#undef GET_FROM_CACHE |
const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) { |
return new (zone()) Operator(IrOpcode::kReferenceEqual, |