| 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 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| 7 | 7 |
| 8 #include "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
| 9 #include "src/compiler/instruction-selector.h" | 9 #include "src/compiler/instruction-selector.h" |
| 10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 UnallocatedOperand op = UnallocatedOperand( | 121 UnallocatedOperand op = UnallocatedOperand( |
| 122 UnallocatedOperand::MUST_HAVE_REGISTER, | 122 UnallocatedOperand::MUST_HAVE_REGISTER, |
| 123 UnallocatedOperand::USED_AT_START, sequence()->NextVirtualRegister()); | 123 UnallocatedOperand::USED_AT_START, sequence()->NextVirtualRegister()); |
| 124 sequence()->MarkAsDouble(op.virtual_register()); | 124 sequence()->MarkAsDouble(op.virtual_register()); |
| 125 return op; | 125 return op; |
| 126 } | 126 } |
| 127 | 127 |
| 128 InstructionOperand TempRegister(Register reg) { | 128 InstructionOperand TempRegister(Register reg) { |
| 129 return UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER, | 129 return UnallocatedOperand(UnallocatedOperand::FIXED_REGISTER, |
| 130 Register::ToAllocationIndex(reg), | 130 Register::ToAllocationIndex(reg), |
| 131 UnallocatedOperand::kInvalidVirtualRegister); | 131 InstructionOperand::kInvalidVirtualRegister); |
| 132 } | 132 } |
| 133 | 133 |
| 134 InstructionOperand TempImmediate(int32_t imm) { | 134 InstructionOperand TempImmediate(int32_t imm) { |
| 135 int index = sequence()->AddImmediate(Constant(imm)); | 135 int index = sequence()->AddImmediate(Constant(imm)); |
| 136 return ImmediateOperand(index); | 136 return ImmediateOperand(index); |
| 137 } | 137 } |
| 138 | 138 |
| 139 InstructionOperand TempLocation(LinkageLocation location, MachineType type) { | 139 InstructionOperand TempLocation(LinkageLocation location, MachineType type) { |
| 140 return ToUnallocatedOperand(location, type, | 140 return ToUnallocatedOperand(location, type, |
| 141 sequence()->NextVirtualRegister()); | 141 sequence()->NextVirtualRegister()); |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 : (frame_state_descriptor->GetTotalSize() + | 362 : (frame_state_descriptor->GetTotalSize() + |
| 363 1); // Include deopt id. | 363 1); // Include deopt id. |
| 364 } | 364 } |
| 365 }; | 365 }; |
| 366 | 366 |
| 367 } // namespace compiler | 367 } // namespace compiler |
| 368 } // namespace internal | 368 } // namespace internal |
| 369 } // namespace v8 | 369 } // namespace v8 |
| 370 | 370 |
| 371 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 371 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |