summaryrefslogtreecommitdiff
path: root/runtime/quick_exception_handler.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2019-12-04 16:18:15 +0000
committerNicolas Geoffray <ngeoffray@google.com>2019-12-17 09:43:08 +0000
commit013d1ee96b928f3bda9031e94d4a69f827133ce6 (patch)
tree4e374c043330f123dc3888922b554fd1291349b4 /runtime/quick_exception_handler.cc
parent9ca8b2bf46978e3a5698f8a27b48aa7eff3514df (diff)
Introduce the notion of an nterp frame.
See comments in nterp_helpers.cc. An nterp frame follows the calling conventions and exception handling of the compiler. There are no ManagedStack transitions, and the compiler and interpreter can just call each other directly. For the stack walker, an nterp frame looks like a compiled frame. This CL introduces an nterp frame, another CL will contain an implementation for x64. Bug: 119800099 Test: test.py Change-Id: Ie9b691f58908b7f283b4cd63b84b651526155d27
Diffstat (limited to 'runtime/quick_exception_handler.cc')
-rw-r--r--runtime/quick_exception_handler.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/runtime/quick_exception_handler.cc b/runtime/quick_exception_handler.cc
index 727bdf02e1..0e04b7b696 100644
--- a/runtime/quick_exception_handler.cc
+++ b/runtime/quick_exception_handler.cc
@@ -33,6 +33,7 @@
#include "mirror/class-inl.h"
#include "mirror/class_loader.h"
#include "mirror/throwable.h"
+#include "nterp_helpers.h"
#include "oat_quick_method_header.h"
#include "stack.h"
#include "stack_map.h"
@@ -663,6 +664,12 @@ void QuickExceptionHandler::DoLongJump(bool smash_caller_saves) {
if (smash_caller_saves) {
context_->SmashCallerSaves();
}
+ if (handler_method_ != nullptr &&
+ handler_method_header_ != nullptr &&
+ handler_method_header_->IsNterpMethodHeader()) {
+ context_->SetNterpDexPC(reinterpret_cast<uintptr_t>(
+ handler_method_->DexInstructions().Insns() + handler_dex_pc_));
+ }
context_->DoLongJump();
UNREACHABLE();
}