| Index: src/x64/lithium-x64.h
|
| ===================================================================
|
| --- src/x64/lithium-x64.h (revision 15993)
|
| +++ src/x64/lithium-x64.h (working copy)
|
| @@ -207,10 +207,10 @@
|
|
|
| class LInstruction: public ZoneObject {
|
| public:
|
| - LInstruction()
|
| - : environment_(NULL),
|
| - hydrogen_value_(NULL),
|
| - is_call_(false) { }
|
| + LInstruction() : environment_(NULL), hydrogen_value_(NULL) {
|
| + bit_field_ = IsCallBits::encode(false) |
|
| + PositionBits::encode(RelocInfo::kNoPosition + 1);
|
| + }
|
|
|
| virtual ~LInstruction() { }
|
|
|
| @@ -250,20 +250,31 @@
|
| LPointerMap* pointer_map() const { return pointer_map_.get(); }
|
| bool HasPointerMap() const { return pointer_map_.is_set(); }
|
|
|
| + // The 31 bits PositionBits is used to store the int position value. And the
|
| + // position value may be RelocInfo::kNoPosition (-1). The accessor always
|
| + // +1/-1 so that the encoded value of position in bit_field_ is always >= 0
|
| + // and can fit into the 31 bits PositionBits.
|
| + void set_position(int pos) {
|
| + bit_field_ = PositionBits::update(bit_field_, pos + 1);
|
| + }
|
| + int position() { return PositionBits::decode(bit_field_) - 1; }
|
| +
|
| void set_hydrogen_value(HValue* value) { hydrogen_value_ = value; }
|
| HValue* hydrogen_value() const { return hydrogen_value_; }
|
|
|
| - void MarkAsCall() { is_call_ = true; }
|
| + void MarkAsCall() { bit_field_ = IsCallBits::update(bit_field_, true); }
|
|
|
| // Interface to the register allocator and iterators.
|
| - bool ClobbersTemps() const { return is_call_; }
|
| - bool ClobbersRegisters() const { return is_call_; }
|
| - bool ClobbersDoubleRegisters() const { return is_call_; }
|
| + bool ClobbersTemps() const { return IsCallBits::decode(bit_field_); }
|
| + bool ClobbersRegisters() const { return IsCallBits::decode(bit_field_); }
|
| + bool ClobbersDoubleRegisters() const {
|
| + return IsCallBits::decode(bit_field_);
|
| + }
|
|
|
| virtual void SetDeferredLazyDeoptimizationEnvironment(LEnvironment* env) { }
|
|
|
| // Interface to the register allocator and iterators.
|
| - bool IsMarkedAsCall() const { return is_call_; }
|
| + bool IsMarkedAsCall() const { return IsCallBits::decode(bit_field_); }
|
|
|
| virtual bool HasResult() const = 0;
|
| virtual LOperand* result() const = 0;
|
| @@ -290,7 +301,9 @@
|
| LEnvironment* environment_;
|
| SetOncePointer<LPointerMap> pointer_map_;
|
| HValue* hydrogen_value_;
|
| - bool is_call_;
|
| + int bit_field_;
|
| + class IsCallBits: public BitField<bool, 0, 1> {};
|
| + class PositionBits: public BitField<int, 1, 31> {};
|
| };
|
|
|
|
|
|
|