Index: vm/object.cc |
=================================================================== |
--- vm/object.cc (revision 12729) |
+++ vm/object.cc (working copy) |
@@ -1434,8 +1434,8 @@ |
ASSERT((state == RawClass::kAllocated) || |
(state == RawClass::kPreFinalized) || |
(state == RawClass::kFinalized)); |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = StateBits::update(state, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ StateBits::update(state, raw_ptr()->state_bits_)); |
} |
@@ -1893,33 +1893,33 @@ |
void Class::set_is_interface() const { |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = InterfaceBit::update(true, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ InterfaceBit::update(true, raw_ptr()->state_bits_)); |
} |
void Class::set_is_abstract() const { |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = AbstractBit::update(true, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ AbstractBit::update(true, raw_ptr()->state_bits_)); |
} |
void Class::set_is_const() const { |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = ConstBit::update(true, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ ConstBit::update(true, raw_ptr()->state_bits_)); |
} |
void Class::set_is_finalized() const { |
ASSERT(!is_finalized()); |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = StateBits::update(RawClass::kFinalized, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ StateBits::update(RawClass::kFinalized, raw_ptr()->state_bits_)); |
} |
void Class::set_is_prefinalized() const { |
ASSERT(!is_finalized()); |
- uword bits = raw_ptr()->state_bits_; |
- raw_ptr()->state_bits_ = StateBits::update(RawClass::kPreFinalized, bits); |
+ raw_ptr()->state_bits_ = static_cast<uint8_t>( |
+ StateBits::update(RawClass::kPreFinalized, raw_ptr()->state_bits_)); |
} |
@@ -4010,26 +4010,22 @@ |
void Function::set_kind(RawFunction::Kind value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = KindBits::update(value, bits); |
+ set_kind_tag(KindBits::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_is_static(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = StaticBit::update(value, bits); |
+ set_kind_tag(StaticBit::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_is_const(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = ConstBit::update(value, bits); |
+ set_kind_tag(ConstBit::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_is_external(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = ExternalBit::update(value, bits); |
+ set_kind_tag(ExternalBit::update(value, raw_ptr()->kind_tag_)); |
} |
@@ -4040,7 +4036,7 @@ |
void Function::set_kind_tag(intptr_t value) const { |
- raw_ptr()->kind_tag_ = value; |
+ raw_ptr()->kind_tag_ = static_cast<uint16_t>(value); |
} |
@@ -4075,26 +4071,22 @@ |
void Function::set_is_optimizable(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = OptimizableBit::update(value, bits); |
+ set_kind_tag(OptimizableBit::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_has_finally(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = HasFinallyBit::update(value, bits); |
+ set_kind_tag(HasFinallyBit::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_is_native(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = NativeBit::update(value, bits); |
+ set_kind_tag(NativeBit::update(value, raw_ptr()->kind_tag_)); |
} |
void Function::set_is_abstract(bool value) const { |
- uword bits = raw_ptr()->kind_tag_; |
- raw_ptr()->kind_tag_ = AbstractBit::update(value, bits); |
+ set_kind_tag(AbstractBit::update(value, raw_ptr()->kind_tag_)); |
} |