Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 12092) |
+++ runtime/vm/object.cc (working copy) |
@@ -6927,14 +6927,15 @@ |
const char* PcDescriptors::KindAsStr(intptr_t index) const { |
switch (DescriptorKind(index)) { |
- case PcDescriptors::kDeoptBefore: return "deopt-before "; |
- case PcDescriptors::kDeoptAfter: return "deopt-after "; |
- case PcDescriptors::kDeoptIndex: return "deopt-ix "; |
- case PcDescriptors::kPatchCode: return "patch "; |
- case PcDescriptors::kIcCall: return "ic-call "; |
- case PcDescriptors::kFuncCall: return "fn-call "; |
- case PcDescriptors::kReturn: return "return "; |
- case PcDescriptors::kOther: return "other "; |
+ case PcDescriptors::kDeoptBefore: return "deopt-before "; |
+ case PcDescriptors::kDeoptAfter: return "deopt-after "; |
+ case PcDescriptors::kDeoptIndex: return "deopt-ix "; |
+ case PcDescriptors::kPatchCode: return "patch "; |
+ case PcDescriptors::kLazyDeoptJump: return "lazy-deopt "; |
+ case PcDescriptors::kIcCall: return "ic-call "; |
+ case PcDescriptors::kFuncCall: return "fn-call "; |
+ case PcDescriptors::kReturn: return "return "; |
+ case PcDescriptors::kOther: return "other "; |
} |
UNREACHABLE(); |
return ""; |
@@ -7032,6 +7033,16 @@ |
} |
+uword PcDescriptors::GetPcForKind(Kind kind) const { |
+ for (intptr_t i = 0; i < Length(); i++) { |
+ if (DescriptorKind(i) == kind) { |
+ return PC(i); |
+ } |
+ } |
+ return 0; |
+} |
+ |
+ |
void Stackmap::SetCode(const dart::Code& code) const { |
StorePointer(&raw_ptr()->code_, code.raw()); |
} |
@@ -7600,15 +7611,16 @@ |
uword Code::GetPatchCodePc() const { |
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
- for (intptr_t i = 0; i < descriptors.Length(); i++) { |
- if (descriptors.DescriptorKind(i) == PcDescriptors::kPatchCode) { |
- return descriptors.PC(i); |
- } |
- } |
- return 0; |
+ return descriptors.GetPcForKind(PcDescriptors::kPatchCode); |
} |
+uword Code::GetLazyDeoptPc() const { |
+ const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
+ return descriptors.GetPcForKind(PcDescriptors::kLazyDeoptJump); |
+} |
+ |
+ |
bool Code::ObjectExistsInArea(intptr_t start_offset, |
intptr_t end_offset) const { |
for (intptr_t i = 0; i < this->pointer_offsets_length(); i++) { |