blob: d5f7597df8da54bc5ec1ba3f27e9cd8dbdd05eba [file] [log] [blame]
Ian Rogers2dd0e2c2013-01-24 12:42:14 -08001/*
2 * Copyright (C) 2011 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Brian Carlstromea46f952013-07-30 01:26:50 -070017#include "art_method.h"
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080018
Brian Carlstromea46f952013-07-30 01:26:50 -070019#include "art_method-inl.h"
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080020#include "base/stringpiece.h"
Ian Rogers4f6ad8a2013-03-18 15:27:28 -070021#include "class-inl.h"
22#include "dex_file-inl.h"
Ian Rogersc449aa82013-07-29 14:35:46 -070023#include "dex_instruction.h"
Ian Rogers1d54e732013-05-02 21:10:01 -070024#include "gc/accounting/card_table-inl.h"
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080025#include "interpreter/interpreter.h"
26#include "jni_internal.h"
Ian Rogers1809a722013-08-09 22:05:32 -070027#include "mapping_table.h"
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080028#include "object-inl.h"
29#include "object_array.h"
30#include "object_array-inl.h"
31#include "string.h"
32#include "object_utils.h"
33
34namespace art {
35namespace mirror {
36
Brian Carlstromea46f952013-07-30 01:26:50 -070037extern "C" void art_portable_invoke_stub(ArtMethod*, uint32_t*, uint32_t, Thread*, JValue*, char);
Ian Rogers0177e532014-02-11 16:30:46 -080038extern "C" void art_quick_invoke_stub(ArtMethod*, uint32_t*, uint32_t, Thread*, JValue*,
39 const char*);
Jeff Hao5d917302013-02-27 17:57:33 -080040
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080041// TODO: get global references for these
Brian Carlstromea46f952013-07-30 01:26:50 -070042Class* ArtMethod::java_lang_reflect_ArtMethod_ = NULL;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080043
Mathieu Chartier83c8ee02014-01-28 14:50:23 -080044void ArtMethod::VisitRoots(RootCallback* callback, void* arg) {
Mathieu Chartierc528dba2013-11-26 12:00:11 -080045 if (java_lang_reflect_ArtMethod_ != nullptr) {
Mathieu Chartier815873e2014-02-13 18:02:13 -080046 callback(reinterpret_cast<mirror::Object**>(&java_lang_reflect_ArtMethod_), arg, 0,
47 kRootStickyClass);
Mathieu Chartierc528dba2013-11-26 12:00:11 -080048 }
49}
50
Ian Rogersef7d42f2014-01-06 12:55:46 -080051InvokeType ArtMethod::GetInvokeType() {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080052 // TODO: kSuper?
53 if (GetDeclaringClass()->IsInterface()) {
54 return kInterface;
55 } else if (IsStatic()) {
56 return kStatic;
57 } else if (IsDirect()) {
58 return kDirect;
59 } else {
60 return kVirtual;
61 }
62}
63
Brian Carlstromea46f952013-07-30 01:26:50 -070064void ArtMethod::SetClass(Class* java_lang_reflect_ArtMethod) {
65 CHECK(java_lang_reflect_ArtMethod_ == NULL);
66 CHECK(java_lang_reflect_ArtMethod != NULL);
67 java_lang_reflect_ArtMethod_ = java_lang_reflect_ArtMethod;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080068}
69
Brian Carlstromea46f952013-07-30 01:26:50 -070070void ArtMethod::ResetClass() {
71 CHECK(java_lang_reflect_ArtMethod_ != NULL);
72 java_lang_reflect_ArtMethod_ = NULL;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080073}
74
Brian Carlstromea46f952013-07-30 01:26:50 -070075void ArtMethod::SetDexCacheStrings(ObjectArray<String>* new_dex_cache_strings) {
Sebastien Hertzd2fe10a2014-01-15 10:20:56 +010076 SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, dex_cache_strings_),
77 new_dex_cache_strings, false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080078}
79
Brian Carlstromea46f952013-07-30 01:26:50 -070080void ArtMethod::SetDexCacheResolvedMethods(ObjectArray<ArtMethod>* new_dex_cache_methods) {
Sebastien Hertzd2fe10a2014-01-15 10:20:56 +010081 SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, dex_cache_resolved_methods_),
82 new_dex_cache_methods, false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080083}
84
Brian Carlstromea46f952013-07-30 01:26:50 -070085void ArtMethod::SetDexCacheResolvedTypes(ObjectArray<Class>* new_dex_cache_classes) {
Sebastien Hertzd2fe10a2014-01-15 10:20:56 +010086 SetFieldObject<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, dex_cache_resolved_types_),
87 new_dex_cache_classes, false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080088}
89
Brian Carlstromea46f952013-07-30 01:26:50 -070090size_t ArtMethod::NumArgRegisters(const StringPiece& shorty) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -080091 CHECK_LE(1, shorty.length());
92 uint32_t num_registers = 0;
93 for (int i = 1; i < shorty.length(); ++i) {
94 char ch = shorty[i];
95 if (ch == 'D' || ch == 'J') {
96 num_registers += 2;
97 } else {
98 num_registers += 1;
99 }
100 }
101 return num_registers;
102}
103
Ian Rogersef7d42f2014-01-06 12:55:46 -0800104bool ArtMethod::IsProxyMethod() {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800105 return GetDeclaringClass()->IsProxyClass();
106}
107
Ian Rogersef7d42f2014-01-06 12:55:46 -0800108ArtMethod* ArtMethod::FindOverriddenMethod() {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800109 if (IsStatic()) {
110 return NULL;
111 }
112 Class* declaring_class = GetDeclaringClass();
113 Class* super_class = declaring_class->GetSuperClass();
114 uint16_t method_index = GetMethodIndex();
Brian Carlstromea46f952013-07-30 01:26:50 -0700115 ObjectArray<ArtMethod>* super_class_vtable = super_class->GetVTable();
116 ArtMethod* result = NULL;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800117 // Did this method override a super class method? If so load the result from the super class'
118 // vtable
119 if (super_class_vtable != NULL && method_index < super_class_vtable->GetLength()) {
120 result = super_class_vtable->Get(method_index);
121 } else {
122 // Method didn't override superclass method so search interfaces
123 if (IsProxyMethod()) {
124 result = GetDexCacheResolvedMethods()->Get(GetDexMethodIndex());
125 CHECK_EQ(result,
126 Runtime::Current()->GetClassLinker()->FindMethodForProxy(GetDeclaringClass(), this));
127 } else {
128 MethodHelper mh(this);
129 MethodHelper interface_mh;
130 IfTable* iftable = GetDeclaringClass()->GetIfTable();
131 for (size_t i = 0; i < iftable->Count() && result == NULL; i++) {
132 Class* interface = iftable->GetInterface(i);
133 for (size_t j = 0; j < interface->NumVirtualMethods(); ++j) {
Brian Carlstromea46f952013-07-30 01:26:50 -0700134 ArtMethod* interface_method = interface->GetVirtualMethod(j);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800135 interface_mh.ChangeMethod(interface_method);
136 if (mh.HasSameNameAndSignature(&interface_mh)) {
137 result = interface_method;
138 break;
139 }
140 }
141 }
142 }
143 }
144#ifndef NDEBUG
145 MethodHelper result_mh(result);
146 DCHECK(result == NULL || MethodHelper(this).HasSameNameAndSignature(&result_mh));
147#endif
148 return result;
149}
150
Ian Rogersef7d42f2014-01-06 12:55:46 -0800151uintptr_t ArtMethod::NativePcOffset(const uintptr_t pc) {
Ian Rogers62d6c772013-02-27 08:32:07 -0800152 const void* code = Runtime::Current()->GetInstrumentation()->GetQuickCodeFor(this);
153 return pc - reinterpret_cast<uintptr_t>(code);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800154}
155
Ian Rogersef7d42f2014-01-06 12:55:46 -0800156uint32_t ArtMethod::ToDexPc(const uintptr_t pc) {
157 if (IsPortableCompiled()) {
158 // Portable doesn't use the machine pc, we just use dex pc instead.
159 return static_cast<uint32_t>(pc);
160 }
Ian Rogers1809a722013-08-09 22:05:32 -0700161 MappingTable table(GetMappingTable());
162 if (table.TotalSize() == 0) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800163 DCHECK(IsNative() || IsCalleeSaveMethod() || IsProxyMethod()) << PrettyMethod(this);
164 return DexFile::kDexNoIndex; // Special no mapping case
165 }
Ian Rogers62d6c772013-02-27 08:32:07 -0800166 const void* code = Runtime::Current()->GetInstrumentation()->GetQuickCodeFor(this);
167 uint32_t sought_offset = pc - reinterpret_cast<uintptr_t>(code);
Ian Rogers1809a722013-08-09 22:05:32 -0700168 // Assume the caller wants a pc-to-dex mapping so check here first.
169 typedef MappingTable::PcToDexIterator It;
170 for (It cur = table.PcToDexBegin(), end = table.PcToDexEnd(); cur != end; ++cur) {
171 if (cur.NativePcOffset() == sought_offset) {
172 return cur.DexPc();
173 }
174 }
175 // Now check dex-to-pc mappings.
176 typedef MappingTable::DexToPcIterator It2;
177 for (It2 cur = table.DexToPcBegin(), end = table.DexToPcEnd(); cur != end; ++cur) {
178 if (cur.NativePcOffset() == sought_offset) {
179 return cur.DexPc();
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800180 }
181 }
Ian Rogers62d6c772013-02-27 08:32:07 -0800182 LOG(FATAL) << "Failed to find Dex offset for PC offset " << reinterpret_cast<void*>(sought_offset)
Ian Rogersef7d42f2014-01-06 12:55:46 -0800183 << "(PC " << reinterpret_cast<void*>(pc) << ", code=" << code
184 << ") in " << PrettyMethod(this);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800185 return DexFile::kDexNoIndex;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800186}
187
Ian Rogersef7d42f2014-01-06 12:55:46 -0800188uintptr_t ArtMethod::ToNativePc(const uint32_t dex_pc) {
Ian Rogers1809a722013-08-09 22:05:32 -0700189 MappingTable table(GetMappingTable());
190 if (table.TotalSize() == 0) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800191 DCHECK_EQ(dex_pc, 0U);
192 return 0; // Special no mapping/pc == 0 case
193 }
Ian Rogers1809a722013-08-09 22:05:32 -0700194 // Assume the caller wants a dex-to-pc mapping so check here first.
195 typedef MappingTable::DexToPcIterator It;
196 for (It cur = table.DexToPcBegin(), end = table.DexToPcEnd(); cur != end; ++cur) {
197 if (cur.DexPc() == dex_pc) {
Ian Rogers62d6c772013-02-27 08:32:07 -0800198 const void* code = Runtime::Current()->GetInstrumentation()->GetQuickCodeFor(this);
Ian Rogers1809a722013-08-09 22:05:32 -0700199 return reinterpret_cast<uintptr_t>(code) + cur.NativePcOffset();
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800200 }
201 }
Ian Rogers1809a722013-08-09 22:05:32 -0700202 // Now check pc-to-dex mappings.
203 typedef MappingTable::PcToDexIterator It2;
204 for (It2 cur = table.PcToDexBegin(), end = table.PcToDexEnd(); cur != end; ++cur) {
205 if (cur.DexPc() == dex_pc) {
206 const void* code = Runtime::Current()->GetInstrumentation()->GetQuickCodeFor(this);
207 return reinterpret_cast<uintptr_t>(code) + cur.NativePcOffset();
208 }
209 }
210 LOG(FATAL) << "Failed to find native offset for dex pc 0x" << std::hex << dex_pc
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800211 << " in " << PrettyMethod(this);
212 return 0;
213}
214
Brian Carlstromea46f952013-07-30 01:26:50 -0700215uint32_t ArtMethod::FindCatchBlock(Class* exception_type, uint32_t dex_pc,
Ian Rogersef7d42f2014-01-06 12:55:46 -0800216 bool* has_no_move_exception) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800217 MethodHelper mh(this);
218 const DexFile::CodeItem* code_item = mh.GetCodeItem();
Ian Rogers9e8f45e2013-07-31 10:58:53 -0700219 // Default to handler not found.
220 uint32_t found_dex_pc = DexFile::kDexNoIndex;
221 // Iterate over the catch handlers associated with dex_pc.
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800222 for (CatchHandlerIterator it(*code_item, dex_pc); it.HasNext(); it.Next()) {
223 uint16_t iter_type_idx = it.GetHandlerTypeIndex();
224 // Catch all case
225 if (iter_type_idx == DexFile::kDexNoIndex16) {
Ian Rogers9e8f45e2013-07-31 10:58:53 -0700226 found_dex_pc = it.GetHandlerAddress();
227 break;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800228 }
229 // Does this catch exception type apply?
230 Class* iter_exception_type = mh.GetDexCacheResolvedType(iter_type_idx);
231 if (iter_exception_type == NULL) {
232 // The verifier should take care of resolving all exception classes early
233 LOG(WARNING) << "Unresolved exception class when finding catch block: "
Ian Rogers9e8f45e2013-07-31 10:58:53 -0700234 << mh.GetTypeDescriptorFromTypeIdx(iter_type_idx);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800235 } else if (iter_exception_type->IsAssignableFrom(exception_type)) {
Ian Rogers9e8f45e2013-07-31 10:58:53 -0700236 found_dex_pc = it.GetHandlerAddress();
237 break;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800238 }
239 }
Ian Rogers9e8f45e2013-07-31 10:58:53 -0700240 if (found_dex_pc != DexFile::kDexNoIndex) {
241 const Instruction* first_catch_instr =
242 Instruction::At(&mh.GetCodeItem()->insns_[found_dex_pc]);
243 *has_no_move_exception = (first_catch_instr->Opcode() != Instruction::MOVE_EXCEPTION);
244 }
245 return found_dex_pc;
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800246}
247
Brian Carlstromea46f952013-07-30 01:26:50 -0700248void ArtMethod::Invoke(Thread* self, uint32_t* args, uint32_t args_size, JValue* result,
Ian Rogers0177e532014-02-11 16:30:46 -0800249 const char* shorty) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800250 if (kIsDebugBuild) {
251 self->AssertThreadSuspensionIsAllowable();
252 CHECK_EQ(kRunnable, self->GetState());
Ian Rogers0177e532014-02-11 16:30:46 -0800253 CHECK_STREQ(MethodHelper(this).GetShorty(), shorty);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800254 }
255
256 // Push a transition back into managed code onto the linked list in thread.
257 ManagedStack fragment;
258 self->PushManagedStackFragment(&fragment);
259
Ian Rogers62d6c772013-02-27 08:32:07 -0800260 Runtime* runtime = Runtime::Current();
Jeff Hao74180ca2013-03-27 15:29:11 -0700261 // Call the invoke stub, passing everything as arguments.
Brian Carlstrom2ce745c2013-07-17 17:44:30 -0700262 if (UNLIKELY(!runtime->IsStarted())) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800263 LOG(INFO) << "Not invoking " << PrettyMethod(this) << " for a runtime that isn't started";
264 if (result != NULL) {
265 result->SetJ(0);
266 }
267 } else {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800268 const bool kLogInvocationStartAndReturn = false;
Ian Rogersef7d42f2014-01-06 12:55:46 -0800269 bool have_quick_code = GetEntryPointFromQuickCompiledCode() != nullptr;
270 bool have_portable_code = GetEntryPointFromPortableCompiledCode() != nullptr;
271 if (LIKELY(have_quick_code || have_portable_code)) {
Jeff Hao790ad902013-05-22 15:02:08 -0700272 if (kLogInvocationStartAndReturn) {
Ian Rogersef7d42f2014-01-06 12:55:46 -0800273 LOG(INFO) << StringPrintf("Invoking '%s' %s code=%p", PrettyMethod(this).c_str(),
274 have_quick_code ? "quick" : "portable",
275 have_quick_code ? GetEntryPointFromQuickCompiledCode()
276 : GetEntryPointFromPortableCompiledCode());
Jeff Hao790ad902013-05-22 15:02:08 -0700277 }
Ian Rogersef7d42f2014-01-06 12:55:46 -0800278 if (!IsPortableCompiled()) {
Ian Rogers0177e532014-02-11 16:30:46 -0800279 (*art_quick_invoke_stub)(this, args, args_size, self, result, shorty);
Ian Rogersef7d42f2014-01-06 12:55:46 -0800280 } else {
Ian Rogers0177e532014-02-11 16:30:46 -0800281 (*art_portable_invoke_stub)(this, args, args_size, self, result, shorty[0]);
Ian Rogersef7d42f2014-01-06 12:55:46 -0800282 }
283 if (UNLIKELY(reinterpret_cast<intptr_t>(self->GetException(NULL)) == -1)) {
Jeff Hao790ad902013-05-22 15:02:08 -0700284 // Unusual case where we were running LLVM generated code and an
285 // exception was thrown to force the activations to be removed from the
286 // stack. Continue execution in the interpreter.
287 self->ClearException();
288 ShadowFrame* shadow_frame = self->GetAndClearDeoptimizationShadowFrame(result);
289 self->SetTopOfStack(NULL, 0);
290 self->SetTopOfShadowStack(shadow_frame);
291 interpreter::EnterInterpreterFromDeoptimize(self, shadow_frame, result);
292 }
293 if (kLogInvocationStartAndReturn) {
Ian Rogersef7d42f2014-01-06 12:55:46 -0800294 LOG(INFO) << StringPrintf("Returned '%s' %s code=%p", PrettyMethod(this).c_str(),
295 have_quick_code ? "quick" : "portable",
296 have_quick_code ? GetEntryPointFromQuickCompiledCode()
297 : GetEntryPointFromPortableCompiledCode());
Jeff Hao5d917302013-02-27 17:57:33 -0800298 }
299 } else {
Ian Rogersef7d42f2014-01-06 12:55:46 -0800300 LOG(INFO) << "Not invoking '" << PrettyMethod(this) << "' code=null";
Jeff Hao5d917302013-02-27 17:57:33 -0800301 if (result != NULL) {
302 result->SetJ(0);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800303 }
304 }
305 }
306
307 // Pop transition.
308 self->PopManagedStackFragment(fragment);
309}
310
Ian Rogersef7d42f2014-01-06 12:55:46 -0800311bool ArtMethod::IsRegistered() {
312 void* native_method =
313 GetFieldPtr<void*>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, entry_point_from_jni_), false);
314 CHECK(native_method != nullptr);
Jeff Hao79fe5392013-04-24 18:41:58 -0700315 void* jni_stub = GetJniDlsymLookupStub();
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800316 return native_method != jni_stub;
317}
318
Ian Rogers848871b2013-08-05 10:56:33 -0700319extern "C" void art_work_around_app_jni_bugs(JNIEnv*, jobject);
Ian Rogers1eb512d2013-10-18 15:42:20 -0700320void ArtMethod::RegisterNative(Thread* self, const void* native_method, bool is_fast) {
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800321 DCHECK(Thread::Current() == self);
322 CHECK(IsNative()) << PrettyMethod(this);
Ian Rogers1eb512d2013-10-18 15:42:20 -0700323 CHECK(!IsFastNative()) << PrettyMethod(this);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800324 CHECK(native_method != NULL) << PrettyMethod(this);
325 if (!self->GetJniEnv()->vm->work_around_app_jni_bugs) {
Ian Rogers1eb512d2013-10-18 15:42:20 -0700326 if (is_fast) {
327 SetAccessFlags(GetAccessFlags() | kAccFastNative);
328 }
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800329 SetNativeMethod(native_method);
330 } else {
331 // We've been asked to associate this method with the given native method but are working
332 // around JNI bugs, that include not giving Object** SIRT references to native methods. Direct
333 // the native method to runtime support and store the target somewhere runtime support will
334 // find it.
Ian Rogersef7d42f2014-01-06 12:55:46 -0800335#if defined(__i386__) || defined(__x86_64__)
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800336 UNIMPLEMENTED(FATAL);
Ian Rogers848871b2013-08-05 10:56:33 -0700337#else
338 SetNativeMethod(reinterpret_cast<void*>(art_work_around_app_jni_bugs));
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800339#endif
Sebastien Hertzd2fe10a2014-01-15 10:20:56 +0100340 SetFieldPtr<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, gc_map_),
341 reinterpret_cast<const uint8_t*>(native_method), false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800342 }
343}
344
Brian Carlstromea46f952013-07-30 01:26:50 -0700345void ArtMethod::UnregisterNative(Thread* self) {
Ian Rogers1eb512d2013-10-18 15:42:20 -0700346 CHECK(IsNative() && !IsFastNative()) << PrettyMethod(this);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800347 // restore stub to lookup native pointer via dlsym
Ian Rogers1eb512d2013-10-18 15:42:20 -0700348 RegisterNative(self, GetJniDlsymLookupStub(), false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800349}
350
Brian Carlstromea46f952013-07-30 01:26:50 -0700351void ArtMethod::SetNativeMethod(const void* native_method) {
Sebastien Hertzd2fe10a2014-01-15 10:20:56 +0100352 SetFieldPtr<false>(OFFSET_OF_OBJECT_MEMBER(ArtMethod, entry_point_from_jni_),
353 native_method, false);
Ian Rogers2dd0e2c2013-01-24 12:42:14 -0800354}
355
356} // namespace mirror
357} // namespace art