Chromium Code Reviews| Index: runtime/vm/object.h |
| =================================================================== |
| --- runtime/vm/object.h (revision 26823) |
| +++ runtime/vm/object.h (working copy) |
| @@ -2943,18 +2943,17 @@ |
| intptr_t pointer_offsets_length() const { |
| return raw_ptr()->pointer_offsets_length_; |
| } |
| + |
| + void set_state_bits(intptr_t bits) const; |
|
siva
2013/08/29 16:29:20
Does this have to be a public method?
srdjan
2013/08/29 16:38:13
Made private.
|
| + |
| bool is_optimized() const { |
| - return (raw_ptr()->is_optimized_ == 1); |
| + return OptimizedBit::decode(raw_ptr()->state_bits_); |
| } |
| - void set_is_optimized(bool value) const { |
| - raw_ptr()->is_optimized_ = value ? 1 : 0; |
| - } |
| + void set_is_optimized(bool value) const; |
| bool is_alive() const { |
| - return (raw_ptr()->is_alive_ == 1); |
| + return AliveBit::decode(raw_ptr()->state_bits_); |
| } |
| - void set_is_alive(bool value) const { |
| - raw_ptr()->is_alive_ = value ? 1 : 0; |
| - } |
| + void set_is_alive(bool value) const; |
| uword EntryPoint() const { |
| const Instructions& instr = Instructions::Handle(instructions()); |
| @@ -3126,6 +3125,15 @@ |
| RawArray* ExtractTypeFeedbackArray() const; |
| private: |
| + friend class RawCode; |
| + enum { |
| + kOptimizedBit = 0, |
| + kAliveBit = 1, |
| + }; |
| + |
| + class OptimizedBit : public BitField<bool, kOptimizedBit, 1> {}; |
| + class AliveBit : public BitField<bool, kAliveBit, 1> {}; |
| + |
| // An object finder visitor interface. |
| class FindRawCodeVisitor : public FindObjectVisitor { |
| public: |