Lines Matching refs:node

15 #include "src/compiler/node-matchers.h"
16 #include "src/compiler/node-properties.h"
17 #include "src/compiler/node.h"
57 Reduction JSCreateLowering::Reduce(Node* node) {
58 switch (node->opcode()) {
60 return ReduceJSCreate(node);
62 return ReduceJSCreateArguments(node);
64 return ReduceJSCreateArray(node);
66 return ReduceJSCreateArrayIterator(node);
68 return ReduceJSCreateAsyncFunctionObject(node);
70 return ReduceJSCreateBoundFunction(node);
72 return ReduceJSCreateClosure(node);
74 return ReduceJSCreateCollectionIterator(node);
76 return ReduceJSCreateIterResultObject(node);
78 return ReduceJSCreateStringIterator(node);
80 return ReduceJSCreateKeyValueArray(node);
82 return ReduceJSCreatePromise(node);
85 return ReduceJSCreateLiteralArrayOrObject(node);
87 return ReduceJSCreateLiteralRegExp(node);
89 return ReduceJSGetTemplateObject(node);
91 return ReduceJSCreateEmptyLiteralArray(node);
93 return ReduceJSCreateEmptyLiteralObject(node);
95 return ReduceJSCreateFunctionContext(node);
97 return ReduceJSCreateWithContext(node);
99 return ReduceJSCreateCatchContext(node);
101 return ReduceJSCreateBlockContext(node);
103 return ReduceJSCreateGeneratorObject(node);
105 return ReduceJSCreateObject(node);
112 Reduction JSCreateLowering::ReduceJSCreate(Node* node) {
113 DCHECK_EQ(IrOpcode::kJSCreate, node->opcode());
114 Node* const new_target = NodeProperties::GetValueInput(node, 1);
115 Node* const effect = NodeProperties::GetEffectInput(node);
116 Node* const control = NodeProperties::GetControlInput(node);
119 NodeProperties::GetJSCreateMap(broker(), node);
143 RelaxControls(node);
144 a.FinishAndChange(node);
145 return Changed(node);
148 Reduction JSCreateLowering::ReduceJSCreateArguments(Node* node) {
149 DCHECK_EQ(IrOpcode::kJSCreateArguments, node->opcode());
150 CreateArgumentsType type = CreateArgumentsTypeOf(node->op());
151 FrameState frame_state{NodeProperties::GetFrameStateInput(node)};
164 Node* const callee = NodeProperties::GetValueInput(node, 0);
165 Node* const context = NodeProperties::GetContextInput(node);
166 Node* effect = NodeProperties::GetEffectInput(node);
191 RelaxControls(node);
192 a.FinishAndChange(node);
193 return Changed(node);
196 Node* effect = NodeProperties::GetEffectInput(node);
217 RelaxControls(node);
218 a.FinishAndChange(node);
219 return Changed(node);
222 Node* effect = NodeProperties::GetEffectInput(node);
245 RelaxControls(node);
246 a.FinishAndChange(node);
247 return Changed(node);
257 Node* const callee = NodeProperties::GetValueInput(node, 0);
258 Node* const context = NodeProperties::GetContextInput(node);
259 Node* effect = NodeProperties::GetEffectInput(node);
267 // This protects against an incompletely propagated DeadValue node.
268 // If the FrameState has a DeadValue input, then this node will be
294 RelaxControls(node);
295 a.FinishAndChange(node);
296 return Changed(node);
301 Node* effect = NodeProperties::GetEffectInput(node);
307 // This protects against an incompletely propagated DeadValue node.
308 // If the FrameState has a DeadValue input, then this node will be
330 RelaxControls(node);
331 a.FinishAndChange(node);
332 return Changed(node);
339 Node* effect = NodeProperties::GetEffectInput(node);
345 // This protects against an incompletely propagated DeadValue node.
346 // If the FrameState has a DeadValue input, then this node will be
373 RelaxControls(node);
374 a.FinishAndChange(node);
375 return Changed(node);
381 Reduction JSCreateLowering::ReduceJSCreateGeneratorObject(Node* node) {
382 DCHECK_EQ(IrOpcode::kJSCreateGeneratorObject, node->opcode());
383 Node* const closure = NodeProperties::GetValueInput(node, 0);
384 Node* const receiver = NodeProperties::GetValueInput(node, 1);
385 Node* const context = NodeProperties::GetContextInput(node);
387 Node* effect = NodeProperties::GetEffectInput(node);
388 Node* const control = NodeProperties::GetControlInput(node);
453 a.FinishAndChange(node);
454 return Changed(node);
462 Node* node, Node* length, MapRef initial_map, ElementsKind elements_kind,
465 DCHECK_EQ(IrOpcode::kJSCreateArray, node->opcode());
466 Node* effect = NodeProperties::GetEffectInput(node);
467 Node* control = NodeProperties::GetControlInput(node);
510 RelaxControls(node);
511 a.FinishAndChange(node);
512 return Changed(node);
518 Node* node, Node* length, int capacity, MapRef initial_map,
521 DCHECK(node->opcode() == IrOpcode::kJSCreateArray ||
522 node->opcode() == IrOpcode::kJSCreateEmptyLiteralArray);
524 Node* effect = NodeProperties::GetEffectInput(node);
525 Node* control = NodeProperties::GetControlInput(node);
561 RelaxControls(node);
562 a.FinishAndChange(node);
563 return Changed(node);
567 Node* node, std::vector<Node*> values, MapRef initial_map,
570 DCHECK_EQ(IrOpcode::kJSCreateArray, node->opcode());
571 Node* effect = NodeProperties::GetEffectInput(node);
572 Node* control = NodeProperties::GetControlInput(node);
622 RelaxControls(node);
623 a.FinishAndChange(node);
624 return Changed(node);
627 Reduction JSCreateLowering::ReduceJSCreateArray(Node* node) {
628 DCHECK_EQ(IrOpcode::kJSCreateArray, node->opcode());
629 CreateArrayParameters const& p = CreateArrayParametersOf(node->op());
635 NodeProperties::GetJSCreateMap(broker(), node);
638 Node* new_target = NodeProperties::GetValueInput(node, 1);
649 // Check if we have a feedback {site} on the {node}.
667 return ReduceNewArray(node, length, capacity, *initial_map, elements_kind,
670 Node* length = NodeProperties::GetValueInput(node, 2);
678 return ReduceNewArray(node, std::vector<Node*>{length}, *initial_map,
689 return ReduceNewArray(node, length, capacity, *initial_map, elements_kind,
693 return ReduceNewArray(node, length, *initial_map, elements_kind,
703 Node* value = NodeProperties::GetValueInput(node, 2 + i);
737 return ReduceNewArray(node, values, *initial_map, elements_kind, allocation,
743 Reduction JSCreateLowering::ReduceJSCreateArrayIterator(Node* node) {
744 DCHECK_EQ(IrOpcode::kJSCreateArrayIterator, node->opcode());
746 CreateArrayIteratorParametersOf(node->op());
747 Node* iterated_object = NodeProperties::GetValueInput(node, 0);
748 Node* effect = NodeProperties::GetEffectInput(node);
749 Node* control = NodeProperties::GetControlInput(node);
766 RelaxControls(node);
767 a.FinishAndChange(node);
768 return Changed(node);
771 Reduction JSCreateLowering::ReduceJSCreateAsyncFunctionObject(Node* node) {
772 DCHECK_EQ(IrOpcode::kJSCreateAsyncFunctionObject, node->opcode());
773 int const register_count = RegisterCountOf(node->op());
774 Node* closure = NodeProperties::GetValueInput(node, 0);
775 Node* receiver = NodeProperties::GetValueInput(node, 1);
776 Node* promise = NodeProperties::GetValueInput(node, 2);
777 Node* context = NodeProperties::GetContextInput(node);
778 Node* effect = NodeProperties::GetEffectInput(node);
779 Node* control = NodeProperties::GetControlInput(node);
813 a.FinishAndChange(node);
814 return Changed(node);
849 Reduction JSCreateLowering::ReduceJSCreateCollectionIterator(Node* node) {
850 DCHECK_EQ(IrOpcode::kJSCreateCollectionIterator, node->opcode());
852 CreateCollectionIteratorParametersOf(node->op());
853 Node* iterated_object = NodeProperties::GetValueInput(node, 0);
854 Node* effect = NodeProperties::GetEffectInput(node);
855 Node* control = NodeProperties::GetControlInput(node);
876 RelaxControls(node);
877 a.FinishAndChange(node);
878 return Changed(node);
881 Reduction JSCreateLowering::ReduceJSCreateBoundFunction(Node* node) {
882 DCHECK_EQ(IrOpcode::kJSCreateBoundFunction, node->opcode());
884 CreateBoundFunctionParametersOf(node->op());
887 Node* bound_target_function = NodeProperties::GetValueInput(node, 0);
888 Node* bound_this = NodeProperties::GetValueInput(node, 1);
889 Node* effect = NodeProperties::GetEffectInput(node);
890 Node* control = NodeProperties::GetControlInput(node);
901 NodeProperties::GetValueInput(node, 2 + i));
919 RelaxControls(node);
920 a.FinishAndChange(node);
921 return Changed(node);
924 Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) {
925 JSCreateClosureNode n(node);
985 RelaxControls(node);
986 a.FinishAndChange(node);
987 return Changed(node);
990 Reduction JSCreateLowering::ReduceJSCreateIterResultObject(Node* node) {
991 DCHECK_EQ(IrOpcode::kJSCreateIterResultObject, node->opcode());
992 Node* value = NodeProperties::GetValueInput(node, 0);
993 Node* done = NodeProperties::GetValueInput(node, 1);
994 Node* effect = NodeProperties::GetEffectInput(node);
1010 a.FinishAndChange(node);
1011 return Changed(node);
1014 Reduction JSCreateLowering::ReduceJSCreateStringIterator(Node* node) {
1015 DCHECK_EQ(IrOpcode::kJSCreateStringIterator, node->opcode());
1016 Node* string = NodeProperties::GetValueInput(node, 0);
1017 Node* effect = NodeProperties::GetEffectInput(node);
1033 a.FinishAndChange(node);
1034 return Changed(node);
1037 Reduction JSCreateLowering::ReduceJSCreateKeyValueArray(Node* node) {
1038 DCHECK_EQ(IrOpcode::kJSCreateKeyValueArray, node->opcode());
1039 Node* key = NodeProperties::GetValueInput(node, 0);
1040 Node* value = NodeProperties::GetValueInput(node, 1);
1041 Node* effect = NodeProperties::GetEffectInput(node);
1063 a.FinishAndChange(node);
1064 return Changed(node);
1067 Reduction JSCreateLowering::ReduceJSCreatePromise(Node* node) {
1068 DCHECK_EQ(IrOpcode::kJSCreatePromise, node->opcode());
1069 Node* effect = NodeProperties::GetEffectInput(node);
1092 a.FinishAndChange(node);
1093 return Changed(node);
1096 Reduction JSCreateLowering::ReduceJSCreateLiteralArrayOrObject(Node* node) {
1097 DCHECK(node->opcode() == IrOpcode::kJSCreateLiteralArray ||
1098 node->opcode() == IrOpcode::kJSCreateLiteralObject);
1099 JSCreateLiteralOpNode n(node);
1116 ReplaceWithValue(node, value, effect, control);
1122 Reduction JSCreateLowering::ReduceJSCreateEmptyLiteralArray(Node* node) {
1123 JSCreateEmptyLiteralArrayNode n(node);
1139 return ReduceNewArray(node, length, 0, initial_map,
1146 Reduction JSCreateLowering::ReduceJSCreateEmptyLiteralObject(Node* node) {
1147 DCHECK_EQ(IrOpcode::kJSCreateEmptyLiteralObject, node->opcode());
1148 Node* effect = NodeProperties::GetEffectInput(node);
1149 Node* control = NodeProperties::GetControlInput(node);
1172 RelaxControls(node);
1173 a.FinishAndChange(node);
1174 return Changed(node);
1177 Reduction JSCreateLowering::ReduceJSCreateLiteralRegExp(Node* node) {
1178 JSCreateLiteralRegExpNode n(node);
1188 ReplaceWithValue(node, value, effect, control);
1194 Reduction JSCreateLowering::ReduceJSGetTemplateObject(Node* node) {
1195 JSGetTemplateObjectNode n(node);
1207 ReplaceWithValue(node, value);
1211 Reduction JSCreateLowering::ReduceJSCreateFunctionContext(Node* node) {
1212 DCHECK_EQ(IrOpcode::kJSCreateFunctionContext, node->opcode());
1214 CreateFunctionContextParametersOf(node->op());
1222 Node* effect = NodeProperties::GetEffectInput(node);
1223 Node* control = NodeProperties::GetControlInput(node);
1224 Node* context = NodeProperties::GetContextInput(node);
1245 RelaxControls(node);
1246 a.FinishAndChange(node);
1247 return Changed(node);
1253 Reduction JSCreateLowering::ReduceJSCreateWithContext(Node* node) {
1254 DCHECK_EQ(IrOpcode::kJSCreateWithContext, node->opcode());
1255 ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
1256 Node* extension = NodeProperties::GetValueInput(node, 0);
1257 Node* effect = NodeProperties::GetEffectInput(node);
1258 Node* control = NodeProperties::GetControlInput(node);
1259 Node* context = NodeProperties::GetContextInput(node);
1269 RelaxControls(node);
1270 a.FinishAndChange(node);
1271 return Changed(node);
1274 Reduction JSCreateLowering::ReduceJSCreateCatchContext(Node* node) {
1275 DCHECK_EQ(IrOpcode::kJSCreateCatchContext, node->opcode());
1276 ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
1277 Node* exception = NodeProperties::GetValueInput(node, 0);
1278 Node* effect = NodeProperties::GetEffectInput(node);
1279 Node* control = NodeProperties::GetControlInput(node);
1280 Node* context = NodeProperties::GetContextInput(node);
1290 RelaxControls(node);
1291 a.FinishAndChange(node);
1292 return Changed(node);
1295 Reduction JSCreateLowering::ReduceJSCreateBlockContext(Node* node) {
1296 DCHECK_EQ(IrOpcode::kJSCreateBlockContext, node->opcode());
1297 ScopeInfoRef scope_info = ScopeInfoOf(broker(), node->op());
1303 Node* effect = NodeProperties::GetEffectInput(node);
1304 Node* control = NodeProperties::GetControlInput(node);
1305 Node* context = NodeProperties::GetContextInput(node);
1316 RelaxControls(node);
1317 a.FinishAndChange(node);
1318 return Changed(node);
1346 Reduction JSCreateLowering::ReduceJSCreateObject(Node* node) {
1347 DCHECK_EQ(IrOpcode::kJSCreateObject, node->opcode());
1348 Node* effect = NodeProperties::GetEffectInput(node);
1349 Node* control = NodeProperties::GetControlInput(node);
1350 Node* prototype = NodeProperties::GetValueInput(node, 0);
1421 ReplaceWithValue(node, value, effect, control);
1446 DCHECK_NOT_NULL(parameters_it.node());
1448 parameters_it.node());
1477 DCHECK_NOT_NULL(parameters_it.node());
1479 parameters_it.node());
1535 DCHECK_NOT_NULL(parameters_it.node());
1537 parameters_it.node());