From 0f6af5e3b51a7f5905d09a98ec8d531541666015 Mon Sep 17 00:00:00 2001 From: Nicolas Geoffray Date: Mon, 30 Jan 2023 14:29:11 +0000 Subject: Reland "Write classes in runtime-generated app image." This reverts commit 24b3d648ff6c2c200003f55ac63fc910d7bfd40f. Bug: 260557058 Reason for revert: - Encode class loader context in image, and check it at load time. - Set nterp entrypoint to methods that can. Test: test.py Test: atest com.android.bluetooth.opp.BluetoothOppObexServerSessionTest#onPut_withUnsupportedMimeTypeInHeader_returnsHttpBadRequest Change-Id: Ibf4a8604c4a226d1acc021103668e211446bb53c --- runtime/class_table-inl.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'runtime/class_table-inl.h') diff --git a/runtime/class_table-inl.h b/runtime/class_table-inl.h index 67eeb553a4..ecc8a0a620 100644 --- a/runtime/class_table-inl.h +++ b/runtime/class_table-inl.h @@ -213,6 +213,11 @@ inline ClassTable::TableSlot::TableSlot(ObjPtr klass, uint32_t de DCHECK_EQ(descriptor_hash, klass->DescriptorHash()); } +inline ClassTable::TableSlot::TableSlot(uint32_t ptr, uint32_t descriptor_hash) + : data_(ptr | MaskHash(descriptor_hash)) { + DCHECK_ALIGNED(ptr, kObjectAlignment); +} + template inline void ClassTable::RemoveStrongRoots(const Filter& filter) { WriterMutexLock mu(Thread::Current(), lock_); @@ -227,6 +232,11 @@ inline ObjPtr ClassTable::LookupByDescriptor(ObjPtr