OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/compiler/js-intrinsic-lowering.h" | 5 #include "src/compiler/js-intrinsic-lowering.h" |
6 | 6 |
7 #include <stack> | 7 #include <stack> |
8 | 8 |
9 #include "src/compiler/access-builder.h" | 9 #include "src/compiler/access-builder.h" |
10 #include "src/compiler/js-graph.h" | 10 #include "src/compiler/js-graph.h" |
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
532 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { | 532 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { |
533 CallRuntimeParameters params = CallRuntimeParametersOf(node->op()); | 533 CallRuntimeParameters params = CallRuntimeParametersOf(node->op()); |
534 size_t arity = params.arity(); | 534 size_t arity = params.arity(); |
535 Node* function = node->InputAt(static_cast<int>(arity - 1)); | 535 Node* function = node->InputAt(static_cast<int>(arity - 1)); |
536 while (--arity != 0) { | 536 while (--arity != 0) { |
537 node->ReplaceInput(static_cast<int>(arity), | 537 node->ReplaceInput(static_cast<int>(arity), |
538 node->InputAt(static_cast<int>(arity - 1))); | 538 node->InputAt(static_cast<int>(arity - 1))); |
539 } | 539 } |
540 node->ReplaceInput(0, function); | 540 node->ReplaceInput(0, function); |
541 NodeProperties::ChangeOp( | 541 NodeProperties::ChangeOp( |
542 node, javascript()->CallFunction( | 542 node, javascript()->CallFunction(params.arity(), STRICT, VectorSlotPair(), |
543 params.arity(), NO_CALL_FUNCTION_FLAGS, STRICT, | 543 ConvertReceiverMode::kAny, |
544 VectorSlotPair(), ConvertReceiverMode::kAny, ALLOW_TAIL_CALLS)); | 544 TailCallMode::kAllow)); |
545 return Changed(node); | 545 return Changed(node); |
546 } | 546 } |
547 | 547 |
548 | 548 |
549 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, | 549 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, |
550 Node* b) { | 550 Node* b) { |
551 RelaxControls(node); | 551 RelaxControls(node); |
552 node->ReplaceInput(0, a); | 552 node->ReplaceInput(0, a); |
553 node->ReplaceInput(1, b); | 553 node->ReplaceInput(1, b); |
554 node->TrimInputCount(2); | 554 node->TrimInputCount(2); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 } | 605 } |
606 | 606 |
607 | 607 |
608 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 608 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
609 return jsgraph()->simplified(); | 609 return jsgraph()->simplified(); |
610 } | 610 } |
611 | 611 |
612 } // namespace compiler | 612 } // namespace compiler |
613 } // namespace internal | 613 } // namespace internal |
614 } // namespace v8 | 614 } // namespace v8 |
OLD | NEW |