#include <pending_deopts.h>
Definition at line 28 of file pending_deopts.h.
◆ ClearReason
Enumerator |
---|
kClearDueToThrow | |
kClearDueToDeopt | |
Definition at line 30 of file pending_deopts.h.
◆ PendingDeopts()
dart::PendingDeopts::PendingDeopts |
( |
| ) |
|
Definition at line 14 of file pending_deopts.cc.
15 : pending_deopts_(new MallocGrowableArray<PendingLazyDeopt>()) {}
◆ ~PendingDeopts()
dart::PendingDeopts::~PendingDeopts |
( |
| ) |
|
Definition at line 16 of file pending_deopts.cc.
16 {
17 delete pending_deopts_;
18 pending_deopts_ = nullptr;
19}
◆ AddPendingDeopt()
void dart::PendingDeopts::AddPendingDeopt |
( |
uword |
fp, |
|
|
uword |
pc |
|
) |
| |
Definition at line 21 of file pending_deopts.cc.
21 {
22
23
24 MallocGrowableArray<PendingLazyDeopt>* old_pending_deopts = pending_deopts_;
25 MallocGrowableArray<PendingLazyDeopt>* new_pending_deopts =
26 new MallocGrowableArray<PendingLazyDeopt>(old_pending_deopts->length() +
27 1);
28 for (intptr_t
i = 0;
i < old_pending_deopts->length();
i++) {
30 new_pending_deopts->Add((*old_pending_deopts)[
i]);
31 }
32 PendingLazyDeopt deopt(
fp, pc);
33 new_pending_deopts->Add(deopt);
34
35 pending_deopts_ = new_pending_deopts;
36 delete old_pending_deopts;
37}
◆ ClearPendingDeoptsAtOrBelow()
void dart::PendingDeopts::ClearPendingDeoptsAtOrBelow |
( |
uword |
fp, |
|
|
ClearReason |
reason |
|
) |
| |
Definition at line 79 of file pending_deopts.cc.
79 {
81}
void ClearPendingDeoptsBelow(uword fp, ClearReason reason)
constexpr intptr_t kWordSize
◆ ClearPendingDeoptsBelow()
void dart::PendingDeopts::ClearPendingDeoptsBelow |
( |
uword |
fp, |
|
|
ClearReason |
reason |
|
) |
| |
Definition at line 57 of file pending_deopts.cc.
57 {
58 for (intptr_t
i = pending_deopts_->length() - 1;
i >= 0;
i--) {
59 if ((*pending_deopts_)[
i].
fp() <
fp) {
60 if (FLAG_trace_deoptimization) {
61 switch (reason) {
64 "Lazy deopt skipped due to throw for "
65 "fp=%" Pp ", pc=%" Pp "\n",
66 (*pending_deopts_)[
i].
fp(), (*pending_deopts_)[
i].pc());
67 break;
70 (*pending_deopts_)[
i].
fp(), (*pending_deopts_)[
i].pc());
71 break;
72 }
73 }
74 pending_deopts_->RemoveAt(
i);
75 }
76 }
77}
#define THR_Print(format,...)
◆ FindPendingDeopt()
uword dart::PendingDeopts::FindPendingDeopt |
( |
uword |
fp | ) |
|
Definition at line 48 of file pending_deopts.cc.
48 {
49 auto record = FindPendingDeoptRecord(
fp);
50 if (record != nullptr) {
51 return record->pc();
52 }
53 FATAL(
"Missing pending deopt entry");
54 return 0;
55}
◆ HasPendingDeopts()
bool dart::PendingDeopts::HasPendingDeopts |
( |
| ) |
|
|
inline |
Definition at line 37 of file pending_deopts.h.
37{ return pending_deopts_->length() > 0; }
◆ RemapExceptionPCForDeopt()
uword dart::PendingDeopts::RemapExceptionPCForDeopt |
( |
uword |
program_counter, |
|
|
uword |
frame_pointer, |
|
|
bool * |
clear_deopt |
|
) |
| |
Definition at line 83 of file pending_deopts.cc.
85 {
86 *clear_deopt = false;
87
88
89
90
91
92 if (program_counter == StubCode::AsyncExceptionHandler().EntryPoint()) {
93 *clear_deopt = true;
94 return program_counter;
95 }
96
97
98 if (FindPendingDeoptRecord(frame_pointer) != nullptr) {
99#if defined(DEBUG)
100
101 ObjectPtr pc_marker = *(reinterpret_cast<ObjectPtr*>(
105#endif
106 if (FLAG_trace_deoptimization) {
107 THR_Print(
"Throwing to frame scheduled for lazy deopt fp=%" Pp "\n",
108 frame_pointer);
109 }
110 return StubCode::DeoptimizeLazyFromThrow().EntryPoint();
111 }
112
113 return program_counter;
114}
static ObjectPtr RawCast(ObjectPtr obj)
FrameLayout runtime_frame_layout
The documentation for this class was generated from the following files: