Move some DexFile checks to debug build only.
Change-Id: I6dae8345c47b610eca0c6820587639a435c83225
diff --git a/runtime/dex_file.h b/runtime/dex_file.h
index 76947e5..a60a139 100644
--- a/runtime/dex_file.h
+++ b/runtime/dex_file.h
@@ -209,7 +209,7 @@
}
const TypeItem& GetTypeItem(uint32_t idx) const {
- CHECK_LT(idx, this->size_);
+ DCHECK_LT(idx, this->size_);
return this->list_[idx];
}
@@ -494,7 +494,7 @@
// Returns the FieldId at the specified index.
const FieldId& GetFieldId(uint32_t idx) const {
- CHECK_LT(idx, NumFieldIds()) << GetLocation();
+ DCHECK_LT(idx, NumFieldIds()) << GetLocation();
return field_ids_[idx];
}
@@ -585,7 +585,7 @@
// Returns the ClassDef at the specified index.
const ClassDef& GetClassDef(uint32_t idx) const {
- CHECK_LT(idx, NumClassDefs()) << GetLocation();
+ DCHECK_LT(idx, NumClassDefs()) << GetLocation();
return class_defs_[idx];
}
@@ -1025,7 +1025,7 @@
if (pos_ < EndOfInstanceFieldsPos()) {
return last_idx_ + field_.field_idx_delta_;
} else {
- CHECK_LT(pos_, EndOfVirtualMethodsPos());
+ DCHECK_LT(pos_, EndOfVirtualMethodsPos());
return last_idx_ + method_.method_idx_delta_;
}
}
@@ -1033,7 +1033,7 @@
if (pos_ < EndOfInstanceFieldsPos()) {
return field_.access_flags_;
} else {
- CHECK_LT(pos_, EndOfVirtualMethodsPos());
+ DCHECK_LT(pos_, EndOfVirtualMethodsPos());
return method_.access_flags_;
}
}
@@ -1045,7 +1045,7 @@
return kDirect;
}
} else {
- CHECK_EQ(GetMemberAccessFlags() & kAccStatic, 0U);
+ DCHECK_EQ(GetMemberAccessFlags() & kAccStatic, 0U);
if ((class_def.access_flags_ & kAccInterface) != 0) {
return kInterface;
} else if ((GetMemberAccessFlags() & kAccConstructor) != 0) {