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_MIPS_LITHIUM_MIPS_H_ | 5 #ifndef V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ |
6 #define V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ | 6 #define V8_CRANKSHAFT_MIPS_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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
214 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } | 214 void set_pointer_map(LPointerMap* p) { pointer_map_.set(p); } |
215 LPointerMap* pointer_map() const { return pointer_map_.get(); } | 215 LPointerMap* pointer_map() const { return pointer_map_.get(); } |
216 bool HasPointerMap() const { return pointer_map_.is_set(); } | 216 bool HasPointerMap() const { return pointer_map_.is_set(); } |
217 | 217 |
218 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } | 218 void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; } |
219 HValue* hydrogen_value() const { return hydrogen_value_; } | 219 HValue* hydrogen_value() const { return hydrogen_value_; } |
220 | 220 |
221 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } | 221 void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); } |
222 bool IsCall() const { return IsCallBits::decode(bit_field_); } | 222 bool IsCall() const { return IsCallBits::decode(bit_field_); } |
223 | 223 |
224 void MarkAsTailCall() { | |
225 bit_field_ = IsTailCallBits::update(bit_field_, true); | |
226 } | |
227 bool IsTailCall() const { return IsTailCallBits::decode(bit_field_); } | |
228 | |
229 // Interface to the register allocator and iterators. | 224 // Interface to the register allocator and iterators. |
230 bool ClobbersTemps() const { return IsCall(); } | 225 bool ClobbersTemps() const { return IsCall(); } |
231 bool ClobbersRegisters() const { return IsCall(); } | 226 bool ClobbersRegisters() const { return IsCall(); } |
232 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { | 227 virtual bool ClobbersDoubleRegisters(Isolate* isolate) const { |
233 return IsCall(); | 228 return IsCall(); |
234 } | 229 } |
235 | 230 |
236 // Interface to the register allocator and iterators. | 231 // Interface to the register allocator and iterators. |
237 bool IsMarkedAsCall() const { return IsCall(); } | 232 bool IsMarkedAsCall() const { return IsCall(); } |
238 | 233 |
(...skipping 14 matching lines...) Expand all Loading... |
253 | 248 |
254 private: | 249 private: |
255 // Iterator interface. | 250 // Iterator interface. |
256 friend class InputIterator; | 251 friend class InputIterator; |
257 | 252 |
258 friend class TempIterator; | 253 friend class TempIterator; |
259 virtual int TempCount() = 0; | 254 virtual int TempCount() = 0; |
260 virtual LOperand* TempAt(int i) = 0; | 255 virtual LOperand* TempAt(int i) = 0; |
261 | 256 |
262 class IsCallBits: public BitField<bool, 0, 1> {}; | 257 class IsCallBits: public BitField<bool, 0, 1> {}; |
263 class IsTailCallBits : public BitField<bool, IsCallBits::kNext, 1> {}; | |
264 | 258 |
265 LEnvironment* environment_; | 259 LEnvironment* environment_; |
266 SetOncePointer<LPointerMap> pointer_map_; | 260 SetOncePointer<LPointerMap> pointer_map_; |
267 HValue* hydrogen_value_; | 261 HValue* hydrogen_value_; |
268 int bit_field_; | 262 int bit_field_; |
269 }; | 263 }; |
270 | 264 |
271 | 265 |
272 // R = number of result operands (0 or 1). | 266 // R = number of result operands (0 or 1). |
273 template<int R> | 267 template<int R> |
(...skipping 2348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2622 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); | 2616 DISALLOW_COPY_AND_ASSIGN(LChunkBuilder); |
2623 }; | 2617 }; |
2624 | 2618 |
2625 #undef DECLARE_HYDROGEN_ACCESSOR | 2619 #undef DECLARE_HYDROGEN_ACCESSOR |
2626 #undef DECLARE_CONCRETE_INSTRUCTION | 2620 #undef DECLARE_CONCRETE_INSTRUCTION |
2627 | 2621 |
2628 } // namespace internal | 2622 } // namespace internal |
2629 } // namespace v8 | 2623 } // namespace v8 |
2630 | 2624 |
2631 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ | 2625 #endif // V8_CRANKSHAFT_MIPS_LITHIUM_MIPS_H_ |
OLD | NEW |