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/instruction-selector.h" | 5 #include "src/compiler/instruction-selector.h" |
6 | 6 |
7 #include <limits> | 7 #include <limits> |
8 | 8 |
9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
10 #include "src/compiler/instruction-selector-impl.h" | 10 #include "src/compiler/instruction-selector-impl.h" |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1600 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), | 1600 Emit(opcode, output_count, outputs, buffer.instruction_args.size(), |
1601 &buffer.instruction_args.front()) | 1601 &buffer.instruction_args.front()) |
1602 ->MarkAsCall(); | 1602 ->MarkAsCall(); |
1603 } | 1603 } |
1604 | 1604 |
1605 | 1605 |
1606 void InstructionSelector::VisitTailCall(Node* node) { | 1606 void InstructionSelector::VisitTailCall(Node* node) { |
1607 OperandGenerator g(this); | 1607 OperandGenerator g(this); |
1608 CallDescriptor const* descriptor = CallDescriptorOf(node->op()); | 1608 CallDescriptor const* descriptor = CallDescriptorOf(node->op()); |
1609 DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls); | 1609 DCHECK_NE(0, descriptor->flags() & CallDescriptor::kSupportsTailCalls); |
1610 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kPatchableCallSite); | |
1611 DCHECK_EQ(0, descriptor->flags() & CallDescriptor::kNeedsNopAfterCall); | |
1612 | 1610 |
1613 // TODO(turbofan): Relax restriction for stack parameters. | 1611 // TODO(turbofan): Relax restriction for stack parameters. |
1614 | 1612 |
1615 int stack_param_delta = 0; | 1613 int stack_param_delta = 0; |
1616 if (linkage()->GetIncomingDescriptor()->CanTailCall(node, | 1614 if (linkage()->GetIncomingDescriptor()->CanTailCall(node, |
1617 &stack_param_delta)) { | 1615 &stack_param_delta)) { |
1618 CallBuffer buffer(zone(), descriptor, nullptr); | 1616 CallBuffer buffer(zone(), descriptor, nullptr); |
1619 | 1617 |
1620 // Compute InstructionOperands for inputs and outputs. | 1618 // Compute InstructionOperands for inputs and outputs. |
1621 CallBufferFlags flags(kCallCodeImmediate | kCallTail); | 1619 CallBufferFlags flags(kCallCodeImmediate | kCallTail); |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 return new (instruction_zone()) FrameStateDescriptor( | 1814 return new (instruction_zone()) FrameStateDescriptor( |
1817 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1815 instruction_zone(), state_info.type(), state_info.bailout_id(), |
1818 state_info.state_combine(), parameters, locals, stack, | 1816 state_info.state_combine(), parameters, locals, stack, |
1819 state_info.shared_info(), outer_state); | 1817 state_info.shared_info(), outer_state); |
1820 } | 1818 } |
1821 | 1819 |
1822 | 1820 |
1823 } // namespace compiler | 1821 } // namespace compiler |
1824 } // namespace internal | 1822 } // namespace internal |
1825 } // namespace v8 | 1823 } // namespace v8 |
OLD | NEW |