17 switch (base_taggedness) {
19 return os <<
"untagged base";
21 return os <<
"tagged base";
51 op->
opcode() == IrOpcode::kStoreField);
52 return OpParameter<FieldAccess>(op);
59 op->
opcode() == IrOpcode::kStoreElement);
60 return OpParameter<ElementAccess>(op);
98 #define PURE_OP_LIST(V) \
99 V(BooleanNot, Operator::kNoProperties, 1) \
100 V(BooleanToNumber, Operator::kNoProperties, 1) \
101 V(NumberEqual, Operator::kCommutative, 2) \
102 V(NumberLessThan, Operator::kNoProperties, 2) \
103 V(NumberLessThanOrEqual, Operator::kNoProperties, 2) \
104 V(NumberAdd, Operator::kCommutative, 2) \
105 V(NumberSubtract, Operator::kNoProperties, 2) \
106 V(NumberMultiply, Operator::kCommutative, 2) \
107 V(NumberDivide, Operator::kNoProperties, 2) \
108 V(NumberModulus, Operator::kNoProperties, 2) \
109 V(NumberToInt32, Operator::kNoProperties, 1) \
110 V(NumberToUint32, Operator::kNoProperties, 1) \
111 V(StringEqual, Operator::kCommutative, 2) \
112 V(StringLessThan, Operator::kNoProperties, 2) \
113 V(StringLessThanOrEqual, Operator::kNoProperties, 2) \
114 V(StringAdd, Operator::kNoProperties, 2) \
115 V(ChangeTaggedToInt32, Operator::kNoProperties, 1) \
116 V(ChangeTaggedToUint32, Operator::kNoProperties, 1) \
117 V(ChangeTaggedToFloat64, Operator::kNoProperties, 1) \
118 V(ChangeInt32ToTagged, Operator::kNoProperties, 1) \
119 V(ChangeUint32ToTagged, Operator::kNoProperties, 1) \
120 V(ChangeFloat64ToTagged, Operator::kNoProperties, 1) \
121 V(ChangeBoolToBit, Operator::kNoProperties, 1) \
122 V(ChangeBitToBool, Operator::kNoProperties, 1)
125 #define ACCESS_OP_LIST(V) \
126 V(LoadField, FieldAccess, Operator::kNoWrite, 1, 1) \
127 V(StoreField, FieldAccess, Operator::kNoRead, 2, 0) \
128 V(LoadElement, ElementAccess, Operator::kNoWrite, 3, 1) \
129 V(StoreElement, ElementAccess, Operator::kNoRead, 4, 0)
132 struct SimplifiedOperatorBuilderImpl
FINAL {
133 #define PURE(Name, properties, input_count) \
134 struct Name##Operator FINAL : public SimpleOperator { \
136 : SimpleOperator(IrOpcode::k##Name, Operator::kPure | properties, \
137 input_count, 1, #Name) {} \
139 Name##Operator k##Name;
149 SimplifiedOperatorBuilder::SimplifiedOperatorBuilder(
Zone* zone)
150 : impl_(
kImpl.Get()), zone_(zone) {}
153 #define PURE(Name, properties, input_count) \
154 const Operator* SimplifiedOperatorBuilder::Name() { return &impl_.k##Name; }
159 const Operator* SimplifiedOperatorBuilder::ReferenceEqual(
Type* type) {
161 return new (zone()) SimpleOperator(IrOpcode::kReferenceEqual,
162 Operator::kCommutative | Operator::kPure,
163 2, 1,
"ReferenceEqual");
167 #define ACCESS(Name, Type, properties, input_count, output_count) \
168 const Operator* SimplifiedOperatorBuilder::Name(const Type& access) { \
169 return new (zone()) \
170 Operator1<Type>(IrOpcode::k##Name, Operator::kNoThrow | properties, \
171 input_count, output_count, #Name, access); \
void PrintTo(OStream &os, PrintDimension dim=BOTH_DIMS)
#define LAZY_INSTANCE_INITIALIZER
#define DCHECK_NOT_NULL(p)
#define DCHECK(condition)
bool operator==(const StoreRepresentation &rep1, const StoreRepresentation &rep2)
const ElementAccess & ElementAccessOf(const Operator *op)
std::ostream & operator<<(std::ostream &os, const MachineType &type)
static base::LazyInstance< CommonOperatorBuilderImpl >::type kImpl
bool operator!=(const StoreRepresentation &rep1, const StoreRepresentation &rep2)
const FieldAccess & FieldAccessOf(const Operator *op)
TypeImpl< ZoneTypeConfig > Type
Debugger support for the V8 JavaScript engine.
#define ACCESS_OP_LIST(V)
#define PURE(Name, properties, input_count)
#define ACCESS(Name, Type, properties, input_count, output_count)
BaseTaggedness base_is_tagged
BaseTaggedness base_is_tagged
static bool Equals(const ElementAccess &lhs, const ElementAccess &rhs)
static int HashCode(const ElementAccess &access)
static OStream & PrintTo(OStream &os, const ElementAccess &access)
static OStream & PrintTo(OStream &os, const FieldAccess &val)
static int HashCode(const FieldAccess &val)
static bool Equals(const FieldAccess &lhs, const FieldAccess &rhs)