Reland^2 "Add consistency CHECKs around ArtMethod fields."
This reverts commit 5945de03b6f6b35bcf6a575b2291e29ae7a2b1ee.
Reason for revert: CL can land now after
https://android-review.googlesource.com/c/platform/art/+/1246288
Bug: 146765723
Change-Id: I237b1e171d94d47a39b21ec8b33cffa0b087b285
diff --git a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
index 5356637..b04f26e 100644
--- a/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
+++ b/runtime/entrypoints/quick/quick_trampoline_entrypoints.cc
@@ -2493,6 +2493,10 @@
// We arrive here if we have found an implementation, and it is not in the ImtConflictTable.
// We create a new table with the new pair { interface_method, method }.
DCHECK(conflict_method->IsRuntimeMethod());
+
+ // Classes in the boot image should never need to update conflict methods in
+ // their IMT.
+ CHECK(!Runtime::Current()->GetHeap()->ObjectIsInBootImageSpace(cls.Get())) << cls->PrettyClass();
ArtMethod* new_conflict_method = Runtime::Current()->GetClassLinker()->AddMethodToConflictTable(
cls.Get(),
conflict_method,