diff options
Diffstat (limited to 'runtime/art_method.cc')
-rw-r--r-- | runtime/art_method.cc | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/runtime/art_method.cc b/runtime/art_method.cc index 0b6b883bab..c8b16990b2 100644 --- a/runtime/art_method.cc +++ b/runtime/art_method.cc @@ -795,18 +795,16 @@ void ArtMethod::CopyFrom(ArtMethod* src, PointerSize image_pointer_size) { const void* entry_point = GetEntryPointFromQuickCompiledCodePtrSize(image_pointer_size); if (runtime->UseJitCompilation()) { if (runtime->GetJit()->GetCodeCache()->ContainsPc(entry_point)) { - SetNativePointer(EntryPointFromQuickCompiledCodeOffset(image_pointer_size), - src->IsNative() ? GetQuickGenericJniStub() : GetQuickToInterpreterBridge(), - image_pointer_size); + SetEntryPointFromQuickCompiledCodePtrSize( + src->IsNative() ? GetQuickGenericJniStub() : GetQuickToInterpreterBridge(), + image_pointer_size); } } ClassLinker* class_linker = Runtime::Current()->GetClassLinker(); if (interpreter::IsNterpSupported() && class_linker->IsNterpEntryPoint(entry_point)) { // If the entrypoint is nterp, it's too early to check if the new method // will support it. So for simplicity, use the interpreter bridge. - SetNativePointer(EntryPointFromQuickCompiledCodeOffset(image_pointer_size), - GetQuickToInterpreterBridge(), - image_pointer_size); + SetEntryPointFromQuickCompiledCodePtrSize(GetQuickToInterpreterBridge(), image_pointer_size); } // Clear the data pointer, it will be set if needed by the caller. @@ -924,20 +922,4 @@ ALWAYS_INLINE static inline void DoGetAccessFlagsHelper(ArtMethod* method) method->GetDeclaringClass<kReadBarrierOption>()->IsErroneous()); } -void ArtMethod::SetEntryPointFromQuickCompiledCodePtrSize( - const void* entry_point_from_quick_compiled_code, PointerSize pointer_size) { - const void* current_entry_point = GetEntryPointFromQuickCompiledCodePtrSize(pointer_size); - if (current_entry_point == entry_point_from_quick_compiled_code) { - return; - } - jit::Jit* jit = Runtime::Current()->GetJit(); - SetNativePointer(EntryPointFromQuickCompiledCodeOffset(pointer_size), - entry_point_from_quick_compiled_code, - pointer_size); - if (jit != nullptr && - jit->GetCodeCache()->ContainsPc(current_entry_point)) { - jit->GetCodeCache()->AddZombieCode(this, current_entry_point); - } -} - } // namespace art |