Chromium Code Reviews| 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 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 157 void MarkAsWord32(Node* node) { MarkAsRepresentation(kRepWord32, node); } | 157 void MarkAsWord32(Node* node) { MarkAsRepresentation(kRepWord32, node); } |
| 158 void MarkAsWord64(Node* node) { MarkAsRepresentation(kRepWord64, node); } | 158 void MarkAsWord64(Node* node) { MarkAsRepresentation(kRepWord64, node); } |
| 159 void MarkAsFloat32(Node* node) { MarkAsRepresentation(kRepFloat32, node); } | 159 void MarkAsFloat32(Node* node) { MarkAsRepresentation(kRepFloat32, node); } |
| 160 void MarkAsFloat64(Node* node) { MarkAsRepresentation(kRepFloat64, node); } | 160 void MarkAsFloat64(Node* node) { MarkAsRepresentation(kRepFloat64, node); } |
| 161 void MarkAsReference(Node* node) { MarkAsRepresentation(kRepTagged, node); } | 161 void MarkAsReference(Node* node) { MarkAsRepresentation(kRepTagged, node); } |
| 162 | 162 |
| 163 // Inform the register allocation of the representation of the unallocated | 163 // Inform the register allocation of the representation of the unallocated |
| 164 // operand {op}. | 164 // operand {op}. |
| 165 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); | 165 void MarkAsRepresentation(MachineType rep, const InstructionOperand& op); |
| 166 | 166 |
| 167 enum CallBufferFlags { | |
| 168 CALL_CODE_IMMEDIATE = 1, | |
| 169 CALL_ADDRESS_IMMEDIATE = 2, | |
| 170 CALL_TAIL = 4 | |
| 171 }; | |
|
Jarin
2015/11/13 10:42:49
Please use "typedef base::Flags<CallBufferFlags> C
danno
2015/11/13 11:54:11
Done.
| |
| 172 | |
| 167 // Initialize the call buffer with the InstructionOperands, nodes, etc, | 173 // Initialize the call buffer with the InstructionOperands, nodes, etc, |
| 168 // corresponding | 174 // corresponding |
| 169 // to the inputs and outputs of the call. | 175 // to the inputs and outputs of the call. |
| 170 // {call_code_immediate} to generate immediate operands to calls of code. | 176 // {call_code_immediate} to generate immediate operands to calls of code. |
| 171 // {call_address_immediate} to generate immediate operands to address calls. | 177 // {call_address_immediate} to generate immediate operands to address calls. |
| 172 void InitializeCallBuffer(Node* call, CallBuffer* buffer, | 178 void InitializeCallBuffer(Node* call, CallBuffer* buffer, |
| 173 bool call_code_immediate, | 179 CallBufferFlags flags, int stack_param_delta = 0); |
| 174 bool call_address_immediate); | |
| 175 bool IsTailCallAddressImmediate(); | 180 bool IsTailCallAddressImmediate(); |
| 176 | 181 |
| 177 FrameStateDescriptor* GetFrameStateDescriptor(Node* node); | 182 FrameStateDescriptor* GetFrameStateDescriptor(Node* node); |
| 178 | 183 |
| 179 // =========================================================================== | 184 // =========================================================================== |
| 180 // ============= Architecture-specific graph covering methods. =============== | 185 // ============= Architecture-specific graph covering methods. =============== |
| 181 // =========================================================================== | 186 // =========================================================================== |
| 182 | 187 |
| 183 // Visit nodes in the given block and generate code. | 188 // Visit nodes in the given block and generate code. |
| 184 void VisitBlock(BasicBlock* block); | 189 void VisitBlock(BasicBlock* block); |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 236 BoolVector defined_; | 241 BoolVector defined_; |
| 237 BoolVector used_; | 242 BoolVector used_; |
| 238 IntVector virtual_registers_; | 243 IntVector virtual_registers_; |
| 239 }; | 244 }; |
| 240 | 245 |
| 241 } // namespace compiler | 246 } // namespace compiler |
| 242 } // namespace internal | 247 } // namespace internal |
| 243 } // namespace v8 | 248 } // namespace v8 |
| 244 | 249 |
| 245 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 250 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
| OLD | NEW |