| 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 1019 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1030 void InstructionSelector::VisitThrow(Node* value) { | 1030 void InstructionSelector::VisitThrow(Node* value) { |
| 1031 OperandGenerator g(this); | 1031 OperandGenerator g(this); |
| 1032 Emit(kArchNop, g.NoOutput()); // TODO(titzer) | 1032 Emit(kArchNop, g.NoOutput()); // TODO(titzer) |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 | 1035 |
| 1036 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( | 1036 FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor( |
| 1037 Node* state) { | 1037 Node* state) { |
| 1038 DCHECK(state->opcode() == IrOpcode::kFrameState); | 1038 DCHECK(state->opcode() == IrOpcode::kFrameState); |
| 1039 DCHECK_EQ(kFrameStateInputCount, state->InputCount()); | 1039 DCHECK_EQ(kFrameStateInputCount, state->InputCount()); |
| 1040 FrameStateCallInfo state_info = OpParameter<FrameStateCallInfo>(state); | 1040 FrameStateInfo state_info = OpParameter<FrameStateInfo>(state); |
| 1041 | 1041 |
| 1042 int parameters = static_cast<int>( | 1042 int parameters = static_cast<int>( |
| 1043 StateValuesAccess(state->InputAt(kFrameStateParametersInput)).size()); | 1043 StateValuesAccess(state->InputAt(kFrameStateParametersInput)).size()); |
| 1044 int locals = static_cast<int>( | 1044 int locals = static_cast<int>( |
| 1045 StateValuesAccess(state->InputAt(kFrameStateLocalsInput)).size()); | 1045 StateValuesAccess(state->InputAt(kFrameStateLocalsInput)).size()); |
| 1046 int stack = static_cast<int>( | 1046 int stack = static_cast<int>( |
| 1047 StateValuesAccess(state->InputAt(kFrameStateStackInput)).size()); | 1047 StateValuesAccess(state->InputAt(kFrameStateStackInput)).size()); |
| 1048 | 1048 |
| 1049 DCHECK_EQ(parameters, state_info.parameter_count()); |
| 1050 DCHECK_EQ(locals, state_info.local_count()); |
| 1051 |
| 1049 FrameStateDescriptor* outer_state = NULL; | 1052 FrameStateDescriptor* outer_state = NULL; |
| 1050 Node* outer_node = state->InputAt(kFrameStateOuterStateInput); | 1053 Node* outer_node = state->InputAt(kFrameStateOuterStateInput); |
| 1051 if (outer_node->opcode() == IrOpcode::kFrameState) { | 1054 if (outer_node->opcode() == IrOpcode::kFrameState) { |
| 1052 outer_state = GetFrameStateDescriptor(outer_node); | 1055 outer_state = GetFrameStateDescriptor(outer_node); |
| 1053 } | 1056 } |
| 1054 | 1057 |
| 1055 return new (instruction_zone()) FrameStateDescriptor( | 1058 return new (instruction_zone()) FrameStateDescriptor( |
| 1056 instruction_zone(), state_info.type(), state_info.bailout_id(), | 1059 instruction_zone(), state_info.type(), state_info.bailout_id(), |
| 1057 state_info.state_combine(), parameters, locals, stack, | 1060 state_info.state_combine(), parameters, locals, stack, |
| 1058 state_info.shared_info(), outer_state); | 1061 state_info.shared_info(), outer_state); |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1152 MachineOperatorBuilder::Flags | 1155 MachineOperatorBuilder::Flags |
| 1153 InstructionSelector::SupportedMachineOperatorFlags() { | 1156 InstructionSelector::SupportedMachineOperatorFlags() { |
| 1154 return MachineOperatorBuilder::Flag::kNoFlags; | 1157 return MachineOperatorBuilder::Flag::kNoFlags; |
| 1155 } | 1158 } |
| 1156 | 1159 |
| 1157 #endif // !V8_TURBOFAN_BACKEND | 1160 #endif // !V8_TURBOFAN_BACKEND |
| 1158 | 1161 |
| 1159 } // namespace compiler | 1162 } // namespace compiler |
| 1160 } // namespace internal | 1163 } // namespace internal |
| 1161 } // namespace v8 | 1164 } // namespace v8 |
| OLD | NEW |