Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index aa1aac6319890ba3e63a236a9cbd33827415942c..61101e2e47ec73def41ddc3160338c5dec0723f1 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -6917,8 +6917,7 @@ RawPcDescriptors* PcDescriptors::New(intptr_t num_descriptors) { |
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::kDeopt: return "deopt "; |
case PcDescriptors::kEntryPatch: return "entry-patch "; |
case PcDescriptors::kPatchCode: return "patch "; |
case PcDescriptors::kLazyDeoptJump: return "lazy-deopt "; |
@@ -6999,10 +6998,19 @@ void PcDescriptors::Verify(const Function& function) const { |
PcDescriptors::Kind kind = DescriptorKind(i); |
// 'deopt_id' is set for kDeopt and kIcCall and must be unique for one kind. |
intptr_t deopt_id = Isolate::kNoDeoptId; |
- if ((DescriptorKind(i) == PcDescriptors::kDeoptBefore) || |
- (DescriptorKind(i) == PcDescriptors::kIcCall)) { |
- deopt_id = DeoptId(i); |
+ if ((DescriptorKind(i) != PcDescriptors::kDeopt) || |
+ (DescriptorKind(i) != PcDescriptors::kIcCall)) { |
+ continue; |
+ } |
+ |
+ deopt_id = DeoptId(i); |
+ if (Isolate::IsDeoptAfter(deopt_id)) { |
+ // TODO(vegorov): some instructions contain multiple calls and have |
+ // multiple "after" targets recorded. Right now it is benign but might |
+ // lead to issues in the future. Fix that and enable verification. |
+ continue; |
} |
+ |
for (intptr_t k = i + 1; k < Length(); k++) { |
if (kind == DescriptorKind(k)) { |
if (deopt_id != Isolate::kNoDeoptId) { |
@@ -7744,18 +7752,6 @@ uword Code::GetPcForDeoptId(intptr_t deopt_id, PcDescriptors::Kind kind) const { |
} |
-uword Code::GetDeoptBeforePcAtDeoptId(intptr_t deopt_id) const { |
- ASSERT(!is_optimized()); |
- return GetPcForDeoptId(deopt_id, PcDescriptors::kDeoptBefore); |
-} |
- |
- |
-uword Code::GetDeoptAfterPcAtDeoptId(intptr_t deopt_id) const { |
- ASSERT(!is_optimized()); |
- return GetPcForDeoptId(deopt_id, PcDescriptors::kDeoptAfter); |
-} |
- |
- |
const char* Code::ToCString() const { |
const char* kFormat = "Code entry:%p"; |
intptr_t len = OS::SNPrint(NULL, 0, kFormat, EntryPoint()) + 1; |