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_MIPS64_LITHIUM_MIPS_H_ | 5 #ifndef V8_CRANKSHAFT_MIPS64_LITHIUM_MIPS_H_ |
6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_MIPS_H_ | 6 #define V8_CRANKSHAFT_MIPS64_LITHIUM_MIPS_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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 217 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
218 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 218 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
219 bool HasPointerMap() const { return pointer_map_.is_set(); } | 219 bool HasPointerMap() const { return pointer_map_.is_set(); } |
220 | 220 |
221 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 221 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
222 HValue* hydrogen_value() const { return hydrogen_value_; } | 222 HValue* hydrogen_value() const { return hydrogen_value_; } |
223 | 223 |
224 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 224 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
225 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 225 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
226 | 226 |
| 227 void MarkAsTailCall() { |
| 228 bit_field_ = IsTailCallBits::update(bit_field_, true); |
| 229 } |
| 230 bool IsTailCall() const { return IsTailCallBits::decode(bit_field_); } |
| 231 |
227 // Interface to the register allocator and iterators. | 232 // Interface to the register allocator and iterators. |
228 bool ClobbersTemps() const { return IsCall(); } | 233 bool ClobbersTemps() const { return IsCall(); } |
229 bool ClobbersRegisters() const { return IsCall(); } | 234 bool ClobbersRegisters() const { return IsCall(); } |
230 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 235 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
231 return IsCall(); | 236 return IsCall(); |
232 } | 237 } |
233 | 238 |
234 // Interface to the register allocator and iterators. | 239 // Interface to the register allocator and iterators. |
235 bool IsMarkedAsCall() const { return IsCall(); } | 240 bool IsMarkedAsCall() const { return IsCall(); } |
236 | 241 |
(...skipping 14 matching lines...) Expand all Loading... |
251 | 256 |
252 private: | 257 private: |
253 // Iterator interface. | 258 // Iterator interface. |
254 friend class InputIterator; | 259 friend class InputIterator; |
255 | 260 |
256 friend class TempIterator; | 261 friend class TempIterator; |
257 virtual int TempCount() = 0; | 262 virtual int TempCount() = 0; |
258 virtual LOperand* TempAt(int i) = 0; | 263 virtual LOperand* TempAt(int i) = 0; |
259 | 264 |
260 class IsCallBits: public BitField<bool, 0, 1> {}; | 265 class IsCallBits: public BitField<bool, 0, 1> {}; |
| 266 class IsTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {}; |
261 | 267 |
262 LEnvironment* environment_; | 268 LEnvironment* environment_; |
263 SetOncePointer<LPointerMap> pointer_map_; | 269 SetOncePointer<LPointerMap> pointer_map_; |
264 HValue* hydrogen_value_; | 270 HValue* hydrogen_value_; |
265 int bit_field_; | 271 int bit_field_; |
266 }; | 272 }; |
267 | 273 |
268 | 274 |
269 // R = number of result operands (0 or 1). | 275 // R = number of result operands (0 or 1). |
270 template<int R> | 276 template<int R> |
(...skipping 2391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2668 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2663 }; | 2669 }; |
2664 | 2670 |
2665 #undef DECLARE_HYDROGEN_ACCESSOR | 2671 #undef DECLARE_HYDROGEN_ACCESSOR |
2666 #undef DECLARE_CONCRETE_INSTRUCTION | 2672 #undef DECLARE_CONCRETE_INSTRUCTION |
2667 | 2673 |
2668 } // namespace internal | 2674 } // namespace internal |
2669 } // namespace v8 | 2675 } // namespace v8 |
2670 | 2676 |
2671 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_MIPS_H_ | 2677 #endif // V8_CRANKSHAFT_MIPS64_LITHIUM_MIPS_H_ |
OLD | NEW |