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

Unified Diff: runtime/vm/exceptions.cc

Issue 2743903002: Revert "Do not rely on code patching on DBC for lazy deoptimization." (Closed)
Patch Set: Created 3 years, 9 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 | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/instructions_dbc.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/exceptions.cc
diff --git a/runtime/vm/exceptions.cc b/runtime/vm/exceptions.cc
index 88eb7c1ee1971299ba7671645ac064b5a27c084c..0ee20ad2f34ddbf796c25f926172cf0440938d47 100644
--- a/runtime/vm/exceptions.cc
+++ b/runtime/vm/exceptions.cc
@@ -209,6 +209,7 @@ static void FindErrorHandler(uword* handler_pc,
static uword RemapExceptionPCForDeopt(Thread* thread,
uword program_counter,
uword frame_pointer) {
+#if !defined(TARGET_ARCH_DBC)
MallocGrowableArray<PendingLazyDeopt>* pending_deopts =
thread->isolate()->pending_deopts();
if (pending_deopts->length() > 0) {
@@ -230,11 +231,13 @@ static uword RemapExceptionPCForDeopt(Thread* thread,
}
}
}
+#endif // !DBC
return program_counter;
}
static void ClearLazyDeopts(Thread* thread, uword frame_pointer) {
+#if !defined(TARGET_ARCH_DBC)
MallocGrowableArray<PendingLazyDeopt>* pending_deopts =
thread->isolate()->pending_deopts();
if (pending_deopts->length() > 0) {
@@ -244,7 +247,7 @@ static void ClearLazyDeopts(Thread* thread, uword frame_pointer) {
{
DartFrameIterator frames(thread);
StackFrame* frame = frames.NextFrame();
- while ((frame != NULL) && IsCalleeFrameOf(frame_pointer, frame->fp())) {
+ while ((frame != NULL) && (frame->fp() < frame_pointer)) {
if (frame->IsMarkedForLazyDeopt()) {
frame->UnmarkForLazyDeopt();
}
@@ -257,7 +260,7 @@ static void ClearLazyDeopts(Thread* thread, uword frame_pointer) {
#endif
for (intptr_t i = 0; i < pending_deopts->length(); i++) {
- if (IsCalleeFrameOf(frame_pointer, (*pending_deopts)[i].fp())) {
+ if ((*pending_deopts)[i].fp() < frame_pointer) {
if (FLAG_trace_deoptimization) {
THR_Print(
"Lazy deopt skipped due to throw for "
@@ -272,6 +275,7 @@ static void ClearLazyDeopts(Thread* thread, uword frame_pointer) {
ValidateFrames();
#endif
}
+#endif // !DBC
}
@@ -297,13 +301,8 @@ void Exceptions::JumpToFrame(Thread* thread,
uword stack_pointer,
uword frame_pointer,
bool clear_deopt_at_target) {
- uword fp_for_clearing = (clear_deopt_at_target
-#if defined(TARGET_ARCH_DBC)
- ? frame_pointer - 1
-#else
- ? frame_pointer + 1
-#endif
- : frame_pointer);
+ uword fp_for_clearing =
+ (clear_deopt_at_target ? frame_pointer + 1 : frame_pointer);
ClearLazyDeopts(thread, fp_for_clearing);
#if defined(USING_SIMULATOR)
// Unwinding of the C++ frames and destroying of their stack resources is done
« no previous file with comments | « runtime/vm/code_patcher_x64.cc ('k') | runtime/vm/instructions_dbc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698