mirror of
https://github.com/dart-lang/sdk
synced 2024-09-15 23:19:47 +00:00
[ VM ] Don't check if an interpreted frame is marked for lazy deopt
Checking if an interpreted frame is marked for lazy deopt while preparing to handle an exception was causing an assert to be hit. We can skip this check for interpreted frames. Fixes https://github.com/dart-lang/sdk/issues/38003. Change-Id: Icea65868c6291864df93920fa25236bcc36fded5 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115268 Reviewed-by: Alexander Markov <alexmarkov@google.com> Commit-Queue: Ben Konyi <bkonyi@google.com>
This commit is contained in:
parent
8e63413fff
commit
1dfba01a3e
|
@ -515,12 +515,16 @@ static void ClearLazyDeopts(Thread* thread, uword frame_pointer) {
|
||||||
{
|
{
|
||||||
DartFrameIterator frames(thread,
|
DartFrameIterator frames(thread,
|
||||||
StackFrameIterator::kNoCrossThreadIteration);
|
StackFrameIterator::kNoCrossThreadIteration);
|
||||||
StackFrame* frame = frames.NextFrame();
|
for (StackFrame* frame = frames.NextFrame(); frame != nullptr;
|
||||||
while ((frame != NULL) && (frame->fp() < frame_pointer)) {
|
frame = frames.NextFrame()) {
|
||||||
|
if (frame->is_interpreted()) {
|
||||||
|
continue;
|
||||||
|
} else if (frame->fp() >= frame_pointer) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (frame->IsMarkedForLazyDeopt()) {
|
if (frame->IsMarkedForLazyDeopt()) {
|
||||||
frame->UnmarkForLazyDeopt();
|
frame->UnmarkForLazyDeopt();
|
||||||
}
|
}
|
||||||
frame = frames.NextFrame();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ class StackFrame : public ValueObject {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uword IsMarkedForLazyDeopt() const {
|
bool IsMarkedForLazyDeopt() const {
|
||||||
ASSERT(!is_interpreted());
|
ASSERT(!is_interpreted());
|
||||||
uword raw_pc =
|
uword raw_pc =
|
||||||
*reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize));
|
*reinterpret_cast<uword*>(sp() + (kSavedPcSlotFromSp * kWordSize));
|
||||||
|
|
Loading…
Reference in a new issue