summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generation_data.cc
diff options
context:
space:
mode:
author Almaz Mingaleev <mingaleev@google.com> 2024-01-30 14:07:27 +0000
committer Almaz Mingaleev <mingaleev@google.com> 2024-04-11 12:38:25 +0000
commit53ca944020bb86199f6f80d8594d5deb1b1d46dd (patch)
tree2898b11cbcd41c3e907de9c08b4031047a8d5187 /compiler/optimizing/code_generation_data.cc
parenta7bc7cbf3182cb5c66f7cf36611c0389e7b7cc0f (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_generation_data.cc')
-rw-r--r--compiler/optimizing/code_generation_data.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/compiler/optimizing/code_generation_data.cc b/compiler/optimizing/code_generation_data.cc
index 7b23d46dc5..afc4f62f0f 100644
--- a/compiler/optimizing/code_generation_data.cc
+++ b/compiler/optimizing/code_generation_data.cc
@@ -20,6 +20,7 @@
#include "intern_table.h"
#include "mirror/object-inl.h"
#include "runtime.h"
+#include "well_known_classes-inl.h"
namespace art HIDDEN {
@@ -52,6 +53,16 @@ void CodeGenerationData::EmitJitRoots(
entry.second = index;
++index;
}
+ for (auto& entry : jit_method_type_roots_) {
+ // Update the `roots` with the MethodType, and replace the address temporarily
+ // stored to the index in the table.
+ uint64_t address = entry.second;
+ roots->emplace_back(reinterpret_cast<StackReference<mirror::Object>*>(address));
+ DCHECK(roots->back() != nullptr);
+ DCHECK(roots->back()->InstanceOf(WellKnownClasses::java_lang_invoke_MethodType.Get()));
+ entry.second = index;
+ ++index;
+ }
}
} // namespace art