blob: 60a0895f0d047bc5eb053106ab1a2c3382d89d3e [file] [log] [blame]
Emily Bernierd0a1eb72015-03-24 16:35:39 -04001// 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 Murdoch61f157c2016-09-16 13:49:30 +01009#include "src/compiler/type-hints.h"
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000010#include "src/machine-type.h"
Emily Bernierd0a1eb72015-03-24 16:35:39 -040011#include "testing/gmock/include/gmock/gmock.h"
12
13namespace v8 {
14namespace internal {
15
16// Forward declarations.
17class ExternalReference;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000018template <typename T>
19class Handle;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040020class HeapObject;
Ben Murdoch097c5b22016-05-18 11:27:45 +010021class Type;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000022enum TypeofMode : int;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040023
24namespace compiler {
25
26// Forward declarations.
27class BufferAccess;
28class CallDescriptor;
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000029class ContextAccess;
Emily Bernierd0a1eb72015-03-24 16:35:39 -040030struct ElementAccess;
31struct FieldAccess;
32class Node;
33
34
35using ::testing::Matcher;
36
37
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000038Matcher<Node*> IsDead();
39Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher);
40Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
41 const Matcher<Node*>& control1_matcher);
42Matcher<Node*> IsEnd(const Matcher<Node*>& control0_matcher,
43 const Matcher<Node*>& control1_matcher,
44 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040045Matcher<Node*> IsBranch(const Matcher<Node*>& value_matcher,
46 const Matcher<Node*>& control_matcher);
47Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
48 const Matcher<Node*>& control1_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000049Matcher<Node*> IsMerge(const Matcher<Node*>& control0_matcher,
50 const Matcher<Node*>& control1_matcher,
51 const Matcher<Node*>& control2_matcher);
52Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
53 const Matcher<Node*>& control1_matcher);
54Matcher<Node*> IsLoop(const Matcher<Node*>& control0_matcher,
55 const Matcher<Node*>& control1_matcher,
56 const Matcher<Node*>& control2_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040057Matcher<Node*> IsIfTrue(const Matcher<Node*>& control_matcher);
58Matcher<Node*> IsIfFalse(const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000059Matcher<Node*> IsIfSuccess(const Matcher<Node*>& control_matcher);
60Matcher<Node*> IsSwitch(const Matcher<Node*>& value_matcher,
61 const Matcher<Node*>& control_matcher);
62Matcher<Node*> IsIfValue(const Matcher<int32_t>& value_matcher,
63 const Matcher<Node*>& control_matcher);
64Matcher<Node*> IsIfDefault(const Matcher<Node*>& control_matcher);
65Matcher<Node*> IsBeginRegion(const Matcher<Node*>& effect_matcher);
66Matcher<Node*> IsFinishRegion(const Matcher<Node*>& value_matcher,
67 const Matcher<Node*>& effect_matcher);
68Matcher<Node*> IsReturn(const Matcher<Node*>& value_matcher,
69 const Matcher<Node*>& effect_matcher,
70 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +010071Matcher<Node*> IsReturn2(const Matcher<Node*>& value_matcher,
72 const Matcher<Node*>& value2_matcher,
73 const Matcher<Node*>& effect_matcher,
74 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000075Matcher<Node*> IsTerminate(const Matcher<Node*>& effect_matcher,
76 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040077Matcher<Node*> IsExternalConstant(
78 const Matcher<ExternalReference>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000079Matcher<Node*> IsHeapConstant(Handle<HeapObject> value);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040080Matcher<Node*> IsFloat32Constant(const Matcher<float>& value_matcher);
81Matcher<Node*> IsFloat64Constant(const Matcher<double>& value_matcher);
82Matcher<Node*> IsInt32Constant(const Matcher<int32_t>& value_matcher);
83Matcher<Node*> IsInt64Constant(const Matcher<int64_t>& value_matcher);
84Matcher<Node*> IsNumberConstant(const Matcher<double>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000085Matcher<Node*> IsSelect(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040086 const Matcher<Node*>& value0_matcher,
87 const Matcher<Node*>& value1_matcher,
88 const Matcher<Node*>& value2_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000089Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -040090 const Matcher<Node*>& value0_matcher,
91 const Matcher<Node*>& value1_matcher,
92 const Matcher<Node*>& merge_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +000093Matcher<Node*> IsPhi(const Matcher<MachineRepresentation>& type_matcher,
94 const Matcher<Node*>& value0_matcher,
95 const Matcher<Node*>& value1_matcher,
96 const Matcher<Node*>& value2_matcher,
97 const Matcher<Node*>& merge_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -040098Matcher<Node*> IsEffectPhi(const Matcher<Node*>& effect0_matcher,
99 const Matcher<Node*>& effect1_matcher,
100 const Matcher<Node*>& merge_matcher);
101Matcher<Node*> IsProjection(const Matcher<size_t>& index_matcher,
102 const Matcher<Node*>& base_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000103Matcher<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);
107Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400108 const Matcher<Node*>& value0_matcher,
109 const Matcher<Node*>& value1_matcher,
110 const Matcher<Node*>& effect_matcher,
111 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000112Matcher<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);
118Matcher<Node*> IsCall(const Matcher<const CallDescriptor*>& descriptor_matcher,
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400119 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 Murdoch4a90d5f2016-03-22 12:00:34 +0000125Matcher<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);
133Matcher<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);
142Matcher<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);
149Matcher<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);
154Matcher<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);
159Matcher<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);
165Matcher<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);
171Matcher<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);
178Matcher<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);
185Matcher<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 Bernierd0a1eb72015-03-24 16:35:39 -0400193
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000194
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400195Matcher<Node*> IsBooleanNot(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000196Matcher<Node*> IsReferenceEqual(const Matcher<Type*>& type_matcher,
197 const Matcher<Node*>& lhs_matcher,
198 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400199Matcher<Node*> IsNumberEqual(const Matcher<Node*>& lhs_matcher,
200 const Matcher<Node*>& rhs_matcher);
201Matcher<Node*> IsNumberLessThan(const Matcher<Node*>& lhs_matcher,
202 const Matcher<Node*>& rhs_matcher);
Ben Murdoch61f157c2016-09-16 13:49:30 +0100203Matcher<Node*> IsNumberAdd(const Matcher<Node*>& lhs_matcher,
204 const Matcher<Node*>& rhs_matcher);
205Matcher<Node*> IsSpeculativeNumberAdd(
206 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
207 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
208 const Matcher<Node*>& effect_matcher,
209 const Matcher<Node*>& control_matcher);
210Matcher<Node*> IsSpeculativeNumberSubtract(
211 const Matcher<BinaryOperationHints::Hint>& hint_matcher,
212 const Matcher<Node*>& lhs_matcher, const Matcher<Node*>& rhs_matcher,
213 const Matcher<Node*>& effect_matcher,
214 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400215Matcher<Node*> IsNumberSubtract(const Matcher<Node*>& lhs_matcher,
216 const Matcher<Node*>& rhs_matcher);
217Matcher<Node*> IsNumberMultiply(const Matcher<Node*>& lhs_matcher,
218 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000219Matcher<Node*> IsNumberShiftLeft(const Matcher<Node*>& lhs_matcher,
220 const Matcher<Node*>& rhs_matcher);
221Matcher<Node*> IsNumberShiftRight(const Matcher<Node*>& lhs_matcher,
222 const Matcher<Node*>& rhs_matcher);
223Matcher<Node*> IsNumberShiftRightLogical(const Matcher<Node*>& lhs_matcher,
224 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100225Matcher<Node*> IsNumberImul(const Matcher<Node*>& lhs_matcher,
226 const Matcher<Node*>& rhs_matcher);
Ben Murdoch61f157c2016-09-16 13:49:30 +0100227Matcher<Node*> IsNumberAbs(const Matcher<Node*>& value_matcher);
228Matcher<Node*> IsNumberAtan(const Matcher<Node*>& value_matcher);
229Matcher<Node*> IsNumberAtan2(const Matcher<Node*>& lhs_matcher,
230 const Matcher<Node*>& rhs_matcher);
231Matcher<Node*> IsNumberAtanh(const Matcher<Node*>& value_matcher);
232Matcher<Node*> IsNumberCeil(const Matcher<Node*>& value_matcher);
233Matcher<Node*> IsNumberClz32(const Matcher<Node*>& value_matcher);
234Matcher<Node*> IsNumberCos(const Matcher<Node*>& value_matcher);
235Matcher<Node*> IsNumberExp(const Matcher<Node*>& value_matcher);
236Matcher<Node*> IsNumberExpm1(const Matcher<Node*>& value_matcher);
237Matcher<Node*> IsNumberFloor(const Matcher<Node*>& value_matcher);
238Matcher<Node*> IsNumberFround(const Matcher<Node*>& value_matcher);
239Matcher<Node*> IsNumberLog(const Matcher<Node*>& value_matcher);
240Matcher<Node*> IsNumberLog1p(const Matcher<Node*>& value_matcher);
241Matcher<Node*> IsNumberLog2(const Matcher<Node*>& value_matcher);
242Matcher<Node*> IsNumberLog10(const Matcher<Node*>& value_matcher);
243Matcher<Node*> IsNumberRound(const Matcher<Node*>& value_matcher);
244Matcher<Node*> IsNumberCbrt(const Matcher<Node*>& value_matcher);
245Matcher<Node*> IsNumberSin(const Matcher<Node*>& value_matcher);
246Matcher<Node*> IsNumberSqrt(const Matcher<Node*>& value_matcher);
247Matcher<Node*> IsNumberTan(const Matcher<Node*>& value_matcher);
248Matcher<Node*> IsNumberTrunc(const Matcher<Node*>& value_matcher);
249Matcher<Node*> IsStringFromCharCode(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000250Matcher<Node*> IsAllocate(const Matcher<Node*>& size_matcher,
251 const Matcher<Node*>& effect_matcher,
252 const Matcher<Node*>& control_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400253Matcher<Node*> IsLoadField(const Matcher<FieldAccess>& access_matcher,
254 const Matcher<Node*>& base_matcher,
255 const Matcher<Node*>& effect_matcher,
256 const Matcher<Node*>& control_matcher);
257Matcher<Node*> IsStoreField(const Matcher<FieldAccess>& access_matcher,
258 const Matcher<Node*>& base_matcher,
259 const Matcher<Node*>& value_matcher,
260 const Matcher<Node*>& effect_matcher,
261 const Matcher<Node*>& control_matcher);
262Matcher<Node*> IsLoadBuffer(const Matcher<BufferAccess>& access_matcher,
263 const Matcher<Node*>& buffer_matcher,
264 const Matcher<Node*>& offset_matcher,
265 const Matcher<Node*>& length_matcher,
266 const Matcher<Node*>& effect_matcher,
267 const Matcher<Node*>& control_matcher);
268Matcher<Node*> IsStoreBuffer(const Matcher<BufferAccess>& access_matcher,
269 const Matcher<Node*>& buffer_matcher,
270 const Matcher<Node*>& offset_matcher,
271 const Matcher<Node*>& length_matcher,
272 const Matcher<Node*>& value_matcher,
273 const Matcher<Node*>& effect_matcher,
274 const Matcher<Node*>& control_matcher);
275Matcher<Node*> IsLoadElement(const Matcher<ElementAccess>& access_matcher,
276 const Matcher<Node*>& base_matcher,
277 const Matcher<Node*>& index_matcher,
278 const Matcher<Node*>& control_matcher,
279 const Matcher<Node*>& effect_matcher);
280Matcher<Node*> IsStoreElement(const Matcher<ElementAccess>& access_matcher,
281 const Matcher<Node*>& base_matcher,
282 const Matcher<Node*>& index_matcher,
283 const Matcher<Node*>& value_matcher,
284 const Matcher<Node*>& effect_matcher,
285 const Matcher<Node*>& control_matcher);
Ben Murdoch097c5b22016-05-18 11:27:45 +0100286Matcher<Node*> IsObjectIsReceiver(const Matcher<Node*>& value_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000287Matcher<Node*> IsObjectIsSmi(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400288
289Matcher<Node*> IsLoad(const Matcher<LoadRepresentation>& rep_matcher,
290 const Matcher<Node*>& base_matcher,
291 const Matcher<Node*>& index_matcher,
292 const Matcher<Node*>& effect_matcher,
293 const Matcher<Node*>& control_matcher);
294Matcher<Node*> IsStore(const Matcher<StoreRepresentation>& rep_matcher,
295 const Matcher<Node*>& base_matcher,
296 const Matcher<Node*>& index_matcher,
297 const Matcher<Node*>& value_matcher,
298 const Matcher<Node*>& effect_matcher,
299 const Matcher<Node*>& control_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100300Matcher<Node*> IsStackSlot(const Matcher<MachineRepresentation>& rep_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400301Matcher<Node*> IsWord32And(const Matcher<Node*>& lhs_matcher,
302 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000303Matcher<Node*> IsWord32Or(const Matcher<Node*>& lhs_matcher,
304 const Matcher<Node*>& rhs_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100305Matcher<Node*> IsWord32Xor(const Matcher<Node*>& lhs_matcher,
306 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400307Matcher<Node*> IsWord32Sar(const Matcher<Node*>& lhs_matcher,
308 const Matcher<Node*>& rhs_matcher);
309Matcher<Node*> IsWord32Shl(const Matcher<Node*>& lhs_matcher,
310 const Matcher<Node*>& rhs_matcher);
311Matcher<Node*> IsWord32Shr(const Matcher<Node*>& lhs_matcher,
312 const Matcher<Node*>& rhs_matcher);
313Matcher<Node*> IsWord32Ror(const Matcher<Node*>& lhs_matcher,
314 const Matcher<Node*>& rhs_matcher);
315Matcher<Node*> IsWord32Equal(const Matcher<Node*>& lhs_matcher,
316 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000317Matcher<Node*> IsWord32Clz(const Matcher<Node*>& value_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100318Matcher<Node*> IsWord32Ctz(const Matcher<Node*>& value_matcher);
319Matcher<Node*> IsWord32Popcnt(const Matcher<Node*>& value_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400320Matcher<Node*> IsWord64And(const Matcher<Node*>& lhs_matcher,
321 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000322Matcher<Node*> IsWord64Or(const Matcher<Node*>& lhs_matcher,
323 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400324Matcher<Node*> IsWord64Shl(const Matcher<Node*>& lhs_matcher,
325 const Matcher<Node*>& rhs_matcher);
326Matcher<Node*> IsWord64Sar(const Matcher<Node*>& lhs_matcher,
327 const Matcher<Node*>& rhs_matcher);
328Matcher<Node*> IsWord64Equal(const Matcher<Node*>& lhs_matcher,
329 const Matcher<Node*>& rhs_matcher);
330Matcher<Node*> IsInt32AddWithOverflow(const Matcher<Node*>& lhs_matcher,
331 const Matcher<Node*>& rhs_matcher);
332Matcher<Node*> IsInt32Add(const Matcher<Node*>& lhs_matcher,
333 const Matcher<Node*>& rhs_matcher);
334Matcher<Node*> IsInt32Sub(const Matcher<Node*>& lhs_matcher,
335 const Matcher<Node*>& rhs_matcher);
336Matcher<Node*> IsInt32Mul(const Matcher<Node*>& lhs_matcher,
337 const Matcher<Node*>& rhs_matcher);
338Matcher<Node*> IsInt32MulHigh(const Matcher<Node*>& lhs_matcher,
339 const Matcher<Node*>& rhs_matcher);
340Matcher<Node*> IsInt32LessThan(const Matcher<Node*>& lhs_matcher,
341 const Matcher<Node*>& rhs_matcher);
342Matcher<Node*> IsUint32LessThan(const Matcher<Node*>& lhs_matcher,
343 const Matcher<Node*>& rhs_matcher);
344Matcher<Node*> IsUint32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
345 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000346Matcher<Node*> IsInt64Add(const Matcher<Node*>& lhs_matcher,
347 const Matcher<Node*>& rhs_matcher);
348Matcher<Node*> IsInt64Sub(const Matcher<Node*>& lhs_matcher,
349 const Matcher<Node*>& rhs_matcher);
350Matcher<Node*> IsJSAdd(const Matcher<Node*>& lhs_matcher,
351 const Matcher<Node*>& rhs_matcher);
Ben Murdochc5610432016-08-08 18:44:38 +0100352Matcher<Node*> IsTruncateFloat64ToWord32(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400353Matcher<Node*> IsChangeFloat64ToInt32(const Matcher<Node*>& input_matcher);
354Matcher<Node*> IsChangeFloat64ToUint32(const Matcher<Node*>& input_matcher);
355Matcher<Node*> IsChangeInt32ToFloat64(const Matcher<Node*>& input_matcher);
356Matcher<Node*> IsChangeInt32ToInt64(const Matcher<Node*>& input_matcher);
357Matcher<Node*> IsChangeUint32ToFloat64(const Matcher<Node*>& input_matcher);
358Matcher<Node*> IsChangeUint32ToUint64(const Matcher<Node*>& input_matcher);
359Matcher<Node*> IsTruncateFloat64ToFloat32(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400360Matcher<Node*> IsTruncateInt64ToInt32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000361Matcher<Node*> IsFloat32Max(const Matcher<Node*>& lhs_matcher,
362 const Matcher<Node*>& rhs_matcher);
363Matcher<Node*> IsFloat32Min(const Matcher<Node*>& lhs_matcher,
364 const Matcher<Node*>& rhs_matcher);
365Matcher<Node*> IsFloat32Abs(const Matcher<Node*>& input_matcher);
366Matcher<Node*> IsFloat32Equal(const Matcher<Node*>& lhs_matcher,
367 const Matcher<Node*>& rhs_matcher);
368Matcher<Node*> IsFloat32LessThan(const Matcher<Node*>& lhs_matcher,
369 const Matcher<Node*>& rhs_matcher);
370Matcher<Node*> IsFloat32LessThanOrEqual(const Matcher<Node*>& lhs_matcher,
371 const Matcher<Node*>& rhs_matcher);
372Matcher<Node*> IsFloat64Max(const Matcher<Node*>& lhs_matcher,
373 const Matcher<Node*>& rhs_matcher);
374Matcher<Node*> IsFloat64Min(const Matcher<Node*>& lhs_matcher,
375 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400376Matcher<Node*> IsFloat64Sub(const Matcher<Node*>& lhs_matcher,
377 const Matcher<Node*>& rhs_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000378Matcher<Node*> IsFloat64Abs(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400379Matcher<Node*> IsFloat64Sqrt(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000380Matcher<Node*> IsFloat64RoundDown(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400381Matcher<Node*> IsFloat64RoundTruncate(const Matcher<Node*>& input_matcher);
382Matcher<Node*> IsFloat64RoundTiesAway(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000383Matcher<Node*> IsFloat64ExtractLowWord32(const Matcher<Node*>& input_matcher);
384Matcher<Node*> IsFloat64ExtractHighWord32(const Matcher<Node*>& input_matcher);
385Matcher<Node*> IsFloat64InsertLowWord32(const Matcher<Node*>& lhs_matcher,
386 const Matcher<Node*>& rhs_matcher);
387Matcher<Node*> IsFloat64InsertHighWord32(const Matcher<Node*>& lhs_matcher,
388 const Matcher<Node*>& rhs_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400389Matcher<Node*> IsToNumber(const Matcher<Node*>& base_matcher,
390 const Matcher<Node*>& context_matcher,
391 const Matcher<Node*>& effect_matcher,
392 const Matcher<Node*>& control_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000393Matcher<Node*> IsLoadContext(const Matcher<ContextAccess>& access_matcher,
394 const Matcher<Node*>& context_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400395Matcher<Node*> IsNumberToInt32(const Matcher<Node*>& input_matcher);
396Matcher<Node*> IsNumberToUint32(const Matcher<Node*>& input_matcher);
Ben Murdoch4a90d5f2016-03-22 12:00:34 +0000397Matcher<Node*> IsParameter(const Matcher<int> index_matcher);
398Matcher<Node*> IsLoadFramePointer();
Ben Murdochc5610432016-08-08 18:44:38 +0100399Matcher<Node*> IsLoadParentFramePointer();
Ben Murdoch61f157c2016-09-16 13:49:30 +0100400Matcher<Node*> IsPlainPrimitiveToNumber(const Matcher<Node*>& input_matcher);
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400401
Ben Murdochda12d292016-06-02 14:46:10 +0100402Matcher<Node*> IsInt32PairAdd(const Matcher<Node*>& a_matcher,
403 const Matcher<Node*>& b_matcher,
404 const Matcher<Node*>& c_matcher,
405 const Matcher<Node*>& d_matcher);
406Matcher<Node*> IsInt32PairSub(const Matcher<Node*>& a_matcher,
407 const Matcher<Node*>& b_matcher,
408 const Matcher<Node*>& c_matcher,
409 const Matcher<Node*>& d_matcher);
410Matcher<Node*> IsInt32PairMul(const Matcher<Node*>& a_matcher,
411 const Matcher<Node*>& b_matcher,
412 const Matcher<Node*>& c_matcher,
413 const Matcher<Node*>& d_matcher);
414
415Matcher<Node*> IsWord32PairShl(const Matcher<Node*>& lhs_matcher,
416 const Matcher<Node*>& mid_matcher,
417 const Matcher<Node*>& rhs_matcher);
418Matcher<Node*> IsWord32PairShr(const Matcher<Node*>& lhs_matcher,
419 const Matcher<Node*>& mid_matcher,
420 const Matcher<Node*>& rhs_matcher);
421
422Matcher<Node*> IsWord32PairSar(const Matcher<Node*>& lhs_matcher,
423 const Matcher<Node*>& mid_matcher,
424 const Matcher<Node*>& rhs_matcher);
425
426Matcher<Node*> IsStackSlot();
Ben Murdochc5610432016-08-08 18:44:38 +0100427Matcher<Node*> IsTypeGuard(const Matcher<Type*>& type_matcher,
428 const Matcher<Node*>& value_matcher,
429 const Matcher<Node*>& control_matcher);
Ben Murdochda12d292016-06-02 14:46:10 +0100430
Emily Bernierd0a1eb72015-03-24 16:35:39 -0400431} // namespace compiler
432} // namespace internal
433} // namespace v8
434
435#endif // V8_UNITTESTS_COMPILER_NODE_TEST_UTILS_H_