Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Unified Diff: src/isolate.cc

Issue 1416543006: [turbofan] Unwind and jump to the catch handler in the deoptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase, review comments Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/isolate.h ('k') | test/mjsunit/compiler/try-catch-deopt.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index 7e7190bc270f773e935f7f24908a1c57f27e9e91..dada993391a42e2fa1a1bbbd293779854493e349 100644
--- a/src/isolate.cc
+++ b/src/isolate.cc
@@ -1112,6 +1112,13 @@ Object* Isolate::UnwindAndFindHandler() {
// Gather information from the frame.
code = frame->LookupCode();
+ if (code->marked_for_deoptimization()) {
+ // If the target code is lazy deoptimized, we jump to the original
+ // return address, but we make a note that we are throwing, so that
+ // the deoptimizer can do the right thing.
+ offset = static_cast<int>(frame->pc() - code->entry());
+ set_deoptimizer_lazy_throw(true);
+ }
handler_sp = return_sp;
handler_fp = frame->fp();
break;
@@ -1755,7 +1762,6 @@ void Isolate::ThreadDataTable::RemoveAllThreads(Isolate* isolate) {
#define TRACE_ISOLATE(tag)
#endif
-
Isolate::Isolate(bool enable_serializer)
: embedder_data_(),
entry_stack_(NULL),
@@ -1771,6 +1777,7 @@ Isolate::Isolate(bool enable_serializer)
stub_cache_(NULL),
code_aging_helper_(NULL),
deoptimizer_data_(NULL),
+ deoptimizer_lazy_throw_(false),
materialized_object_store_(NULL),
capture_stack_trace_for_uncaught_exceptions_(false),
stack_trace_for_uncaught_exceptions_frame_limit_(0),
« no previous file with comments | « src/isolate.h ('k') | test/mjsunit/compiler/try-catch-deopt.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698