Lines Matching refs:node

18 int NodeProperties::PastValueIndex(Node* node) {  in PastValueIndex()  argument
19 return FirstValueIndex(node) + node->op()->ValueInputCount(); in PastValueIndex()
24 int NodeProperties::PastContextIndex(Node* node) { in PastContextIndex() argument
25 return FirstContextIndex(node) + in PastContextIndex()
26 OperatorProperties::GetContextInputCount(node->op()); in PastContextIndex()
31 int NodeProperties::PastFrameStateIndex(Node* node) { in PastFrameStateIndex() argument
32 return FirstFrameStateIndex(node) + in PastFrameStateIndex()
33 OperatorProperties::GetFrameStateInputCount(node->op()); in PastFrameStateIndex()
38 int NodeProperties::PastEffectIndex(Node* node) { in PastEffectIndex() argument
39 return FirstEffectIndex(node) + node->op()->EffectInputCount(); in PastEffectIndex()
44 int NodeProperties::PastControlIndex(Node* node) { in PastControlIndex() argument
45 return FirstControlIndex(node) + node->op()->ControlInputCount(); in PastControlIndex()
50 Node* NodeProperties::GetValueInput(Node* node, int index) { in GetValueInput() argument
51 DCHECK(0 <= index && index < node->op()->ValueInputCount()); in GetValueInput()
52 return node->InputAt(FirstValueIndex(node) + index); in GetValueInput()
57 Node* NodeProperties::GetContextInput(Node* node) { in GetContextInput() argument
58 DCHECK(OperatorProperties::HasContextInput(node->op())); in GetContextInput()
59 return node->InputAt(FirstContextIndex(node)); in GetContextInput()
64 Node* NodeProperties::GetFrameStateInput(Node* node, int index) { in GetFrameStateInput() argument
65 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); in GetFrameStateInput()
66 return node->InputAt(FirstFrameStateIndex(node) + index); in GetFrameStateInput()
71 Node* NodeProperties::GetEffectInput(Node* node, int index) { in GetEffectInput() argument
72 DCHECK(0 <= index && index < node->op()->EffectInputCount()); in GetEffectInput()
73 return node->InputAt(FirstEffectIndex(node) + index); in GetEffectInput()
78 Node* NodeProperties::GetControlInput(Node* node, int index) { in GetControlInput() argument
79 DCHECK(0 <= index && index < node->op()->ControlInputCount()); in GetControlInput()
80 return node->InputAt(FirstControlIndex(node) + index); in GetControlInput()
86 Node* const node = edge.from(); in IsValueEdge() local
87 return IsInputRange(edge, FirstValueIndex(node), in IsValueEdge()
88 node->op()->ValueInputCount()); in IsValueEdge()
94 Node* const node = edge.from(); in IsContextEdge() local
95 return IsInputRange(edge, FirstContextIndex(node), in IsContextEdge()
96 OperatorProperties::GetContextInputCount(node->op())); in IsContextEdge()
102 Node* const node = edge.from(); in IsFrameStateEdge() local
103 return IsInputRange(edge, FirstFrameStateIndex(node), in IsFrameStateEdge()
104 OperatorProperties::GetFrameStateInputCount(node->op())); in IsFrameStateEdge()
110 Node* const node = edge.from(); in IsEffectEdge() local
111 return IsInputRange(edge, FirstEffectIndex(node), in IsEffectEdge()
112 node->op()->EffectInputCount()); in IsEffectEdge()
118 Node* const node = edge.from(); in IsControlEdge() local
119 return IsInputRange(edge, FirstControlIndex(node), in IsControlEdge()
120 node->op()->ControlInputCount()); in IsControlEdge()
125 bool NodeProperties::IsExceptionalCall(Node* node) { in IsExceptionalCall() argument
126 for (Edge const edge : node->use_edges()) { in IsExceptionalCall()
135 void NodeProperties::ReplaceValueInput(Node* node, Node* value, int index) { in ReplaceValueInput() argument
136 DCHECK(index < node->op()->ValueInputCount()); in ReplaceValueInput()
137 node->ReplaceInput(FirstValueIndex(node) + index, value); in ReplaceValueInput()
142 void NodeProperties::ReplaceValueInputs(Node* node, Node* value) { in ReplaceValueInputs() argument
143 int value_input_count = node->op()->ValueInputCount(); in ReplaceValueInputs()
145 node->ReplaceInput(0, value); in ReplaceValueInputs()
147 node->RemoveInput(value_input_count); in ReplaceValueInputs()
153 void NodeProperties::ReplaceContextInput(Node* node, Node* context) { in ReplaceContextInput() argument
154 node->ReplaceInput(FirstContextIndex(node), context); in ReplaceContextInput()
159 void NodeProperties::ReplaceControlInput(Node* node, Node* control) { in ReplaceControlInput() argument
160 node->ReplaceInput(FirstControlIndex(node), control); in ReplaceControlInput()
165 void NodeProperties::ReplaceEffectInput(Node* node, Node* effect, int index) { in ReplaceEffectInput() argument
166 DCHECK(index < node->op()->EffectInputCount()); in ReplaceEffectInput()
167 return node->ReplaceInput(FirstEffectIndex(node) + index, effect); in ReplaceEffectInput()
172 void NodeProperties::ReplaceFrameStateInput(Node* node, int index, in ReplaceFrameStateInput() argument
174 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); in ReplaceFrameStateInput()
175 node->ReplaceInput(FirstFrameStateIndex(node) + index, frame_state); in ReplaceFrameStateInput()
180 void NodeProperties::RemoveFrameStateInput(Node* node, int index) { in RemoveFrameStateInput() argument
181 DCHECK_LT(index, OperatorProperties::GetFrameStateInputCount(node->op())); in RemoveFrameStateInput()
182 node->RemoveInput(FirstFrameStateIndex(node) + index); in RemoveFrameStateInput()
187 void NodeProperties::RemoveNonValueInputs(Node* node) { in RemoveNonValueInputs() argument
188 node->TrimInputCount(node->op()->ValueInputCount()); in RemoveNonValueInputs()
193 void NodeProperties::RemoveValueInputs(Node* node) { in RemoveValueInputs() argument
194 int value_input_count = node->op()->ValueInputCount(); in RemoveValueInputs()
196 node->RemoveInput(value_input_count); in RemoveValueInputs()
203 Node* node) { in MergeControlToEnd() argument
204 graph->end()->AppendInput(graph->zone(), node); in MergeControlToEnd()
210 void NodeProperties::ReplaceUses(Node* node, Node* value, Node* effect, in ReplaceUses() argument
213 for (Edge edge : node->use_edges()) { in ReplaceUses()
236 void NodeProperties::ChangeOp(Node* node, const Operator* new_op) { in ChangeOp() argument
237 node->set_op(new_op); in ChangeOp()
238 Verifier::VerifyNode(node); in ChangeOp()
243 Node* NodeProperties::FindProjection(Node* node, size_t projection_index) { in FindProjection() argument
244 for (auto use : node->uses()) { in FindProjection()
255 void NodeProperties::CollectControlProjections(Node* node, Node** projections, in CollectControlProjections() argument
258 DCHECK_LE(static_cast<int>(projection_count), node->UseCount()); in CollectControlProjections()
262 for (Edge const edge : node->use_edges()) { in CollectControlProjections()
268 DCHECK_EQ(IrOpcode::kBranch, node->opcode()); in CollectControlProjections()
272 DCHECK_EQ(IrOpcode::kBranch, node->opcode()); in CollectControlProjections()
276 DCHECK(!node->op()->HasProperty(Operator::kNoThrow)); in CollectControlProjections()
280 DCHECK(!node->op()->HasProperty(Operator::kNoThrow)); in CollectControlProjections()
284 DCHECK_EQ(IrOpcode::kSwitch, node->opcode()); in CollectControlProjections()
288 DCHECK_EQ(IrOpcode::kSwitch, node->opcode()); in CollectControlProjections()
309 Node* node, MaybeHandle<Context> context) { in GetSpecializationContext() argument
310 switch (node->opcode()) { in GetSpecializationContext()
312 return Handle<Context>::cast(OpParameter<Handle<HeapObject>>(node)); in GetSpecializationContext()
314 Node* const start = NodeProperties::GetValueInput(node, 0); in GetSpecializationContext()
316 int const index = ParameterIndexOf(node->op()); in GetSpecializationContext()
334 Node* node, MaybeHandle<Context> native_context) { in GetSpecializationNativeContext() argument
336 switch (node->opcode()) { in GetSpecializationNativeContext()
345 node = NodeProperties::GetContextInput(node); in GetSpecializationNativeContext()
351 Handle<Context>::cast(OpParameter<Handle<HeapObject>>(node)); in GetSpecializationNativeContext()
355 int const index = OpParameter<int>(node); in GetSpecializationNativeContext()
362 Node* const start = NodeProperties::GetValueInput(node, 0); in GetSpecializationNativeContext()
364 int const index = ParameterIndexOf(node->op()); in GetSpecializationNativeContext()
382 Node* node, MaybeHandle<Context> native_context) { in GetSpecializationGlobalObject() argument
384 if (GetSpecializationNativeContext(node, native_context).ToHandle(&context)) { in GetSpecializationGlobalObject()
392 Type* NodeProperties::GetTypeOrAny(Node* node) { in GetTypeOrAny() argument
393 return IsTyped(node) ? node->type() : Type::Any(); in GetTypeOrAny()
398 bool NodeProperties::AllValueInputsAreTyped(Node* node) { in AllValueInputsAreTyped() argument
399 int input_count = node->op()->ValueInputCount(); in AllValueInputsAreTyped()
401 if (!IsTyped(GetValueInput(node, index))) return false; in AllValueInputsAreTyped()