Index: vm/object.h |
=================================================================== |
--- vm/object.h (revision 12729) |
+++ vm/object.h (working copy) |
@@ -1802,8 +1802,8 @@ |
return HasInitializerBit::decode(raw_ptr()->kind_bits_); |
} |
void set_has_initializer(bool has_initializer) const { |
- uword bits = raw_ptr()->kind_bits_; |
- raw_ptr()->kind_bits_ = HasInitializerBit::update(has_initializer, bits); |
+ raw_ptr()->kind_bits_ = static_cast<uint8_t>( |
+ HasInitializerBit::update(has_initializer, raw_ptr()->kind_bits_)); |
} |
// Constructs getter and setter names for fields and vice versa. |
@@ -1830,16 +1830,13 @@ |
void set_name(const String& value) const; |
void set_is_static(bool is_static) const { |
- uword bits = raw_ptr()->kind_bits_; |
- raw_ptr()->kind_bits_ = StaticBit::update(is_static, bits); |
+ set_kind_bits(StaticBit::update(is_static, raw_ptr()->kind_bits_)); |
} |
void set_is_final(bool is_final) const { |
- uword bits = raw_ptr()->kind_bits_; |
- raw_ptr()->kind_bits_ = FinalBit::update(is_final, bits); |
+ set_kind_bits(FinalBit::update(is_final, raw_ptr()->kind_bits_)); |
} |
void set_is_const(bool value) const { |
- uword bits = raw_ptr()->kind_bits_; |
- raw_ptr()->kind_bits_ = ConstBit::update(value, bits); |
+ set_kind_bits(ConstBit::update(value, raw_ptr()->kind_bits_)); |
} |
void set_owner(const Class& value) const { |
StorePointer(&raw_ptr()->owner_, value.raw()); |
@@ -1848,7 +1845,7 @@ |
raw_ptr()->token_pos_ = token_pos; |
} |
void set_kind_bits(intptr_t value) const { |
- raw_ptr()->kind_bits_ = value; |
+ raw_ptr()->kind_bits_ = static_cast<uint8_t>(value); |
} |
static RawField* New(); |
@@ -1935,7 +1932,7 @@ |
intptr_t ReadToken() { |
int64_t value = stream_.ReadUnsigned(); |
ASSERT((value >= 0) && (value <= kIntptrMax)); |
- return value; |
+ return static_cast<intptr_t>(value); |
} |
const TokenStream& tokens_; |