[turbofan] Remove extra attributes from SimplifiedOperatorBuilder methods.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/560103003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23932 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
bmeurer@chromium.org 2014-09-15 09:09:45 +00:00
parent be33a79d21
commit 72bf3ad950
4 changed files with 38 additions and 40 deletions

View File

@ -129,7 +129,7 @@ MATCHER(IsNaN, std::string(negation ? "isn't" : "is") + " NaN") {
namespace { namespace {
struct UnaryOperator { struct UnaryOperator {
const Operator* (SimplifiedOperatorBuilder::*constructor)() const; const Operator* (SimplifiedOperatorBuilder::*constructor)();
const char* constructor_name; const char* constructor_name;
}; };

View File

@ -18,7 +18,7 @@ namespace compiler {
namespace { namespace {
struct PureOperator { struct PureOperator {
const Operator* (SimplifiedOperatorBuilder::*constructor)() const; const Operator* (SimplifiedOperatorBuilder::*constructor)();
IrOpcode::Value opcode; IrOpcode::Value opcode;
Operator::Properties properties; Operator::Properties properties;
int value_input_count; int value_input_count;

View File

@ -117,15 +117,13 @@ SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(Zone* zone)
: impl_(kImpl.Get()), zone_(zone) {} : impl_(kImpl.Get()), zone_(zone) {}
#define PURE(Name, properties, input_count) \ #define PURE(Name, properties, input_count) \
const Operator* SimplifiedOperatorBuilder::Name() const { \ const Operator* SimplifiedOperatorBuilder::Name() { return &impl_.k##Name; }
return &impl_.k##Name; \
}
PURE_OP_LIST(PURE) PURE_OP_LIST(PURE)
#undef PURE #undef PURE
const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) const { const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
// TODO(titzer): What about the type parameter? // TODO(titzer): What about the type parameter?
return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual, return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual,
Operator::kCommutative | Operator::kPure, Operator::kCommutative | Operator::kPure,
@ -133,11 +131,11 @@ const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) const {
} }
#define ACCESS(Name, Type, properties, input_count, output_count) \ #define ACCESS(Name, Type, properties, input_count, output_count) \
const Operator* SimplifiedOperatorBuilder::Name(const Type& access) const { \ const Operator* SimplifiedOperatorBuilder::Name(const Type& access) { \
return new (zone()) \ return new (zone()) \
Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \ Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
input_count, output_count, #Name, access); \ input_count, output_count, #Name, access); \
} }
ACCESS_OP_LIST(ACCESS) ACCESS_OP_LIST(ACCESS)
#undef ACCESS #undef ACCESS

View File

@ -90,39 +90,39 @@ class SimplifiedOperatorBuilder FINAL {
public: public:
explicit SimplifiedOperatorBuilder(Zone* zone); explicit SimplifiedOperatorBuilder(Zone* zone);
const Operator* BooleanNot() const WARN_UNUSED_RESULT; const Operator* BooleanNot();
const Operator* NumberEqual() const WARN_UNUSED_RESULT; const Operator* NumberEqual();
const Operator* NumberLessThan() const WARN_UNUSED_RESULT; const Operator* NumberLessThan();
const Operator* NumberLessThanOrEqual() const WARN_UNUSED_RESULT; const Operator* NumberLessThanOrEqual();
const Operator* NumberAdd() const WARN_UNUSED_RESULT; const Operator* NumberAdd();
const Operator* NumberSubtract() const WARN_UNUSED_RESULT; const Operator* NumberSubtract();
const Operator* NumberMultiply() const WARN_UNUSED_RESULT; const Operator* NumberMultiply();
const Operator* NumberDivide() const WARN_UNUSED_RESULT; const Operator* NumberDivide();
const Operator* NumberModulus() const WARN_UNUSED_RESULT; const Operator* NumberModulus();
const Operator* NumberToInt32() const WARN_UNUSED_RESULT; const Operator* NumberToInt32();
const Operator* NumberToUint32() const WARN_UNUSED_RESULT; const Operator* NumberToUint32();
const Operator* ReferenceEqual(Type* type) const WARN_UNUSED_RESULT; const Operator* ReferenceEqual(Type* type);
const Operator* StringEqual() const WARN_UNUSED_RESULT; const Operator* StringEqual();
const Operator* StringLessThan() const WARN_UNUSED_RESULT; const Operator* StringLessThan();
const Operator* StringLessThanOrEqual() const WARN_UNUSED_RESULT; const Operator* StringLessThanOrEqual();
const Operator* StringAdd() const WARN_UNUSED_RESULT; const Operator* StringAdd();
const Operator* ChangeTaggedToInt32() const WARN_UNUSED_RESULT; const Operator* ChangeTaggedToInt32();
const Operator* ChangeTaggedToUint32() const WARN_UNUSED_RESULT; const Operator* ChangeTaggedToUint32();
const Operator* ChangeTaggedToFloat64() const WARN_UNUSED_RESULT; const Operator* ChangeTaggedToFloat64();
const Operator* ChangeInt32ToTagged() const WARN_UNUSED_RESULT; const Operator* ChangeInt32ToTagged();
const Operator* ChangeUint32ToTagged() const WARN_UNUSED_RESULT; const Operator* ChangeUint32ToTagged();
const Operator* ChangeFloat64ToTagged() const WARN_UNUSED_RESULT; const Operator* ChangeFloat64ToTagged();
const Operator* ChangeBoolToBit() const WARN_UNUSED_RESULT; const Operator* ChangeBoolToBit();
const Operator* ChangeBitToBool() const WARN_UNUSED_RESULT; const Operator* ChangeBitToBool();
const Operator* LoadField(const FieldAccess&) const WARN_UNUSED_RESULT; const Operator* LoadField(const FieldAccess&);
const Operator* StoreField(const FieldAccess&) const WARN_UNUSED_RESULT; const Operator* StoreField(const FieldAccess&);
const Operator* LoadElement(const ElementAccess&) const WARN_UNUSED_RESULT; const Operator* LoadElement(const ElementAccess&);
const Operator* StoreElement(const ElementAccess&) const WARN_UNUSED_RESULT; const Operator* StoreElement(const ElementAccess&);
private: private:
Zone* zone() const { return zone_; } Zone* zone() const { return zone_; }