| 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_H_ | 5 #ifndef V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 6 #define V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 | 9 |
| 10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 void EmitLookupSwitch(const SwitchInfo& sw, | 139 void EmitLookupSwitch(const SwitchInfo& sw, |
| 140 InstructionOperand& value_operand); | 140 InstructionOperand& value_operand); |
| 141 | 141 |
| 142 // Inform the instruction selection that {node} was just defined. | 142 // Inform the instruction selection that {node} was just defined. |
| 143 void MarkAsDefined(Node* node); | 143 void MarkAsDefined(Node* node); |
| 144 | 144 |
| 145 // Inform the instruction selection that {node} has at least one use and we | 145 // Inform the instruction selection that {node} has at least one use and we |
| 146 // will need to generate code for it. | 146 // will need to generate code for it. |
| 147 void MarkAsUsed(Node* node); | 147 void MarkAsUsed(Node* node); |
| 148 | 148 |
| 149 // Checks if {node} is marked as double. | |
| 150 bool IsDouble(const Node* node) const; | |
| 151 | |
| 152 // Inform the register allocator of a double result. | |
| 153 void MarkAsDouble(Node* node); | |
| 154 | |
| 155 // Checks if {node} is marked as reference. | |
| 156 bool IsReference(const Node* node) const; | |
| 157 | |
| 158 // Inform the register allocator of a reference result. | |
| 159 void MarkAsReference(Node* node); | |
| 160 | |
| 161 // Inform the register allocation of the representation of the value produced | 149 // Inform the register allocation of the representation of the value produced |
| 162 // by {node}. | 150 // by {node}. |
| 163 void MarkAsRepresentation(MachineType rep, Node* node); | 151 void MarkAsRepresentation(MachineType rep, Node* node); |
| 152 void MarkAsWord32(Node* node) { MarkAsRepresentation(kRepWord32, node); } |
| 153 void MarkAsWord64(Node* node) { MarkAsRepresentation(kRepWord64, node); } |
| 154 void MarkAsFloat32(Node* node) { MarkAsRepresentation(kRepFloat32, node); } |
| 155 void MarkAsFloat64(Node* node) { MarkAsRepresentation(kRepFloat64, node); } |
| 156 void MarkAsReference(Node* node) { MarkAsRepresentation(kRepTagged, node); } |
| 164 | 157 |
| 165 // Inform the register allocation of the representation of the unallocated | 158 // Inform the register allocation of the representation of the unallocated |
| 166 // operand {op}. | 159 // operand {op}. |
| 167 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); | 160 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); |
| 168 | 161 |
| 169 // Initialize the call buffer with the InstructionOperands, nodes, etc, | 162 // Initialize the call buffer with the InstructionOperands, nodes, etc, |
| 170 // corresponding | 163 // corresponding |
| 171 // to the inputs and outputs of the call. | 164 // to the inputs and outputs of the call. |
| 172 // {call_code_immediate} to generate immediate operands to calls of code. | 165 // {call_code_immediate} to generate immediate operands to calls of code. |
| 173 // {call_address_immediate} to generate immediate operands to address calls. | 166 // {call_address_immediate} to generate immediate operands to address calls. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 BoolVector defined_; | 226 BoolVector defined_; |
| 234 BoolVector used_; | 227 BoolVector used_; |
| 235 IntVector virtual_registers_; | 228 IntVector virtual_registers_; |
| 236 }; | 229 }; |
| 237 | 230 |
| 238 } // namespace compiler | 231 } // namespace compiler |
| 239 } // namespace internal | 232 } // namespace internal |
| 240 } // namespace v8 | 233 } // namespace v8 |
| 241 | 234 |
| 242 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 235 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| OLD | NEW |