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

Unified Diff: runtime/vm/raw_object.h

Issue 259393002: Enums cleanup. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 8 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/object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
===================================================================
--- runtime/vm/raw_object.h (revision 35558)
+++ runtime/vm/raw_object.h (working copy)
@@ -233,12 +233,12 @@
kCanonicalBit = 2,
kFromSnapshotBit = 3,
kRememberedBit = 4,
- kReservedTagBit = 5, // kReservedBit{10K,100K,1M,10M}
+ kReservedTagPos = 5, // kReservedBit{10K,100K,1M,10M}
kReservedTagSize = 3,
- kSizeTagBit = 8,
+ kSizeTagPos = kReservedTagPos + kReservedTagSize, // = 8
kSizeTagSize = 8,
- kClassIdTagBit = kSizeTagBit + kSizeTagSize,
- kClassIdTagSize = 16
+ kClassIdTagPos = kSizeTagPos + kSizeTagSize, // = 16
+ kClassIdTagSize = 16,
};
// Encodes the object size in the tag in units of object alignment.
@@ -261,7 +261,7 @@
private:
// The actual unscaled bit field used within the tag field.
- class SizeBits : public BitField<intptr_t, kSizeTagBit, kSizeTagSize> {};
+ class SizeBits : public BitField<intptr_t, kSizeTagPos, kSizeTagSize> {};
static intptr_t SizeToTagValue(intptr_t size) {
ASSERT(Utils::IsAligned(size, kObjectAlignment));
@@ -272,9 +272,8 @@
}
};
- class ClassIdTag : public BitField<intptr_t,
- kClassIdTagBit,
- kClassIdTagSize> {}; // NOLINT
+ class ClassIdTag :
+ public BitField<intptr_t, kClassIdTagPos, kClassIdTagSize> {}; // NOLINT
bool IsHeapObject() const {
uword value = reinterpret_cast<uword>(this);
@@ -424,9 +423,8 @@
class CreatedFromSnapshotTag : public BitField<bool, kFromSnapshotBit, 1> {};
- class ReservedBits : public BitField<intptr_t,
- kReservedTagBit,
- kReservedTagSize> {}; // NOLINT
+ class ReservedBits : public
+ BitField<intptr_t, kReservedTagPos, kReservedTagSize> {}; // NOLINT
RawObject* ptr() const {
ASSERT(IsHeapObject());
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698