| 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 514 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 node->set_op(common()->Dead()); | 525 node->set_op(common()->Dead()); |
| 526 node->TrimInputCount(0); | 526 node->TrimInputCount(0); |
| 527 return Changed(node); | 527 return Changed(node); |
| 528 } | 528 } |
| 529 | 529 |
| 530 | 530 |
| 531 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { | 531 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { |
| 532 CallRuntimeParameters params = OpParameter<CallRuntimeParameters>(node->op()); | 532 CallRuntimeParameters params = OpParameter<CallRuntimeParameters>(node->op()); |
| 533 size_t arity = params.arity(); | 533 size_t arity = params.arity(); |
| 534 node->set_op(javascript()->CallFunction(arity, NO_CALL_FUNCTION_FLAGS, STRICT, | 534 node->set_op(javascript()->CallFunction(arity, NO_CALL_FUNCTION_FLAGS, STRICT, |
| 535 VectorSlotPair(), ALLOW_TAIL_CALLS)); | 535 VectorSlotPair(), params.mode())); |
| 536 Node* function = node->InputAt(static_cast<int>(arity - 1)); | 536 Node* function = node->InputAt(static_cast<int>(arity - 1)); |
| 537 while (--arity != 0) { | 537 while (--arity != 0) { |
| 538 node->ReplaceInput(static_cast<int>(arity), | 538 node->ReplaceInput(static_cast<int>(arity), |
| 539 node->InputAt(static_cast<int>(arity - 1))); | 539 node->InputAt(static_cast<int>(arity - 1))); |
| 540 } | 540 } |
| 541 node->ReplaceInput(0, function); | 541 node->ReplaceInput(0, function); |
| 542 return Changed(node); | 542 return Changed(node); |
| 543 } | 543 } |
| 544 | 544 |
| 545 | 545 |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 597 } | 597 } |
| 598 | 598 |
| 599 | 599 |
| 600 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { | 600 MachineOperatorBuilder* JSIntrinsicLowering::machine() const { |
| 601 return jsgraph()->machine(); | 601 return jsgraph()->machine(); |
| 602 } | 602 } |
| 603 | 603 |
| 604 } // namespace compiler | 604 } // namespace compiler |
| 605 } // namespace internal | 605 } // namespace internal |
| 606 } // namespace v8 | 606 } // namespace v8 |
| OLD | NEW |