summaryrefslogtreecommitdiff
path: root/runtime/mirror/executable.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/mirror/executable.cc')
-rw-r--r--runtime/mirror/executable.cc12
1 files changed, 12 insertions, 0 deletions
diff --git a/runtime/mirror/executable.cc b/runtime/mirror/executable.cc
index 24e2047bed..fac33192e4 100644
--- a/runtime/mirror/executable.cc
+++ b/runtime/mirror/executable.cc
@@ -38,6 +38,18 @@ template bool Executable::CreateFromArtMethod<PointerSize::k32, true>(ArtMethod*
template bool Executable::CreateFromArtMethod<PointerSize::k64, false>(ArtMethod* method);
template bool Executable::CreateFromArtMethod<PointerSize::k64, true>(ArtMethod* method);
+ArtMethod* Executable::GetArtMethod() {
+ return reinterpret_cast<ArtMethod*>(GetField64(ArtMethodOffset()));
+}
+
+template <bool kTransactionActive>
+void Executable::SetArtMethod(ArtMethod* method) {
+ SetField64<kTransactionActive>(ArtMethodOffset(), reinterpret_cast<uint64_t>(method));
+}
+
+template void Executable::SetArtMethod<false>(ArtMethod* method);
+template void Executable::SetArtMethod<true>(ArtMethod* method);
+
mirror::Class* Executable::GetDeclaringClass() {
return GetFieldObject<mirror::Class>(DeclaringClassOffset());
}