class_linker: Add support for resolving method types.
- Add a new fixed size dex cache array for resolved method types.
The size of this array is set to 1024.
- Also introduces a new runtime flag that controls this feature.
Test: make test-art-host
Bug: 30550796
Change-Id: I147b33398d71ee21f2e91b418d3700d4630801ff
diff --git a/runtime/utils/dex_cache_arrays_layout.h b/runtime/utils/dex_cache_arrays_layout.h
index 20ffa90..e222b46 100644
--- a/runtime/utils/dex_cache_arrays_layout.h
+++ b/runtime/utils/dex_cache_arrays_layout.h
@@ -35,6 +35,7 @@
methods_offset_(0u),
strings_offset_(0u),
fields_offset_(0u),
+ method_types_offset_(0u),
size_(0u) {
}
@@ -94,12 +95,23 @@
size_t FieldsAlignment() const;
+ size_t MethodTypesOffset() const {
+ return method_types_offset_;
+ }
+
+ size_t MethodTypeOffset(uint32_t method_type_idx) const;
+
+ size_t MethodTypesSize(size_t num_elements) const;
+
+ size_t MethodTypesAlignment() const;
+
private:
static constexpr size_t types_offset_ = 0u;
const PointerSize pointer_size_; // Must be first for construction initialization order.
const size_t methods_offset_;
const size_t strings_offset_;
const size_t fields_offset_;
+ const size_t method_types_offset_;
const size_t size_;
static size_t Alignment(PointerSize pointer_size);