OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/change-lowering.h" | 5 #include "src/compiler/change-lowering.h" |
6 | 6 |
7 #include "src/address-map.h" | 7 #include "src/address-map.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compiler/js-graph.h" | 9 #include "src/compiler/js-graph.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
544 CallDescriptor::kNoFlags, Operator::kNoThrow); | 544 CallDescriptor::kNoFlags, Operator::kNoThrow); |
545 const Operator* op = common()->Call(descriptor); | 545 const Operator* op = common()->Call(descriptor); |
546 node->InsertInput(graph()->zone(), 0, target); | 546 node->InsertInput(graph()->zone(), 0, target); |
547 node->InsertInput(graph()->zone(), 2, jsgraph()->NoContextConstant()); | 547 node->InsertInput(graph()->zone(), 2, jsgraph()->NoContextConstant()); |
548 NodeProperties::ChangeOp(node, op); | 548 NodeProperties::ChangeOp(node, op); |
549 } else { | 549 } else { |
550 DCHECK_EQ(TENURED, pretenure); | 550 DCHECK_EQ(TENURED, pretenure); |
551 AllocationSpace space = OLD_SPACE; | 551 AllocationSpace space = OLD_SPACE; |
552 Runtime::FunctionId f = Runtime::kAllocateInTargetSpace; | 552 Runtime::FunctionId f = Runtime::kAllocateInTargetSpace; |
553 Operator::Properties props = node->op()->properties(); | 553 Operator::Properties props = node->op()->properties(); |
554 CallDescriptor* desc = | 554 CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor( |
555 Linkage::GetRuntimeCallDescriptor(jsgraph()->zone(), f, 2, props); | 555 jsgraph()->zone(), f, 2, props, CallDescriptor::kNeedsFrameState); |
556 ExternalReference ref(f, jsgraph()->isolate()); | 556 ExternalReference ref(f, jsgraph()->isolate()); |
557 int32_t flags = AllocateTargetSpace::encode(space); | 557 int32_t flags = AllocateTargetSpace::encode(space); |
558 node->InsertInput(graph()->zone(), 0, jsgraph()->CEntryStubConstant(1)); | 558 node->InsertInput(graph()->zone(), 0, jsgraph()->CEntryStubConstant(1)); |
559 node->InsertInput(graph()->zone(), 2, jsgraph()->SmiConstant(flags)); | 559 node->InsertInput(graph()->zone(), 2, jsgraph()->SmiConstant(flags)); |
560 node->InsertInput(graph()->zone(), 3, jsgraph()->ExternalConstant(ref)); | 560 node->InsertInput(graph()->zone(), 3, jsgraph()->ExternalConstant(ref)); |
561 node->InsertInput(graph()->zone(), 4, jsgraph()->Int32Constant(2)); | 561 node->InsertInput(graph()->zone(), 4, jsgraph()->Int32Constant(2)); |
562 node->InsertInput(graph()->zone(), 5, jsgraph()->NoContextConstant()); | 562 node->InsertInput(graph()->zone(), 5, jsgraph()->NoContextConstant()); |
563 NodeProperties::ChangeOp(node, common()->Call(desc)); | 563 NodeProperties::ChangeOp(node, common()->Call(desc)); |
564 } | 564 } |
565 return Changed(node); | 565 return Changed(node); |
(...skipping 11 matching lines...) Expand all Loading... |
577 } | 577 } |
578 | 578 |
579 | 579 |
580 MachineOperatorBuilder* ChangeLowering::machine() const { | 580 MachineOperatorBuilder* ChangeLowering::machine() const { |
581 return jsgraph()->machine(); | 581 return jsgraph()->machine(); |
582 } | 582 } |
583 | 583 |
584 } // namespace compiler | 584 } // namespace compiler |
585 } // namespace internal | 585 } // namespace internal |
586 } // namespace v8 | 586 } // namespace v8 |
OLD | NEW |