diff options
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r-- | runtime/quick_exception_handler.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc index 63f43cf3b2..7ba19ab8d6 100644 --- a/runtime/quick_exception_handler.cc +++ b/runtime/quick_exception_handler.cc @@ -17,6 +17,7 @@ #include "quick_exception_handler.h" #include "arch/context.h" +#include "art_code.h" #include "art_method-inl.h" #include "dex_instruction.h" #include "entrypoints/entrypoint_utils.h" @@ -26,6 +27,7 @@ #include "mirror/class-inl.h" #include "mirror/class_loader.h" #include "mirror/throwable.h" +#include "stack_map.h" #include "verifier/method_verifier.h" namespace art { @@ -99,7 +101,7 @@ class CatchBlockStackVisitor FINAL : public StackVisitor { exception_handler_->SetHandlerMethod(method); exception_handler_->SetHandlerDexPc(found_dex_pc); exception_handler_->SetHandlerQuickFramePc( - method->ToNativeQuickPc(found_dex_pc, /* is_catch_handler */ true)); + GetCurrentCode().ToNativeQuickPc(found_dex_pc, /* is_catch_handler */ true)); exception_handler_->SetHandlerQuickFrame(GetCurrentQuickFrame()); return false; // End stack walk. } else if (UNLIKELY(GetThread()->HasDebuggerShadowFrames())) { @@ -159,7 +161,7 @@ void QuickExceptionHandler::FindCatch(mirror::Throwable* exception) { // If the handler is in optimized code, we need to set the catch environment. if (*handler_quick_frame_ != nullptr && handler_method_ != nullptr && - handler_method_->IsOptimized(sizeof(void*))) { + ArtCode(handler_quick_frame_).IsOptimized(sizeof(void*))) { SetCatchEnvironmentForOptimizedHandler(&visitor); } } @@ -200,14 +202,14 @@ static VRegKind ToVRegKind(DexRegisterLocation::Kind kind) { void QuickExceptionHandler::SetCatchEnvironmentForOptimizedHandler(StackVisitor* stack_visitor) { DCHECK(!is_deoptimization_); DCHECK(*handler_quick_frame_ != nullptr) << "Method should not be called on upcall exceptions"; - DCHECK(handler_method_ != nullptr && handler_method_->IsOptimized(sizeof(void*))); + DCHECK(handler_method_ != nullptr && ArtCode(handler_quick_frame_).IsOptimized(sizeof(void*))); if (kDebugExceptionDelivery) { self_->DumpStack(LOG(INFO) << "Setting catch phis: "); } const size_t number_of_vregs = handler_method_->GetCodeItem()->registers_size_; - CodeInfo code_info = handler_method_->GetOptimizedCodeInfo(); + CodeInfo code_info = ArtCode(handler_quick_frame_).GetOptimizedCodeInfo(); StackMapEncoding encoding = code_info.ExtractEncoding(); // Find stack map of the throwing instruction. |