Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 1 | // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
| 6 | #define V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |
| 7 | |
| 8 | #include "src/compiler/machine-operator.h" |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 9 | #include "src/machine-type.h" |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 10 | #include "testing/gmock/include/gmock/gmock.h" |
| 11 | |
| 12 | namespace v8 { |
| 13 | namespace internal { |
| 14 | |
| 15 | // Forward declarations. |
| 16 | class ExternalReference; |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 17 | template <typename T> |
| 18 | class Handle; |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 19 | class HeapObject; |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 20 | template <class> |
| 21 | class TypeImpl; |
| 22 | enum TypeofMode : int; |
| 23 | struct ZoneTypeConfig; |
| 24 | typedef TypeImpl<ZoneTypeConfig> Type; |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 25 | |
| 26 | namespace compiler { |
| 27 | |
| 28 | // Forward declarations. |
| 29 | class BufferAccess; |
| 30 | class CallDescriptor; |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 31 | class ContextAccess; |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 32 | struct ElementAccess; |
| 33 | struct FieldAccess; |
| 34 | class Node; |
| 35 | |
| 36 | |
| 37 | using ::testing::Matcher; |
| 38 | |
| 39 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 40 | Matcher<Node*> IsDead(); |
| 41 | Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher); |
| 42 | Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher, |
| 43 | const Matcher<Node*>& control1_matcher); |
| 44 | Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher, |
| 45 | const Matcher<Node*>& control1_matcher, |
| 46 | const Matcher<Node*>& control2_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 47 | Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher, |
| 48 | const Matcher<Node*>& control_matcher); |
| 49 | Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher, |
| 50 | const Matcher<Node*>& control1_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 51 | Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher, |
| 52 | const Matcher<Node*>& control1_matcher, |
| 53 | const Matcher<Node*>& control2_matcher); |
| 54 | Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher, |
| 55 | const Matcher<Node*>& control1_matcher); |
| 56 | Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher, |
| 57 | const Matcher<Node*>& control1_matcher, |
| 58 | const Matcher<Node*>& control2_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 59 | Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher); |
| 60 | Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 61 | Matcher<Node*> IsIfSuccess(const Matcher<Node*>& control_matcher); |
| 62 | Matcher<Node*> IsSwitch(const Matcher<Node*>& value_matcher, |
| 63 | const Matcher<Node*>& control_matcher); |
| 64 | Matcher<Node*> IsIfValue(const Matcher<int32_t>& value_matcher, |
| 65 | const Matcher<Node*>& control_matcher); |
| 66 | Matcher<Node*> IsIfDefault(const Matcher<Node*>& control_matcher); |
| 67 | Matcher<Node*> IsBeginRegion(const Matcher<Node*>& effect_matcher); |
| 68 | Matcher<Node*> IsFinishRegion(const Matcher<Node*>& value_matcher, |
| 69 | const Matcher<Node*>& effect_matcher); |
| 70 | Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher, |
| 71 | const Matcher<Node*>& effect_matcher, |
| 72 | const Matcher<Node*>& control_matcher); |
| 73 | Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher, |
| 74 | const Matcher<Node*>& control_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 75 | Matcher<Node*> IsExternalConstant( |
| 76 | const Matcher<ExternalReference>& value_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 77 | Matcher<Node*> IsHeapConstant(Handle<HeapObject> value); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 78 | Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher); |
| 79 | Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher); |
| 80 | Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher); |
| 81 | Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher); |
| 82 | Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 83 | Matcher<Node*> IsSelect(const Matcher<MachineRepresentation>& type_matcher, |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 84 | const Matcher<Node*>& value0_matcher, |
| 85 | const Matcher<Node*>& value1_matcher, |
| 86 | const Matcher<Node*>& value2_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 87 | Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher, |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 88 | const Matcher<Node*>& value0_matcher, |
| 89 | const Matcher<Node*>& value1_matcher, |
| 90 | const Matcher<Node*>& merge_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 91 | Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher, |
| 92 | const Matcher<Node*>& value0_matcher, |
| 93 | const Matcher<Node*>& value1_matcher, |
| 94 | const Matcher<Node*>& value2_matcher, |
| 95 | const Matcher<Node*>& merge_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 96 | Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher, |
| 97 | const Matcher<Node*>& effect1_matcher, |
| 98 | const Matcher<Node*>& merge_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 99 | Matcher<Node*> IsEffectSet(const Matcher<Node*>& effect0_matcher, |
| 100 | const Matcher<Node*>& effect1_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 101 | Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher, |
| 102 | const Matcher<Node*>& base_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 103 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
| 104 | const Matcher<Node*>& value0_matcher, |
| 105 | const Matcher<Node*>& effect_matcher, |
| 106 | const Matcher<Node*>& control_matcher); |
| 107 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 108 | const Matcher<Node*>& value0_matcher, |
| 109 | const Matcher<Node*>& value1_matcher, |
| 110 | const Matcher<Node*>& effect_matcher, |
| 111 | const Matcher<Node*>& control_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 112 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
| 113 | const Matcher<Node*>& value0_matcher, |
| 114 | const Matcher<Node*>& value1_matcher, |
| 115 | const Matcher<Node*>& value2_matcher, |
| 116 | const Matcher<Node*>& effect_matcher, |
| 117 | const Matcher<Node*>& control_matcher); |
| 118 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 119 | const Matcher<Node*>& value0_matcher, |
| 120 | const Matcher<Node*>& value1_matcher, |
| 121 | const Matcher<Node*>& value2_matcher, |
| 122 | const Matcher<Node*>& value3_matcher, |
| 123 | const Matcher<Node*>& effect_matcher, |
| 124 | const Matcher<Node*>& control_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 125 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
| 126 | const Matcher<Node*>& value0_matcher, |
| 127 | const Matcher<Node*>& value1_matcher, |
| 128 | const Matcher<Node*>& value2_matcher, |
| 129 | const Matcher<Node*>& value3_matcher, |
| 130 | const Matcher<Node*>& value4_matcher, |
| 131 | const Matcher<Node*>& effect_matcher, |
| 132 | const Matcher<Node*>& control_matcher); |
| 133 | Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher, |
| 134 | const Matcher<Node*>& value0_matcher, |
| 135 | const Matcher<Node*>& value1_matcher, |
| 136 | const Matcher<Node*>& value2_matcher, |
| 137 | const Matcher<Node*>& value3_matcher, |
| 138 | const Matcher<Node*>& value4_matcher, |
| 139 | const Matcher<Node*>& value5_matcher, |
| 140 | const Matcher<Node*>& effect_matcher, |
| 141 | const Matcher<Node*>& control_matcher); |
| 142 | Matcher<Node*> IsCall( |
| 143 | const Matcher<const CallDescriptor*>& descriptor_matcher, |
| 144 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 145 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 146 | const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher, |
| 147 | const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher, |
| 148 | const Matcher<Node*>& control_matcher); |
| 149 | Matcher<Node*> IsTailCall( |
| 150 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 151 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 152 | const Matcher<Node*>& effect_matcher, |
| 153 | const Matcher<Node*>& control_matcher); |
| 154 | Matcher<Node*> IsTailCall( |
| 155 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 156 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 157 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& effect_matcher, |
| 158 | const Matcher<Node*>& control_matcher); |
| 159 | Matcher<Node*> IsTailCall( |
| 160 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 161 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 162 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 163 | const Matcher<Node*>& effect_matcher, |
| 164 | const Matcher<Node*>& control_matcher); |
| 165 | Matcher<Node*> IsTailCall( |
| 166 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 167 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 168 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 169 | const Matcher<Node*>& value4_matcher, const Matcher<Node*>& effect_matcher, |
| 170 | const Matcher<Node*>& control_matcher); |
| 171 | Matcher<Node*> IsTailCall( |
| 172 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 173 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 174 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 175 | const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher, |
| 176 | const Matcher<Node*>& effect_matcher, |
| 177 | const Matcher<Node*>& control_matcher); |
| 178 | Matcher<Node*> IsTailCall( |
| 179 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 180 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 181 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 182 | const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher, |
| 183 | const Matcher<Node*>& value6_matcher, const Matcher<Node*>& effect_matcher, |
| 184 | const Matcher<Node*>& control_matcher); |
| 185 | Matcher<Node*> IsTailCall( |
| 186 | const Matcher<CallDescriptor const*>& descriptor_matcher, |
| 187 | const Matcher<Node*>& value0_matcher, const Matcher<Node*>& value1_matcher, |
| 188 | const Matcher<Node*>& value2_matcher, const Matcher<Node*>& value3_matcher, |
| 189 | const Matcher<Node*>& value4_matcher, const Matcher<Node*>& value5_matcher, |
| 190 | const Matcher<Node*>& value6_matcher, const Matcher<Node*>& value7_matcher, |
| 191 | const Matcher<Node*>& effect_matcher, |
| 192 | const Matcher<Node*>& control_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 193 | |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 194 | |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 195 | Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 196 | Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher, |
| 197 | const Matcher<Node*>& lhs_matcher, |
| 198 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 199 | Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher, |
| 200 | const Matcher<Node*>& rhs_matcher); |
| 201 | Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher, |
| 202 | const Matcher<Node*>& rhs_matcher); |
| 203 | Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher, |
| 204 | const Matcher<Node*>& rhs_matcher); |
| 205 | Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher, |
| 206 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 207 | Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher, |
| 208 | const Matcher<Node*>& rhs_matcher); |
| 209 | Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher, |
| 210 | const Matcher<Node*>& rhs_matcher); |
| 211 | Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher, |
| 212 | const Matcher<Node*>& rhs_matcher); |
| 213 | Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher, |
| 214 | const Matcher<Node*>& effect_matcher, |
| 215 | const Matcher<Node*>& control_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 216 | Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher, |
| 217 | const Matcher<Node*>& base_matcher, |
| 218 | const Matcher<Node*>& effect_matcher, |
| 219 | const Matcher<Node*>& control_matcher); |
| 220 | Matcher<Node*> IsStoreField(const Matcher<FieldAccess>& access_matcher, |
| 221 | const Matcher<Node*>& base_matcher, |
| 222 | const Matcher<Node*>& value_matcher, |
| 223 | const Matcher<Node*>& effect_matcher, |
| 224 | const Matcher<Node*>& control_matcher); |
| 225 | Matcher<Node*> IsLoadBuffer(const Matcher<BufferAccess>& access_matcher, |
| 226 | const Matcher<Node*>& buffer_matcher, |
| 227 | const Matcher<Node*>& offset_matcher, |
| 228 | const Matcher<Node*>& length_matcher, |
| 229 | const Matcher<Node*>& effect_matcher, |
| 230 | const Matcher<Node*>& control_matcher); |
| 231 | Matcher<Node*> IsStoreBuffer(const Matcher<BufferAccess>& access_matcher, |
| 232 | const Matcher<Node*>& buffer_matcher, |
| 233 | const Matcher<Node*>& offset_matcher, |
| 234 | const Matcher<Node*>& length_matcher, |
| 235 | const Matcher<Node*>& value_matcher, |
| 236 | const Matcher<Node*>& effect_matcher, |
| 237 | const Matcher<Node*>& control_matcher); |
| 238 | Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher, |
| 239 | const Matcher<Node*>& base_matcher, |
| 240 | const Matcher<Node*>& index_matcher, |
| 241 | const Matcher<Node*>& control_matcher, |
| 242 | const Matcher<Node*>& effect_matcher); |
| 243 | Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher, |
| 244 | const Matcher<Node*>& base_matcher, |
| 245 | const Matcher<Node*>& index_matcher, |
| 246 | const Matcher<Node*>& value_matcher, |
| 247 | const Matcher<Node*>& effect_matcher, |
| 248 | const Matcher<Node*>& control_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 249 | Matcher<Node*> IsObjectIsSmi(const Matcher<Node*>& value_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 250 | |
| 251 | Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher, |
| 252 | const Matcher<Node*>& base_matcher, |
| 253 | const Matcher<Node*>& index_matcher, |
| 254 | const Matcher<Node*>& effect_matcher, |
| 255 | const Matcher<Node*>& control_matcher); |
| 256 | Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher, |
| 257 | const Matcher<Node*>& base_matcher, |
| 258 | const Matcher<Node*>& index_matcher, |
| 259 | const Matcher<Node*>& value_matcher, |
| 260 | const Matcher<Node*>& effect_matcher, |
| 261 | const Matcher<Node*>& control_matcher); |
| 262 | Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher, |
| 263 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 264 | Matcher<Node*> IsWord32Or(const Matcher<Node*>& lhs_matcher, |
| 265 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 266 | Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher, |
| 267 | const Matcher<Node*>& rhs_matcher); |
| 268 | Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher, |
| 269 | const Matcher<Node*>& rhs_matcher); |
| 270 | Matcher<Node*> IsWord32Shr(const Matcher<Node*>& lhs_matcher, |
| 271 | const Matcher<Node*>& rhs_matcher); |
| 272 | Matcher<Node*> IsWord32Ror(const Matcher<Node*>& lhs_matcher, |
| 273 | const Matcher<Node*>& rhs_matcher); |
| 274 | Matcher<Node*> IsWord32Equal(const Matcher<Node*>& lhs_matcher, |
| 275 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 276 | Matcher<Node*> IsWord32Clz(const Matcher<Node*>& value_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 277 | Matcher<Node*> IsWord64And(const Matcher<Node*>& lhs_matcher, |
| 278 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 279 | Matcher<Node*> IsWord64Or(const Matcher<Node*>& lhs_matcher, |
| 280 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 281 | Matcher<Node*> IsWord64Shl(const Matcher<Node*>& lhs_matcher, |
| 282 | const Matcher<Node*>& rhs_matcher); |
| 283 | Matcher<Node*> IsWord64Sar(const Matcher<Node*>& lhs_matcher, |
| 284 | const Matcher<Node*>& rhs_matcher); |
| 285 | Matcher<Node*> IsWord64Equal(const Matcher<Node*>& lhs_matcher, |
| 286 | const Matcher<Node*>& rhs_matcher); |
| 287 | Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher, |
| 288 | const Matcher<Node*>& rhs_matcher); |
| 289 | Matcher<Node*> IsInt32Add(const Matcher<Node*>& lhs_matcher, |
| 290 | const Matcher<Node*>& rhs_matcher); |
| 291 | Matcher<Node*> IsInt32Sub(const Matcher<Node*>& lhs_matcher, |
| 292 | const Matcher<Node*>& rhs_matcher); |
| 293 | Matcher<Node*> IsInt32Mul(const Matcher<Node*>& lhs_matcher, |
| 294 | const Matcher<Node*>& rhs_matcher); |
| 295 | Matcher<Node*> IsInt32MulHigh(const Matcher<Node*>& lhs_matcher, |
| 296 | const Matcher<Node*>& rhs_matcher); |
| 297 | Matcher<Node*> IsInt32LessThan(const Matcher<Node*>& lhs_matcher, |
| 298 | const Matcher<Node*>& rhs_matcher); |
| 299 | Matcher<Node*> IsUint32LessThan(const Matcher<Node*>& lhs_matcher, |
| 300 | const Matcher<Node*>& rhs_matcher); |
| 301 | Matcher<Node*> IsUint32LessThanOrEqual(const Matcher<Node*>& lhs_matcher, |
| 302 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 303 | Matcher<Node*> IsInt64Add(const Matcher<Node*>& lhs_matcher, |
| 304 | const Matcher<Node*>& rhs_matcher); |
| 305 | Matcher<Node*> IsInt64Sub(const Matcher<Node*>& lhs_matcher, |
| 306 | const Matcher<Node*>& rhs_matcher); |
| 307 | Matcher<Node*> IsJSAdd(const Matcher<Node*>& lhs_matcher, |
| 308 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 309 | Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher); |
| 310 | Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher); |
| 311 | Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher); |
| 312 | Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher); |
| 313 | Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher); |
| 314 | Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher); |
| 315 | Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher); |
| 316 | Matcher<Node*> IsTruncateFloat64ToInt32(const Matcher<Node*>& input_matcher); |
| 317 | Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 318 | Matcher<Node*> IsFloat32Max(const Matcher<Node*>& lhs_matcher, |
| 319 | const Matcher<Node*>& rhs_matcher); |
| 320 | Matcher<Node*> IsFloat32Min(const Matcher<Node*>& lhs_matcher, |
| 321 | const Matcher<Node*>& rhs_matcher); |
| 322 | Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher); |
| 323 | Matcher<Node*> IsFloat32Equal(const Matcher<Node*>& lhs_matcher, |
| 324 | const Matcher<Node*>& rhs_matcher); |
| 325 | Matcher<Node*> IsFloat32LessThan(const Matcher<Node*>& lhs_matcher, |
| 326 | const Matcher<Node*>& rhs_matcher); |
| 327 | Matcher<Node*> IsFloat32LessThanOrEqual(const Matcher<Node*>& lhs_matcher, |
| 328 | const Matcher<Node*>& rhs_matcher); |
| 329 | Matcher<Node*> IsFloat64Max(const Matcher<Node*>& lhs_matcher, |
| 330 | const Matcher<Node*>& rhs_matcher); |
| 331 | Matcher<Node*> IsFloat64Min(const Matcher<Node*>& lhs_matcher, |
| 332 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 333 | Matcher<Node*> IsFloat64Sub(const Matcher<Node*>& lhs_matcher, |
| 334 | const Matcher<Node*>& rhs_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 335 | Matcher<Node*> IsFloat64Abs(const Matcher<Node*>& input_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 336 | Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 337 | Matcher<Node*> IsFloat64RoundDown(const Matcher<Node*>& input_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 338 | Matcher<Node*> IsFloat64RoundTruncate(const Matcher<Node*>& input_matcher); |
| 339 | Matcher<Node*> IsFloat64RoundTiesAway(const Matcher<Node*>& input_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 340 | Matcher<Node*> IsFloat64ExtractLowWord32(const Matcher<Node*>& input_matcher); |
| 341 | Matcher<Node*> IsFloat64ExtractHighWord32(const Matcher<Node*>& input_matcher); |
| 342 | Matcher<Node*> IsFloat64InsertLowWord32(const Matcher<Node*>& lhs_matcher, |
| 343 | const Matcher<Node*>& rhs_matcher); |
| 344 | Matcher<Node*> IsFloat64InsertHighWord32(const Matcher<Node*>& lhs_matcher, |
| 345 | const Matcher<Node*>& rhs_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 346 | Matcher<Node*> IsToNumber(const Matcher<Node*>& base_matcher, |
| 347 | const Matcher<Node*>& context_matcher, |
| 348 | const Matcher<Node*>& effect_matcher, |
| 349 | const Matcher<Node*>& control_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 350 | Matcher<Node*> IsLoadContext(const Matcher<ContextAccess>& access_matcher, |
| 351 | const Matcher<Node*>& context_matcher); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 352 | Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher); |
| 353 | Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher); |
Ben Murdoch | 4a90d5f | 2016-03-22 12:00:34 +0000 | [diff] [blame^] | 354 | Matcher<Node*> IsParameter(const Matcher<int> index_matcher); |
| 355 | Matcher<Node*> IsLoadFramePointer(); |
Emily Bernier | d0a1eb7 | 2015-03-24 16:35:39 -0400 | [diff] [blame] | 356 | |
| 357 | } // namespace compiler |
| 358 | } // namespace internal |
| 359 | } // namespace v8 |
| 360 | |
| 361 | #endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_ |