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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 // Checks if {node} has any uses, and therefore code has to be generated for | 122 // Checks if {node} has any uses, and therefore code has to be generated for |
123 // it. | 123 // it. |
124 bool IsUsed(Node* node) const; | 124 bool IsUsed(Node* node) const; |
125 | 125 |
126 // Checks if {node} is currently live. | 126 // Checks if {node} is currently live. |
127 bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); } | 127 bool IsLive(Node* node) const { return !IsDefined(node) && IsUsed(node); } |
128 | 128 |
129 int GetVirtualRegister(const Node* node); | 129 int GetVirtualRegister(const Node* node); |
130 const std::map<NodeId, int> GetVirtualRegistersForTesting() const; | 130 const std::map<NodeId, int> GetVirtualRegistersForTesting() const; |
131 | 131 |
| 132 Isolate* isolate() const { return sequence()->isolate(); } |
| 133 |
132 private: | 134 private: |
133 friend class OperandGenerator; | 135 friend class OperandGenerator; |
134 | 136 |
135 // Inform the instruction selection that {node} was just defined. | 137 // Inform the instruction selection that {node} was just defined. |
136 void MarkAsDefined(Node* node); | 138 void MarkAsDefined(Node* node); |
137 | 139 |
138 // Inform the instruction selection that {node} has at least one use and we | 140 // Inform the instruction selection that {node} has at least one use and we |
139 // will need to generate code for it. | 141 // will need to generate code for it. |
140 void MarkAsUsed(Node* node); | 142 void MarkAsUsed(Node* node); |
141 | 143 |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 BoolVector defined_; | 232 BoolVector defined_; |
231 BoolVector used_; | 233 BoolVector used_; |
232 IntVector virtual_registers_; | 234 IntVector virtual_registers_; |
233 }; | 235 }; |
234 | 236 |
235 } // namespace compiler | 237 } // namespace compiler |
236 } // namespace internal | 238 } // namespace internal |
237 } // namespace v8 | 239 } // namespace v8 |
238 | 240 |
239 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ | 241 #endif // V8_COMPILER_INSTRUCTION_SELECTOR_H_ |
OLD | NEW |