| 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/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
| 9 #include "src/compiler/instruction.h" | 9 #include "src/compiler/instruction.h" |
| 10 #include "src/compiler/instruction-selector.h" | 10 #include "src/compiler/instruction-selector.h" |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 48 int virtual_register = sequence()->AddConstant(node, ToConstant(node)); | 48 int virtual_register = sequence()->AddConstant(node, ToConstant(node)); |
| 49 return ConstantOperand::Create(virtual_register, zone()); | 49 return ConstantOperand::Create(virtual_register, zone()); |
| 50 } | 50 } |
| 51 | 51 |
| 52 InstructionOperand* DefineAsLocation(Node* node, LinkageLocation location, | 52 InstructionOperand* DefineAsLocation(Node* node, LinkageLocation location, |
| 53 MachineType type) { | 53 MachineType type) { |
| 54 return Define(node, ToUnallocatedOperand(location, type)); | 54 return Define(node, ToUnallocatedOperand(location, type)); |
| 55 } | 55 } |
| 56 | 56 |
| 57 InstructionOperand* Use(Node* node) { | 57 InstructionOperand* Use(Node* node) { |
| 58 return Use(node, | 58 return Use( |
| 59 new (zone()) UnallocatedOperand( | 59 node, new (zone()) UnallocatedOperand( |
| 60 UnallocatedOperand::ANY, UnallocatedOperand::USED_AT_START)); | 60 UnallocatedOperand::NONE, UnallocatedOperand::USED_AT_START)); |
| 61 } | 61 } |
| 62 | 62 |
| 63 InstructionOperand* UseRegister(Node* node) { | 63 InstructionOperand* UseRegister(Node* node) { |
| 64 return Use(node, new (zone()) | 64 return Use(node, new (zone()) |
| 65 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, | 65 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER, |
| 66 UnallocatedOperand::USED_AT_START)); | 66 UnallocatedOperand::USED_AT_START)); |
| 67 } | 67 } |
| 68 | 68 |
| 69 // Use register or operand for the node. If a register is chosen, it won't | 69 // Use register or operand for the node. If a register is chosen, it won't |
| 70 // alias any temporary or output registers. | 70 // alias any temporary or output registers. |
| 71 InstructionOperand* UseUnique(Node* node) { | 71 InstructionOperand* UseUnique(Node* node) { |
| 72 return Use(node, new (zone()) UnallocatedOperand(UnallocatedOperand::ANY)); | 72 return Use(node, new (zone()) UnallocatedOperand(UnallocatedOperand::NONE)); |
| 73 } | 73 } |
| 74 | 74 |
| 75 // Use a unique register for the node that does not alias any temporary or | 75 // Use a unique register for the node that does not alias any temporary or |
| 76 // output registers. | 76 // output registers. |
| 77 InstructionOperand* UseUniqueRegister(Node* node) { | 77 InstructionOperand* UseUniqueRegister(Node* node) { |
| 78 return Use(node, new (zone()) | 78 return Use(node, new (zone()) |
| 79 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)); | 79 UnallocatedOperand(UnallocatedOperand::MUST_HAVE_REGISTER)); |
| 80 } | 80 } |
| 81 | 81 |
| 82 InstructionOperand* UseFixed(Node* node, Register reg) { | 82 InstructionOperand* UseFixed(Node* node, Register reg) { |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 : (frame_state_descriptor->GetTotalSize() + | 356 : (frame_state_descriptor->GetTotalSize() + |
| 357 1); // Include deopt id. | 357 1); // Include deopt id. |
| 358 } | 358 } |
| 359 }; | 359 }; |
| 360 | 360 |
| 361 } // namespace compiler | 361 } // namespace compiler |
| 362 } // namespace internal | 362 } // namespace internal |
| 363 } // namespace v8 | 363 } // namespace v8 |
| 364 | 364 |
| 365 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ | 365 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_IMPL_H_ |
| OLD | NEW |