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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 } | 524 } |
525 | 525 |
526 | 526 |
527 Reduction JSIntrinsicLowering::ReduceToObject(Node* node) { | 527 Reduction JSIntrinsicLowering::ReduceToObject(Node* node) { |
528 NodeProperties::ChangeOp(node, javascript()->ToObject()); | 528 NodeProperties::ChangeOp(node, javascript()->ToObject()); |
529 return Changed(node); | 529 return Changed(node); |
530 } | 530 } |
531 | 531 |
532 | 532 |
533 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { | 533 Reduction JSIntrinsicLowering::ReduceCallFunction(Node* node) { |
534 CallRuntimeParameters params = OpParameter<CallRuntimeParameters>(node->op()); | 534 CallRuntimeParameters params = CallRuntimeParametersOf(node->op()); |
535 size_t arity = params.arity(); | 535 size_t arity = params.arity(); |
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 NodeProperties::ChangeOp( | 542 NodeProperties::ChangeOp( |
543 node, | 543 node, javascript()->CallFunction( |
544 javascript()->CallFunction(params.arity(), NO_CALL_FUNCTION_FLAGS, STRICT, | 544 params.arity(), NO_CALL_FUNCTION_FLAGS, STRICT, |
545 VectorSlotPair(), ALLOW_TAIL_CALLS)); | 545 VectorSlotPair(), ConvertReceiverMode::kAny, ALLOW_TAIL_CALLS)); |
546 return Changed(node); | 546 return Changed(node); |
547 } | 547 } |
548 | 548 |
549 | 549 |
550 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, | 550 Reduction JSIntrinsicLowering::Change(Node* node, const Operator* op, Node* a, |
551 Node* b) { | 551 Node* b) { |
552 RelaxControls(node); | 552 RelaxControls(node); |
553 node->ReplaceInput(0, a); | 553 node->ReplaceInput(0, a); |
554 node->ReplaceInput(1, b); | 554 node->ReplaceInput(1, b); |
555 node->TrimInputCount(2); | 555 node->TrimInputCount(2); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
606 } | 606 } |
607 | 607 |
608 | 608 |
609 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { | 609 SimplifiedOperatorBuilder* JSIntrinsicLowering::simplified() const { |
610 return jsgraph()->simplified(); | 610 return jsgraph()->simplified(); |
611 } | 611 } |
612 | 612 |
613 } // namespace compiler | 613 } // namespace compiler |
614 } // namespace internal | 614 } // namespace internal |
615 } // namespace v8 | 615 } // namespace v8 |
OLD | NEW |