diff options
author | 2024-11-26 10:40:13 +0000 | |
---|---|---|
committer | 2024-12-09 08:05:53 +0000 | |
commit | ba201d247dbcf4c30a9c05d29ea51fe8639732e4 (patch) | |
tree | adeceded6df7783b5ec66b3e99be0827ccb29281 /compiler/optimizing/jit_patches_arm64.h | |
parent | 1be926562ae7f1d28f2d4504aee3a0eca9dcba17 (diff) |
Revert^2 "arm64: Store resolved MethodType-s in .bss."
This reverts commit fad4678f3ae48d84b7ed1c842b03a023e4f2cb37.
Bug: 380651440
bug: 297147201
Test: atest CtsLibcoreOjTestCases on a redfin device flashed
Test: with ab/12108082: test crashes w/o WriteBarrier line
Test: and passes w/ it.
Change-Id: Ibdfc090e3c2b693c1bb3b160a64c9f94448e18ec
Diffstat (limited to 'compiler/optimizing/jit_patches_arm64.h')
-rw-r--r-- | compiler/optimizing/jit_patches_arm64.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/compiler/optimizing/jit_patches_arm64.h b/compiler/optimizing/jit_patches_arm64.h index f5d92804ac..e13060210a 100644 --- a/compiler/optimizing/jit_patches_arm64.h +++ b/compiler/optimizing/jit_patches_arm64.h @@ -20,10 +20,12 @@ #include "base/arena_allocator.h" #include "base/arena_containers.h" #include "dex/dex_file.h" +#include "dex/proto_reference.h" #include "dex/string_reference.h" #include "dex/type_reference.h" #include "handle.h" #include "mirror/class.h" +#include "mirror/method_type.h" #include "mirror/string.h" #include "utils/arm64/assembler_arm64.h" @@ -56,7 +58,9 @@ class JitPatchesARM64 { jit_string_patches_(StringReferenceValueComparator(), allocator->Adapter(kArenaAllocCodeGenerator)), jit_class_patches_(TypeReferenceValueComparator(), - allocator->Adapter(kArenaAllocCodeGenerator)) { + allocator->Adapter(kArenaAllocCodeGenerator)), + jit_method_type_patches_(ProtoReferenceValueComparator(), + allocator->Adapter(kArenaAllocCodeGenerator)) { } using Uint64ToLiteralMap = ArenaSafeMap<uint64_t, vixl::aarch64::Literal<uint64_t>*>; @@ -67,6 +71,9 @@ class JitPatchesARM64 { using TypeToLiteralMap = ArenaSafeMap<TypeReference, vixl::aarch64::Literal<uint32_t>*, TypeReferenceValueComparator>; + using ProtoToLiteralMap = ArenaSafeMap<ProtoReference, + vixl::aarch64::Literal<uint32_t>*, + ProtoReferenceValueComparator>; vixl::aarch64::Literal<uint32_t>* DeduplicateUint32Literal(uint32_t value); vixl::aarch64::Literal<uint64_t>* DeduplicateUint64Literal(uint64_t value); @@ -81,6 +88,11 @@ class JitPatchesARM64 { dex::TypeIndex type_index, Handle<mirror::Class> handle, CodeGenerationData* code_generation_data); + vixl::aarch64::Literal<uint32_t>* DeduplicateJitMethodTypeLiteral( + const DexFile& dex_file, + dex::ProtoIndex proto_index, + Handle<mirror::MethodType> handle, + CodeGenerationData* code_generation_data); void EmitJitRootPatches(uint8_t* code, const uint8_t* roots_data, @@ -99,6 +111,8 @@ class JitPatchesARM64 { StringToLiteralMap jit_string_patches_; // Patches for class literals in JIT compiled code. TypeToLiteralMap jit_class_patches_; + // Patches for MethodType literals in JIT compiled code. + ProtoToLiteralMap jit_method_type_patches_; }; } // namespace arm64 |