| Index: src/compiler/simplified-operator.cc
|
| diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
|
| index fc8415ff54778ffc268d3d1ab847b2d002b33eb5..96e94bf7297d9210220490109bd20e2cbeff43f9 100644
|
| --- a/src/compiler/simplified-operator.cc
|
| +++ b/src/compiler/simplified-operator.cc
|
| @@ -147,46 +147,46 @@ const ElementAccess& ElementAccessOf(const Operator* op) {
|
| V(StoreElement, ElementAccess, Operator::kNoRead, 4, 0)
|
|
|
|
|
| -struct SimplifiedOperatorBuilderImpl FINAL {
|
| -#define PURE(Name, properties, input_count) \
|
| - struct Name##Operator FINAL : public SimpleOperator { \
|
| - Name##Operator() \
|
| - : SimpleOperator(IrOpcode::k##Name, Operator::kPure | properties, \
|
| - input_count, 1, #Name) {} \
|
| - }; \
|
| +struct SimplifiedOperatorGlobalCache FINAL {
|
| +#define PURE(Name, properties, input_count) \
|
| + struct Name##Operator FINAL : public Operator { \
|
| + Name##Operator() \
|
| + : Operator(IrOpcode::k##Name, Operator::kPure | properties, #Name, \
|
| + input_count, 0, 0, 1, 0, 0) {} \
|
| + }; \
|
| Name##Operator k##Name;
|
| PURE_OP_LIST(PURE)
|
| #undef PURE
|
| };
|
|
|
|
|
| -static base::LazyInstance<SimplifiedOperatorBuilderImpl>::type kImpl =
|
| +static base::LazyInstance<SimplifiedOperatorGlobalCache>::type kCache =
|
| LAZY_INSTANCE_INITIALIZER;
|
|
|
|
|
| SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone)
|
| - : impl_(kImpl.Get()), zone_(zone) {}
|
| + : cache_(kCache.Get()), zone_(zone) {}
|
|
|
|
|
| #define PURE(Name, properties, input_count) \
|
| - const Operator* SimplifiedOperatorBuilder::Name() { return &impl_.k##Name; }
|
| + const Operator* SimplifiedOperatorBuilder::Name() { return &cache_.k##Name; }
|
| PURE_OP_LIST(PURE)
|
| #undef PURE
|
|
|
|
|
| const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
|
| // TODO(titzer): What about the type parameter?
|
| - return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual,
|
| - Operator::kCommutative | Operator::kPure,
|
| - 2, 1, "ReferenceEqual");
|
| + return new (zone()) Operator(IrOpcode::kReferenceEqual,
|
| + Operator::kCommutative | Operator::kPure,
|
| + "ReferenceEqual", 2, 0, 0, 1, 0, 0);
|
| }
|
|
|
|
|
| -#define ACCESS(Name, Type, properties, input_count, output_count) \
|
| - const Operator* SimplifiedOperatorBuilder::Name(const Type& access) { \
|
| - return new (zone()) \
|
| - Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
|
| - input_count, output_count, #Name, access); \
|
| +#define ACCESS(Name, Type, properties, input_count, output_count) \
|
| + const Operator* SimplifiedOperatorBuilder::Name(const Type& access) { \
|
| + return new (zone()) \
|
| + Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
|
| + #Name, input_count, 1, 1, output_count, 1, 0, access); \
|
| }
|
| ACCESS_OP_LIST(ACCESS)
|
| #undef ACCESS
|
|
|