OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 5 #ifndef V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 6 #define V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
7 | 7 |
8 #include "src/crankshaft/hydrogen.h" | 8 #include "src/crankshaft/hydrogen.h" |
9 #include "src/crankshaft/lithium.h" | 9 #include "src/crankshaft/lithium.h" |
10 #include "src/crankshaft/lithium-allocator.h" | 10 #include "src/crankshaft/lithium-allocator.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 218 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
219 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 219 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
220 bool HasPointerMap() const { return pointer_map_.is_set(); } | 220 bool HasPointerMap() const { return pointer_map_.is_set(); } |
221 | 221 |
222 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 222 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
223 HValue* hydrogen_value() const { return hydrogen_value_; } | 223 HValue* hydrogen_value() const { return hydrogen_value_; } |
224 | 224 |
225 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 225 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
226 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 226 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
227 | 227 |
228 void MarkAsTailCall() { | |
229 bit_field_ = IsTailCallBits::update(bit_field_, true); | |
230 } | |
231 bool IsTailCall() const { return IsTailCallBits::decode(bit_field_); } | |
232 | |
233 // Interface to the register allocator and iterators. | 228 // Interface to the register allocator and iterators. |
234 bool ClobbersTemps() const { return IsCall(); } | 229 bool ClobbersTemps() const { return IsCall(); } |
235 bool ClobbersRegisters() const { return IsCall(); } | 230 bool ClobbersRegisters() const { return IsCall(); } |
236 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 231 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
237 return IsCall(); | 232 return IsCall(); |
238 } | 233 } |
239 | 234 |
240 virtual bool HasResult() const = 0; | 235 virtual bool HasResult() const = 0; |
241 virtual LOperand* result() const = 0; | 236 virtual LOperand* result() const = 0; |
242 | 237 |
(...skipping 14 matching lines...) Expand all Loading... |
257 | 252 |
258 private: | 253 private: |
259 // Iterator support. | 254 // Iterator support. |
260 friend class InputIterator; | 255 friend class InputIterator; |
261 | 256 |
262 friend class TempIterator; | 257 friend class TempIterator; |
263 virtual int TempCount() = 0; | 258 virtual int TempCount() = 0; |
264 virtual LOperand* TempAt(int i) = 0; | 259 virtual LOperand* TempAt(int i) = 0; |
265 | 260 |
266 class IsCallBits: public BitField<bool, 0, 1> {}; | 261 class IsCallBits: public BitField<bool, 0, 1> {}; |
267 class IsTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {}; | |
268 | 262 |
269 LEnvironment* environment_; | 263 LEnvironment* environment_; |
270 SetOncePointer<LPointerMap> pointer_map_; | 264 SetOncePointer<LPointerMap> pointer_map_; |
271 HValue* hydrogen_value_; | 265 HValue* hydrogen_value_; |
272 int bit_field_; | 266 int bit_field_; |
273 }; | 267 }; |
274 | 268 |
275 | 269 |
276 // R = number of result operands (0 or 1). | 270 // R = number of result operands (0 or 1). |
277 template<int R> | 271 template<int R> |
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2656 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2663 }; | 2657 }; |
2664 | 2658 |
2665 #undef DECLARE_HYDROGEN_ACCESSOR | 2659 #undef DECLARE_HYDROGEN_ACCESSOR |
2666 #undef DECLARE_CONCRETE_INSTRUCTION | 2660 #undef DECLARE_CONCRETE_INSTRUCTION |
2667 | 2661 |
2668 } // namespace internal | 2662 } // namespace internal |
2669 } // namespace v8 | 2663 } // namespace v8 |
2670 | 2664 |
2671 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ | 2665 #endif // V8_CRANKSHAFT_IA32_LITHIUM_IA32_H_ |
OLD | NEW |