17 delete pending_deopts_;
18 pending_deopts_ =
nullptr;
28 for (intptr_t
i = 0;
i < old_pending_deopts->
length();
i++) {
30 new_pending_deopts->
Add((*old_pending_deopts)[
i]);
33 new_pending_deopts->
Add(deopt);
35 pending_deopts_ = new_pending_deopts;
36 delete old_pending_deopts;
40 for (intptr_t
i = 0;
i < pending_deopts_->length();
i++) {
41 if ((*pending_deopts_)[
i].
fp() ==
fp) {
42 return &(*pending_deopts_)[
i];
49 auto record = FindPendingDeoptRecord(
fp);
50 if (record !=
nullptr) {
53 FATAL(
"Missing pending deopt entry");
58 for (intptr_t
i = pending_deopts_->length() - 1;
i >= 0;
i--) {
59 if ((*pending_deopts_)[
i].
fp() <
fp) {
60 if (FLAG_trace_deoptimization) {
64 "Lazy deopt skipped due to throw for "
65 "fp=%" Pp ", pc=%" Pp "\n",
66 (*pending_deopts_)[
i].
fp(), (*pending_deopts_)[
i].pc());
70 (*pending_deopts_)[
i].
fp(), (*pending_deopts_)[
i].pc());
74 pending_deopts_->RemoveAt(
i);
92 if (program_counter == StubCode::AsyncExceptionHandler().EntryPoint()) {
94 return program_counter;
98 if (FindPendingDeoptRecord(frame_pointer) !=
nullptr) {
106 if (FLAG_trace_deoptimization) {
107 THR_Print(
"Throwing to frame scheduled for lazy deopt fp=%" Pp "\n",
110 return StubCode::DeoptimizeLazyFromThrow().EntryPoint();
113 return program_counter;
static ObjectPtr RawCast(ObjectPtr obj)
uword FindPendingDeopt(uword fp)
void ClearPendingDeoptsBelow(uword fp, ClearReason reason)
void ClearPendingDeoptsAtOrBelow(uword fp, ClearReason reason)
uword RemapExceptionPCForDeopt(uword program_counter, uword frame_pointer, bool *clear_deopt)
void AddPendingDeopt(uword fp, uword pc)
#define THR_Print(format,...)
FrameLayout runtime_frame_layout
constexpr intptr_t kWordSize
DECLARE_FLAG(bool, show_invisible_frames)