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

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: Remove the hack signpost 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
Index: src/isolate.cc
diff --git a/src/isolate.cc b/src/isolate.cc
index e0f2b1df329e7cb7dcb466ea3a242b6c2522b36c..806304f1f59c6924f0f101b918e5884434c74897 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),

Powered by Google App Engine
This is Rietveld 408576698