5 #ifndef V8_COMPILER_GRAPH_UNITTEST_H_
6 #define V8_COMPILER_GRAPH_UNITTEST_H_
12 #include "testing/gmock/include/gmock/gmock.h"
24 using ::testing::Matcher;
55 Matcher<Node*>
IsBranch(
const Matcher<Node*>& value_matcher,
56 const Matcher<Node*>& control_matcher);
57 Matcher<Node*>
IsMerge(
const Matcher<Node*>& control0_matcher,
58 const Matcher<Node*>& control1_matcher);
59 Matcher<Node*>
IsIfTrue(
const Matcher<Node*>& control_matcher);
60 Matcher<Node*>
IsIfFalse(
const Matcher<Node*>& control_matcher);
62 Matcher<Node*>
IsValueEffect(
const Matcher<Node*>& value_matcher);
63 Matcher<Node*>
IsFinish(
const Matcher<Node*>& value_matcher,
64 const Matcher<Node*>& effect_matcher);
66 const Matcher<ExternalReference>& value_matcher);
74 Matcher<Node*>
IsPhi(
const Matcher<MachineType>& type_matcher,
75 const Matcher<Node*>& value0_matcher,
76 const Matcher<Node*>& value1_matcher,
77 const Matcher<Node*>& merge_matcher);
78 Matcher<Node*>
IsProjection(
const Matcher<size_t>& index_matcher,
79 const Matcher<Node*>& base_matcher);
80 Matcher<Node*>
IsCall(
const Matcher<CallDescriptor*>& descriptor_matcher,
81 const Matcher<Node*>& value0_matcher,
82 const Matcher<Node*>& value1_matcher,
83 const Matcher<Node*>& value2_matcher,
84 const Matcher<Node*>& value3_matcher,
85 const Matcher<Node*>& effect_matcher,
86 const Matcher<Node*>& control_matcher);
89 const Matcher<Node*>& rhs_matcher);
91 const Matcher<Node*>& rhs_matcher);
93 Matcher<Node*>
IsLoad(
const Matcher<LoadRepresentation>& rep_matcher,
94 const Matcher<Node*>& base_matcher,
95 const Matcher<Node*>& index_matcher,
96 const Matcher<Node*>& effect_matcher);
97 Matcher<Node*>
IsStore(
const Matcher<MachineType>& type_matcher,
98 const Matcher<WriteBarrierKind>& write_barrier_matcher,
99 const Matcher<Node*>& base_matcher,
100 const Matcher<Node*>& index_matcher,
101 const Matcher<Node*>& value_matcher,
102 const Matcher<Node*>& effect_matcher,
103 const Matcher<Node*>& control_matcher);
105 const Matcher<Node*>& rhs_matcher);
107 const Matcher<Node*>& rhs_matcher);
109 const Matcher<Node*>& rhs_matcher);
111 const Matcher<Node*>& rhs_matcher);
113 const Matcher<Node*>& rhs_matcher);
115 const Matcher<Node*>& rhs_matcher);
117 const Matcher<Node*>& rhs_matcher);
119 const Matcher<Node*>& rhs_matcher);
121 const Matcher<Node*>& rhs_matcher);
123 const Matcher<Node*>& rhs_matcher);
125 const Matcher<Node*>& rhs_matcher);
127 const Matcher<Node*>& rhs_matcher);
Node * Int64Constant(int64_t value)
Node * Parameter(int32_t index)
CommonOperatorBuilder * common()
Matcher< Node * > IsTrueConstant()
Node * Float32Constant(volatile float value)
GraphTest(int parameters=1)
CommonOperatorBuilder common_
Node * HeapConstant(const Unique< HeapObject > &value)
Node * NumberConstant(volatile double value)
Node * Float64Constant(volatile double value)
Node * Int32Constant(int32_t value)
Matcher< Node * > IsFalseConstant()
Matcher< Node * > IsChangeInt32ToInt64(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsFloat64Constant(const Matcher< double > &value_matcher)
Matcher< Node * > IsChangeUint32ToFloat64(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsWord32Equal(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsMerge(const Matcher< Node * > &control0_matcher, const Matcher< Node * > &control1_matcher)
Matcher< Node * > IsTruncateFloat64ToFloat32(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsInt64Constant(const Matcher< int64_t > &value_matcher)
Matcher< Node * > IsFloat64Sqrt(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsUint32LessThanOrEqual(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsTruncateFloat64ToInt32(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsIfFalse(const Matcher< Node * > &control_matcher)
Matcher< Node * > IsBranch(const Matcher< Node * > &value_matcher, const Matcher< Node * > &control_matcher)
Matcher< Node * > IsNumberLessThan(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsFloat32Constant(const Matcher< float > &value_matcher)
Matcher< Node * > IsTruncateInt64ToInt32(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsNumberConstant(const Matcher< double > &value_matcher)
Matcher< Node * > IsInt32Mul(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsIfTrue(const Matcher< Node * > &control_matcher)
Matcher< Node * > IsControlEffect(const Matcher< Node * > &control_matcher)
Matcher< Node * > IsFinish(const Matcher< Node * > &value_matcher, const Matcher< Node * > &effect_matcher)
Matcher< Node * > IsWord32Ror(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord32Shl(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsChangeUint32ToUint64(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsChangeInt32ToFloat64(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsInt32Constant(const Matcher< int32_t > &value_matcher)
Matcher< Node * > IsNumberSubtract(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord32And(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsCall(const Matcher< CallDescriptor * > &descriptor_matcher, const Matcher< Node * > &value0_matcher, const Matcher< Node * > &value1_matcher, const Matcher< Node * > &value2_matcher, const Matcher< Node * > &value3_matcher, const Matcher< Node * > &effect_matcher, const Matcher< Node * > &control_matcher)
Matcher< Node * > IsWord64Sar(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsExternalConstant(const Matcher< ExternalReference > &value_matcher)
Matcher< Node * > IsPhi(const Matcher< MachineType > &type_matcher, const Matcher< Node * > &value0_matcher, const Matcher< Node * > &value1_matcher, const Matcher< Node * > &merge_matcher)
Matcher< Node * > IsStore(const Matcher< MachineType > &type_matcher, const Matcher< WriteBarrierKind > &write_barrier_matcher, const Matcher< Node * > &base_matcher, const Matcher< Node * > &index_matcher, const Matcher< Node * > &value_matcher, const Matcher< Node * > &effect_matcher, const Matcher< Node * > &control_matcher)
Matcher< Node * > IsValueEffect(const Matcher< Node * > &value_matcher)
Matcher< Node * > IsLoad(const Matcher< LoadRepresentation > &rep_matcher, const Matcher< Node * > &base_matcher, const Matcher< Node * > &index_matcher, const Matcher< Node * > &effect_matcher)
Matcher< Node * > IsProjection(const Matcher< size_t > &index_matcher, const Matcher< Node * > &base_matcher)
Matcher< Node * > IsChangeFloat64ToUint32(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsHeapConstant(const Matcher< Unique< HeapObject > > &value_matcher)
Matcher< Node * > IsChangeFloat64ToInt32(const Matcher< Node * > &input_matcher)
Matcher< Node * > IsWord64Shl(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord64Equal(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsInt32AddWithOverflow(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord64And(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Matcher< Node * > IsWord32Sar(const Matcher< Node * > &lhs_matcher, const Matcher< Node * > &rhs_matcher)
Debugger support for the V8 JavaScript engine.