diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc index 91f9984d9a3..cde8d18a730 100644 --- a/runtime/vm/compiler/backend/slot.cc +++ b/runtime/vm/compiler/backend/slot.cc @@ -331,7 +331,10 @@ const Slot& Slot::GetCanonicalSlot(Thread* thread, FieldGuardState::FieldGuardState(const Field& field) : state_(GuardedCidBits::encode(field.guarded_cid()) | - IsNullableBit::encode(field.is_nullable())) {} + IsNullableBit::encode(field.is_nullable())) { + ASSERT(compiler::target::UntaggedObject::kClassIdTagSize <= + GuardedCidBits::bitsize()); +} const Slot& Slot::Get(const Field& field, const ParsedFunction* parsed_function) { diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h index cc5b6349841..06832c59900 100644 --- a/runtime/vm/compiler/backend/slot.h +++ b/runtime/vm/compiler/backend/slot.h @@ -241,7 +241,7 @@ class FieldGuardState { bool is_nullable() const { return IsNullableBit::decode(state_); } private: - using GuardedCidBits = BitField; + using GuardedCidBits = BitField; using IsNullableBit = BitField; const int32_t state_;