Lines Matching refs:node

32 Reduction JSIntrinsicLowering::Reduce(Node* node) {  in Reduce()  argument
33 if (node->opcode() != IrOpcode::kJSCallRuntime) return NoChange(); in Reduce()
35 Runtime::FunctionForId(CallRuntimeParametersOf(node->op()).id()); in Reduce()
39 return ReduceConstructDouble(node); in Reduce()
41 return ReduceCreateIterResultObject(node); in Reduce()
43 return ReduceDeoptimizeNow(node); in Reduce()
45 return ReduceDoubleHi(node); in Reduce()
47 return ReduceDoubleLo(node); in Reduce()
49 return ReduceIncrementStatsCounter(node); in Reduce()
51 return ReduceIsInstanceType(node, JS_ARRAY_TYPE); in Reduce()
53 return ReduceIsInstanceType(node, JS_DATE_TYPE); in Reduce()
55 return ReduceIsInstanceType(node, JS_TYPED_ARRAY_TYPE); in Reduce()
57 return ReduceIsFunction(node); in Reduce()
59 return ReduceIsInstanceType(node, JS_REGEXP_TYPE); in Reduce()
61 return ReduceIsJSReceiver(node); in Reduce()
63 return ReduceIsSmi(node); in Reduce()
65 return ReduceJSValueGetValue(node); in Reduce()
67 return ReduceMathClz32(node); in Reduce()
69 return ReduceMathFloor(node); in Reduce()
71 return ReduceMathSqrt(node); in Reduce()
73 return ReduceValueOf(node); in Reduce()
75 return ReduceIsMinusZero(node); in Reduce()
77 return ReduceFixedArrayGet(node); in Reduce()
79 return ReduceFixedArraySet(node); in Reduce()
81 return ReduceRegExpConstructResult(node); in Reduce()
83 return ReduceRegExpExec(node); in Reduce()
85 return ReduceRegExpFlags(node); in Reduce()
87 return ReduceRegExpSource(node); in Reduce()
89 return ReduceSubString(node); in Reduce()
91 return ReduceToInteger(node); in Reduce()
93 return ReduceToLength(node); in Reduce()
95 return ReduceToName(node); in Reduce()
97 return ReduceToNumber(node); in Reduce()
99 return ReduceToObject(node); in Reduce()
101 return ReduceToPrimitive(node); in Reduce()
103 return ReduceToString(node); in Reduce()
105 return ReduceCall(node); in Reduce()
107 return ReduceTailCall(node); in Reduce()
109 return ReduceGetSuperConstructor(node); in Reduce()
117 Reduction JSIntrinsicLowering::ReduceCreateIterResultObject(Node* node) { in ReduceCreateIterResultObject() argument
118 Node* const value = NodeProperties::GetValueInput(node, 0); in ReduceCreateIterResultObject()
119 Node* const done = NodeProperties::GetValueInput(node, 1); in ReduceCreateIterResultObject()
120 Node* const context = NodeProperties::GetContextInput(node); in ReduceCreateIterResultObject()
121 Node* const effect = NodeProperties::GetEffectInput(node); in ReduceCreateIterResultObject()
122 return Change(node, javascript()->CreateIterResultObject(), value, done, in ReduceCreateIterResultObject()
127 Reduction JSIntrinsicLowering::ReduceConstructDouble(Node* node) { in ReduceConstructDouble() argument
128 Node* high = NodeProperties::GetValueInput(node, 0); in ReduceConstructDouble()
129 Node* low = NodeProperties::GetValueInput(node, 1); in ReduceConstructDouble()
135 ReplaceWithValue(node, value); in ReduceConstructDouble()
140 Reduction JSIntrinsicLowering::ReduceDeoptimizeNow(Node* node) { in ReduceDeoptimizeNow() argument
142 Node* const frame_state = NodeProperties::GetFrameStateInput(node, 0); in ReduceDeoptimizeNow()
143 Node* const effect = NodeProperties::GetEffectInput(node); in ReduceDeoptimizeNow()
144 Node* const control = NodeProperties::GetControlInput(node); in ReduceDeoptimizeNow()
152 node->TrimInputCount(0); in ReduceDeoptimizeNow()
153 NodeProperties::ChangeOp(node, common()->Dead()); in ReduceDeoptimizeNow()
154 return Changed(node); in ReduceDeoptimizeNow()
158 Reduction JSIntrinsicLowering::ReduceDoubleHi(Node* node) { in ReduceDoubleHi() argument
159 return Change(node, machine()->Float64ExtractHighWord32()); in ReduceDoubleHi()
163 Reduction JSIntrinsicLowering::ReduceDoubleLo(Node* node) { in ReduceDoubleLo() argument
164 return Change(node, machine()->Float64ExtractLowWord32()); in ReduceDoubleLo()
168 Reduction JSIntrinsicLowering::ReduceIncrementStatsCounter(Node* node) { in ReduceIncrementStatsCounter() argument
169 if (!FLAG_native_code_counters) return ChangeToUndefined(node); in ReduceIncrementStatsCounter()
170 HeapObjectMatcher m(NodeProperties::GetValueInput(node, 0)); in ReduceIncrementStatsCounter()
172 return ChangeToUndefined(node); in ReduceIncrementStatsCounter()
177 if (!counter.Enabled()) return ChangeToUndefined(node); in ReduceIncrementStatsCounter()
179 Node* effect = NodeProperties::GetEffectInput(node); in ReduceIncrementStatsCounter()
180 Node* control = NodeProperties::GetControlInput(node); in ReduceIncrementStatsCounter()
189 return ChangeToUndefined(node, store); in ReduceIncrementStatsCounter()
194 Node* node, InstanceType instance_type) { in ReduceIsInstanceType() argument
200 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceIsInstanceType()
201 Node* effect = NodeProperties::GetEffectInput(node); in ReduceIsInstanceType()
202 Node* control = NodeProperties::GetControlInput(node); in ReduceIsInstanceType()
224 ReplaceWithValue(node, node, ephi); in ReduceIsInstanceType()
227 return Change(node, common()->Phi(MachineRepresentation::kTagged, 2), vtrue, in ReduceIsInstanceType()
232 Reduction JSIntrinsicLowering::ReduceIsFunction(Node* node) { in ReduceIsFunction() argument
233 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceIsFunction()
235 Node* effect = NodeProperties::GetEffectInput(node); in ReduceIsFunction()
236 Node* control = NodeProperties::GetControlInput(node); in ReduceIsFunction()
269 ReplaceWithValue(node, node, effect, control); in ReduceIsFunction()
274 Reduction JSIntrinsicLowering::ReduceIsJSReceiver(Node* node) { in ReduceIsJSReceiver() argument
275 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceIsJSReceiver()
277 Node* effect = NodeProperties::GetEffectInput(node); in ReduceIsJSReceiver()
278 Node* control = NodeProperties::GetControlInput(node); in ReduceIsJSReceiver()
313 ReplaceWithValue(node, node, effect, control); in ReduceIsJSReceiver()
318 Reduction JSIntrinsicLowering::ReduceIsSmi(Node* node) { in ReduceIsSmi() argument
319 return Change(node, simplified()->ObjectIsSmi()); in ReduceIsSmi()
323 Reduction JSIntrinsicLowering::ReduceJSValueGetValue(Node* node) { in ReduceJSValueGetValue() argument
324 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceJSValueGetValue()
325 Node* effect = NodeProperties::GetEffectInput(node); in ReduceJSValueGetValue()
326 Node* control = NodeProperties::GetControlInput(node); in ReduceJSValueGetValue()
327 return Change(node, simplified()->LoadField(AccessBuilder::ForValue()), value, in ReduceJSValueGetValue()
332 Reduction JSIntrinsicLowering::ReduceMathClz32(Node* node) { in ReduceMathClz32() argument
333 return Change(node, machine()->Word32Clz()); in ReduceMathClz32()
337 Reduction JSIntrinsicLowering::ReduceMathFloor(Node* node) { in ReduceMathFloor() argument
339 return Change(node, machine()->Float64RoundDown().op()); in ReduceMathFloor()
343 Reduction JSIntrinsicLowering::ReduceMathSqrt(Node* node) { in ReduceMathSqrt() argument
344 return Change(node, machine()->Float64Sqrt()); in ReduceMathSqrt()
348 Reduction JSIntrinsicLowering::ReduceValueOf(Node* node) { in ReduceValueOf() argument
361 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceValueOf()
362 Node* effect = NodeProperties::GetEffectInput(node); in ReduceValueOf()
363 Node* control = NodeProperties::GetControlInput(node); in ReduceValueOf()
405 ReplaceWithValue(node, node, ephi0); in ReduceValueOf()
408 return Change(node, phi_op, vtrue0, vfalse0, merge0); in ReduceValueOf()
412 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op) { in Change() argument
414 RelaxEffectsAndControls(node); in Change()
416 NodeProperties::RemoveNonValueInputs(node); in Change()
418 NodeProperties::ChangeOp(node, op); in Change()
419 return Changed(node); in Change()
423 Reduction JSIntrinsicLowering::ReduceIsMinusZero(Node* node) { in ReduceIsMinusZero() argument
424 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceIsMinusZero()
425 Node* effect = NodeProperties::GetEffectInput(node); in ReduceIsMinusZero()
438 ReplaceWithValue(node, node, effect); in ReduceIsMinusZero()
442 return Change(node, machine()->Word32Equal(), and_result, in ReduceIsMinusZero()
447 Reduction JSIntrinsicLowering::ReduceFixedArrayGet(Node* node) { in ReduceFixedArrayGet() argument
448 Node* base = node->InputAt(0); in ReduceFixedArrayGet()
449 Node* index = node->InputAt(1); in ReduceFixedArrayGet()
450 Node* effect = NodeProperties::GetEffectInput(node); in ReduceFixedArrayGet()
451 Node* control = NodeProperties::GetControlInput(node); in ReduceFixedArrayGet()
453 node, simplified()->LoadElement(AccessBuilder::ForFixedArrayElement()), in ReduceFixedArrayGet()
458 Reduction JSIntrinsicLowering::ReduceFixedArraySet(Node* node) { in ReduceFixedArraySet() argument
459 Node* base = node->InputAt(0); in ReduceFixedArraySet()
460 Node* index = node->InputAt(1); in ReduceFixedArraySet()
461 Node* value = node->InputAt(2); in ReduceFixedArraySet()
462 Node* effect = NodeProperties::GetEffectInput(node); in ReduceFixedArraySet()
463 Node* control = NodeProperties::GetControlInput(node); in ReduceFixedArraySet()
467 ReplaceWithValue(node, value, store); in ReduceFixedArraySet()
472 Reduction JSIntrinsicLowering::ReduceRegExpConstructResult(Node* node) { in ReduceRegExpConstructResult() argument
474 return Change(node, CodeFactory::RegExpConstructResult(isolate()), 0); in ReduceRegExpConstructResult()
478 Reduction JSIntrinsicLowering::ReduceRegExpExec(Node* node) { in ReduceRegExpExec() argument
479 return Change(node, CodeFactory::RegExpExec(isolate()), 4); in ReduceRegExpExec()
483 Reduction JSIntrinsicLowering::ReduceRegExpFlags(Node* node) { in ReduceRegExpFlags() argument
484 Node* const receiver = NodeProperties::GetValueInput(node, 0); in ReduceRegExpFlags()
485 Node* const effect = NodeProperties::GetEffectInput(node); in ReduceRegExpFlags()
486 Node* const control = NodeProperties::GetControlInput(node); in ReduceRegExpFlags()
489 return Change(node, op, receiver, effect, control); in ReduceRegExpFlags()
493 Reduction JSIntrinsicLowering::ReduceRegExpSource(Node* node) { in ReduceRegExpSource() argument
494 Node* const receiver = NodeProperties::GetValueInput(node, 0); in ReduceRegExpSource()
495 Node* const effect = NodeProperties::GetEffectInput(node); in ReduceRegExpSource()
496 Node* const control = NodeProperties::GetControlInput(node); in ReduceRegExpSource()
499 return Change(node, op, receiver, effect, control); in ReduceRegExpSource()
503 Reduction JSIntrinsicLowering::ReduceSubString(Node* node) { in ReduceSubString() argument
504 return Change(node, CodeFactory::SubString(isolate()), 3); in ReduceSubString()
508 Reduction JSIntrinsicLowering::ReduceToInteger(Node* node) { in ReduceToInteger() argument
509 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceToInteger()
512 ReplaceWithValue(node, value); in ReduceToInteger()
519 Reduction JSIntrinsicLowering::ReduceToName(Node* node) { in ReduceToName() argument
520 NodeProperties::ChangeOp(node, javascript()->ToName()); in ReduceToName()
521 return Changed(node); in ReduceToName()
525 Reduction JSIntrinsicLowering::ReduceToNumber(Node* node) { in ReduceToNumber() argument
526 NodeProperties::ChangeOp(node, javascript()->ToNumber()); in ReduceToNumber()
527 return Changed(node); in ReduceToNumber()
531 Reduction JSIntrinsicLowering::ReduceToLength(Node* node) { in ReduceToLength() argument
532 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceToLength()
560 ReplaceWithValue(node, value); in ReduceToLength()
563 return Change(node, CodeFactory::ToLength(isolate()), 0); in ReduceToLength()
567 Reduction JSIntrinsicLowering::ReduceToObject(Node* node) { in ReduceToObject() argument
568 NodeProperties::ChangeOp(node, javascript()->ToObject()); in ReduceToObject()
569 return Changed(node); in ReduceToObject()
573 Reduction JSIntrinsicLowering::ReduceToPrimitive(Node* node) { in ReduceToPrimitive() argument
574 Node* value = NodeProperties::GetValueInput(node, 0); in ReduceToPrimitive()
577 ReplaceWithValue(node, value); in ReduceToPrimitive()
584 Reduction JSIntrinsicLowering::ReduceToString(Node* node) { in ReduceToString() argument
585 NodeProperties::ChangeOp(node, javascript()->ToString()); in ReduceToString()
586 return Changed(node); in ReduceToString()
590 Reduction JSIntrinsicLowering::ReduceCall(Node* node) { in ReduceCall() argument
591 size_t const arity = CallRuntimeParametersOf(node->op()).arity(); in ReduceCall()
593 node, javascript()->CallFunction(arity, STRICT, VectorSlotPair(), in ReduceCall()
596 return Changed(node); in ReduceCall()
600 Reduction JSIntrinsicLowering::ReduceTailCall(Node* node) { in ReduceTailCall() argument
601 size_t const arity = CallRuntimeParametersOf(node->op()).arity(); in ReduceTailCall()
603 node, javascript()->CallFunction(arity, STRICT, VectorSlotPair(), in ReduceTailCall()
606 return Changed(node); in ReduceTailCall()
610 Reduction JSIntrinsicLowering::ReduceGetSuperConstructor(Node* node) { in ReduceGetSuperConstructor() argument
611 Node* active_function = NodeProperties::GetValueInput(node, 0); in ReduceGetSuperConstructor()
612 Node* effect = NodeProperties::GetEffectInput(node); in ReduceGetSuperConstructor()
613 Node* control = NodeProperties::GetControlInput(node); in ReduceGetSuperConstructor()
617 return Change(node, simplified()->LoadField(AccessBuilder::ForMapPrototype()), in ReduceGetSuperConstructor()
622 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, in Change() argument
624 RelaxControls(node); in Change()
625 node->ReplaceInput(0, a); in Change()
626 node->ReplaceInput(1, b); in Change()
627 node->TrimInputCount(2); in Change()
628 NodeProperties::ChangeOp(node, op); in Change()
629 return Changed(node); in Change()
633 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, in Change() argument
635 RelaxControls(node); in Change()
636 node->ReplaceInput(0, a); in Change()
637 node->ReplaceInput(1, b); in Change()
638 node->ReplaceInput(2, c); in Change()
639 node->TrimInputCount(3); in Change()
640 NodeProperties::ChangeOp(node, op); in Change()
641 return Changed(node); in Change()
645 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, in Change() argument
647 RelaxControls(node); in Change()
648 node->ReplaceInput(0, a); in Change()
649 node->ReplaceInput(1, b); in Change()
650 node->ReplaceInput(2, c); in Change()
651 node->ReplaceInput(3, d); in Change()
652 node->TrimInputCount(4); in Change()
653 NodeProperties::ChangeOp(node, op); in Change()
654 return Changed(node); in Change()
658 Reduction JSIntrinsicLowering::ChangeToUndefined(Node* node, Node* effect) { in ChangeToUndefined() argument
659 ReplaceWithValue(node, jsgraph()->UndefinedConstant(), effect); in ChangeToUndefined()
660 return Changed(node); in ChangeToUndefined()
664 Reduction JSIntrinsicLowering::Change(Node* node, Callable const& callable, in Change() argument
668 CallDescriptor::kNeedsFrameState, node->op()->properties()); in Change()
669 node->InsertInput(graph()->zone(), 0, in Change()
671 NodeProperties::ChangeOp(node, common()->Call(desc)); in Change()
672 return Changed(node); in Change()