Move code item to the data pointer and remove code_item_offset.
This saves 4 bytes on 32bit and 8 bytes on 64bit on ArtMethod.
Also update nterp to directly fetch the code item from the data pointer.
Test: test.py
Bug: 112676029
Change-Id: Ic01f43c7ccf2cbce1ec517478e81362232d36371
diff --git a/runtime/cha.cc b/runtime/cha.cc
index a142723..c345af8 100644
--- a/runtime/cha.cc
+++ b/runtime/cha.cc
@@ -543,7 +543,8 @@
// Abstract method starts with single-implementation flag set and null
// implementation method.
method->SetHasSingleImplementation(true);
- DCHECK(method->GetSingleImplementation(pointer_size) == nullptr);
+ DCHECK(!method->HasCodeItem()) << method->PrettyMethod();
+ DCHECK(method->GetSingleImplementation(pointer_size) == nullptr) << method->PrettyMethod();
}
// Default conflicting methods cannot be treated with single implementations,
// as we need to call them (and not inline them) in case of ICCE.