| 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 882 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 case IrOpcode::kCall: | 893 case IrOpcode::kCall: |
| 894 return VisitCall(node); | 894 return VisitCall(node); |
| 895 case IrOpcode::kDeoptimizeIf: | 895 case IrOpcode::kDeoptimizeIf: |
| 896 return VisitDeoptimizeIf(node); | 896 return VisitDeoptimizeIf(node); |
| 897 case IrOpcode::kDeoptimizeUnless: | 897 case IrOpcode::kDeoptimizeUnless: |
| 898 return VisitDeoptimizeUnless(node); | 898 return VisitDeoptimizeUnless(node); |
| 899 case IrOpcode::kFrameState: | 899 case IrOpcode::kFrameState: |
| 900 case IrOpcode::kStateValues: | 900 case IrOpcode::kStateValues: |
| 901 case IrOpcode::kObjectState: | 901 case IrOpcode::kObjectState: |
| 902 return; | 902 return; |
| 903 case IrOpcode::kDebugBreak: |
| 904 VisitDebugBreak(); |
| 905 return; |
| 903 case IrOpcode::kLoad: { | 906 case IrOpcode::kLoad: { |
| 904 LoadRepresentation type = LoadRepresentationOf(node->op()); | 907 LoadRepresentation type = LoadRepresentationOf(node->op()); |
| 905 MarkAsRepresentation(type.representation(), node); | 908 MarkAsRepresentation(type.representation(), node); |
| 906 return VisitLoad(node); | 909 return VisitLoad(node); |
| 907 } | 910 } |
| 908 case IrOpcode::kStore: | 911 case IrOpcode::kStore: |
| 909 return VisitStore(node); | 912 return VisitStore(node); |
| 910 case IrOpcode::kWord32And: | 913 case IrOpcode::kWord32And: |
| 911 return MarkAsWord32(node), VisitWord32And(node); | 914 return MarkAsWord32(node), VisitWord32And(node); |
| 912 case IrOpcode::kWord32Or: | 915 case IrOpcode::kWord32Or: |
| (...skipping 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1778 } | 1781 } |
| 1779 EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, value); | 1782 EmitDeoptimize(opcode, 0, nullptr, 0, nullptr, value); |
| 1780 } | 1783 } |
| 1781 | 1784 |
| 1782 | 1785 |
| 1783 void InstructionSelector::VisitThrow(Node* value) { | 1786 void InstructionSelector::VisitThrow(Node* value) { |
| 1784 OperandGenerator g(this); | 1787 OperandGenerator g(this); |
| 1785 Emit(kArchThrowTerminator, g.NoOutput()); | 1788 Emit(kArchThrowTerminator, g.NoOutput()); |
| 1786 } | 1789 } |
| 1787 | 1790 |
| 1791 void InstructionSelector::VisitDebugBreak() { |
| 1792 OperandGenerator g(this); |
| 1793 Emit(kArchDebugBreak, g.NoOutput()); |
| 1794 } |
| 1788 | 1795 |
| 1789 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( | 1796 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( |
| 1790 Node* state) { | 1797 Node* state) { |
| 1791 DCHECK(state->opcode() == IrOpcode::kFrameState); | 1798 DCHECK(state->opcode() == IrOpcode::kFrameState); |
| 1792 DCHECK_EQ(kFrameStateInputCount, state->InputCount()); | 1799 DCHECK_EQ(kFrameStateInputCount, state->InputCount()); |
| 1793 FrameStateInfo state_info = OpParameter<FrameStateInfo>(state); | 1800 FrameStateInfo state_info = OpParameter<FrameStateInfo>(state); |
| 1794 | 1801 |
| 1795 int parameters = static_cast<int>( | 1802 int parameters = static_cast<int>( |
| 1796 StateValuesAccess(state->InputAt(kFrameStateParametersInput)).size()); | 1803 StateValuesAccess(state->InputAt(kFrameStateParametersInput)).size()); |
| 1797 int locals = static_cast<int>( | 1804 int locals = static_cast<int>( |
| (...skipping 13 matching lines...) Expand all Loading... |
| 1811 return new (instruction_zone()) FrameStateDescriptor( | 1818 return new (instruction_zone()) FrameStateDescriptor( |
| 1812 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1819 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1813 state_info.state_combine(), parameters, locals, stack, | 1820 state_info.state_combine(), parameters, locals, stack, |
| 1814 state_info.shared_info(), outer_state); | 1821 state_info.shared_info(), outer_state); |
| 1815 } | 1822 } |
| 1816 | 1823 |
| 1817 | 1824 |
| 1818 } // namespace compiler | 1825 } // namespace compiler |
| 1819 } // namespace internal | 1826 } // namespace internal |
| 1820 } // namespace v8 | 1827 } // namespace v8 |
| OLD | NEW |