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