Index: runtime/vm/object.cc |
=================================================================== |
--- runtime/vm/object.cc (revision 43041) |
+++ runtime/vm/object.cc (working copy) |
@@ -10647,7 +10647,7 @@ |
Iterator iter(*this, RawPcDescriptors::kAnyKind); |
while (iter.MoveNext()) { |
len += OS::SNPrint(NULL, 0, kFormat, addr_width, |
- iter.Pc(), |
+ iter.PcOffset(), |
KindAsStr(iter.Kind()), |
iter.DeoptId(), |
iter.TokenPos(), |
@@ -10661,7 +10661,7 @@ |
Iterator iter(*this, RawPcDescriptors::kAnyKind); |
while (iter.MoveNext()) { |
index += OS::SNPrint((buffer + index), (len - index), kFormat, addr_width, |
- iter.Pc(), |
+ iter.PcOffset(), |
KindAsStr(iter.Kind()), |
iter.DeoptId(), |
iter.TokenPos(), |
@@ -10688,7 +10688,7 @@ |
Iterator iter(*this, RawPcDescriptors::kAnyKind); |
while (iter.MoveNext()) { |
JSONObject descriptor(&members); |
- descriptor.AddPropertyF("pc", "%" Px "", iter.Pc()); |
+ descriptor.AddPropertyF("pc_offset", "%" Px "", iter.PcOffset()); |
descriptor.AddProperty("kind", KindAsStr(iter.Kind())); |
descriptor.AddProperty("deoptId", iter.DeoptId()); |
descriptor.AddProperty("tokenPos", iter.TokenPos()); |
@@ -10743,15 +10743,6 @@ |
} |
-uword PcDescriptors::GetPcForKind(RawPcDescriptors::Kind kind) const { |
- Iterator iter(*this, kind); |
- if (iter.MoveNext()) { |
- return iter.Pc(); |
- } |
- return 0; |
-} |
- |
- |
bool Stackmap::GetBit(intptr_t bit_index) const { |
ASSERT(InRange(bit_index)); |
int byte_index = bit_index >> kBitsPerByteLog2; |
@@ -12439,10 +12430,11 @@ |
intptr_t Code::GetTokenIndexOfPC(uword pc) const { |
+ uword pc_offset = pc - EntryPoint(); |
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kAnyKind); |
while (iter.MoveNext()) { |
- if (iter.Pc() == pc) { |
+ if (iter.PcOffset() == pc_offset) { |
return iter.TokenPos(); |
} |
} |
@@ -12456,7 +12448,8 @@ |
PcDescriptors::Iterator iter(descriptors, kind); |
while (iter.MoveNext()) { |
if (iter.DeoptId() == deopt_id) { |
- uword pc = iter.Pc(); |
+ uword pc_offset = iter.PcOffset(); |
+ uword pc = EntryPoint() + pc_offset; |
ASSERT(ContainsInstructionAt(pc)); |
return pc; |
} |
@@ -12466,10 +12459,11 @@ |
intptr_t Code::GetDeoptIdForOsr(uword pc) const { |
+ uword pc_offset = pc - EntryPoint(); |
const PcDescriptors& descriptors = PcDescriptors::Handle(pc_descriptors()); |
PcDescriptors::Iterator iter(descriptors, RawPcDescriptors::kOsrEntry); |
while (iter.MoveNext()) { |
- if (iter.Pc() == pc) { |
+ if (iter.PcOffset() == pc_offset) { |
return iter.DeoptId(); |
} |
} |