diff options
author | 2024-01-30 14:07:27 +0000 | |
---|---|---|
committer | 2024-04-11 12:38:25 +0000 | |
commit | 53ca944020bb86199f6f80d8594d5deb1b1d46dd (patch) | |
tree | 2898b11cbcd41c3e907de9c08b4031047a8d5187 /compiler/optimizing/code_generator.cc | |
parent | a7bc7cbf3182cb5c66f7cf36611c0389e7b7cc0f (diff) |
x86_64: Add JIT support for LoadMethodType.
In aosp/2876518 JIT code made runtime calls.
Bug: 297147201
Test: ./art/test/testrunner/testrunner.py --host --64 --jit -b
Test: ./art/test/testrunner/testrunner.py --host --64 -b
Test: ./art/test.py --host -b
Change-Id: Ifdfd3ace9419b34f8079c9ec4b1b2de31cb50ef7
Diffstat (limited to 'compiler/optimizing/code_generator.cc')
-rw-r--r-- | compiler/optimizing/code_generator.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc index 88bd818b0c..51714ef548 100644 --- a/compiler/optimizing/code_generator.cc +++ b/compiler/optimizing/code_generator.cc @@ -16,6 +16,7 @@ #include "code_generator.h" #include "base/globals.h" +#include "mirror/method_type.h" #ifdef ART_ENABLE_CODEGEN_arm #include "code_generator_arm_vixl.h" @@ -209,11 +210,23 @@ uint64_t CodeGenerator::GetJitClassRootIndex(TypeReference type_reference) { return code_generation_data_->GetJitClassRootIndex(type_reference); } +void CodeGenerator::ReserveJitMethodTypeRoot(ProtoReference proto_reference, + Handle<mirror::MethodType> method_type) { + DCHECK(code_generation_data_ != nullptr); + code_generation_data_->ReserveJitMethodTypeRoot(proto_reference, method_type); +} + +uint64_t CodeGenerator::GetJitMethodTypeRootIndex(ProtoReference proto_reference) { + DCHECK(code_generation_data_ != nullptr); + return code_generation_data_->GetJitMethodTypeRootIndex(proto_reference); +} + void CodeGenerator::EmitJitRootPatches([[maybe_unused]] uint8_t* code, [[maybe_unused]] const uint8_t* roots_data) { DCHECK(code_generation_data_ != nullptr); DCHECK_EQ(code_generation_data_->GetNumberOfJitStringRoots(), 0u); DCHECK_EQ(code_generation_data_->GetNumberOfJitClassRoots(), 0u); + DCHECK_EQ(code_generation_data_->GetNumberOfJitMethodTypeRoots(), 0u); } uint32_t CodeGenerator::GetArrayLengthOffset(HArrayLength* array_length) { |