Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Unified Diff: runtime/vm/object.h

Issue 23494014: - Reapply change r26880. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
===================================================================
--- runtime/vm/object.h (revision 26931)
+++ runtime/vm/object.h (working copy)
@@ -2952,18 +2952,15 @@
intptr_t pointer_offsets_length() const {
return raw_ptr()->pointer_offsets_length_;
}
+
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());
@@ -3135,6 +3132,17 @@
RawArray* ExtractTypeFeedbackArray() const;
private:
+ void set_state_bits(intptr_t bits) const;
+
+ 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:
« no previous file with comments | « runtime/vm/exceptions.cc ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698