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

Unified Diff: runtime/vm/raw_object.h

Issue 1644223006: Fix some more shorten-64-to-32 warnings: (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address review comments. Created 4 years, 11 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/profiler.h ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object.h
diff --git a/runtime/vm/raw_object.h b/runtime/vm/raw_object.h
index 67520f58a96937cd6a608905302b7f91702c8eb0..f4b07eb8e0d8846be9418a2ed12efd705a0b3e63 100644
--- a/runtime/vm/raw_object.h
+++ b/runtime/vm/raw_object.h
@@ -285,7 +285,8 @@ class RawObject {
private:
// The actual unscaled bit field used within the tag field.
- class SizeBits : public BitField<intptr_t, kSizeTagPos, kSizeTagSize> {};
+ class SizeBits :
+ public BitField<uword, intptr_t, kSizeTagPos, kSizeTagSize> {};
static intptr_t SizeToTagValue(intptr_t size) {
ASSERT(Utils::IsAligned(size, kObjectAlignment));
@@ -297,7 +298,7 @@ class RawObject {
};
class ClassIdTag :
- public BitField<intptr_t, kClassIdTagPos, kClassIdTagSize> {}; // NOLINT
+ public BitField<uword, intptr_t, kClassIdTagPos, kClassIdTagSize> {};
bool IsWellFormed() const {
uword value = reinterpret_cast<uword>(this);
@@ -497,18 +498,18 @@ class RawObject {
private:
uword tags_; // Various object tags (bits).
- class WatchedBit : public BitField<bool, kWatchedBit, 1> {};
+ class WatchedBit : public BitField<uword, bool, kWatchedBit, 1> {};
- class MarkBit : public BitField<bool, kMarkBit, 1> {};
+ class MarkBit : public BitField<uword, bool, kMarkBit, 1> {};
- class RememberedBit : public BitField<bool, kRememberedBit, 1> {};
+ class RememberedBit : public BitField<uword, bool, kRememberedBit, 1> {};
- class CanonicalObjectTag : public BitField<bool, kCanonicalBit, 1> {};
+ class CanonicalObjectTag : public BitField<uword, bool, kCanonicalBit, 1> {};
- class VMHeapObjectTag : public BitField<bool, kVMHeapObjectBit, 1> {};
+ class VMHeapObjectTag : public BitField<uword, bool, kVMHeapObjectBit, 1> {};
class ReservedBits : public
- BitField<intptr_t, kReservedTagPos, kReservedTagSize> {}; // NOLINT
+ BitField<uword, intptr_t, kReservedTagPos, kReservedTagSize> {};
// TODO(koda): After handling tags_, return const*, like Object::raw_ptr().
RawObject* ptr() const {
@@ -1274,8 +1275,8 @@ class RawLocalVarDescriptors : public RawObject {
kMaxIndex = (1 << (kIndexSize - 1)) - 1,
};
- class IndexBits : public BitField<int32_t, kIndexPos, kIndexSize> {};
- class KindBits : public BitField<int8_t, kKindPos, kKindSize>{};
+ class IndexBits : public BitField<int32_t, int32_t, kIndexPos, kIndexSize> {};
+ class KindBits : public BitField<int32_t, int8_t, kKindPos, kKindSize>{};
struct VarInfo {
int32_t index_kind; // Bitfield for slot index on stack or in context,
« no previous file with comments | « runtime/vm/profiler.h ('k') | runtime/vm/snapshot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698