Index: src/safepoint-table.cc |
diff --git a/src/safepoint-table.cc b/src/safepoint-table.cc |
index d00b751a05818344d71fb2b8b2bbd3d948a2c6bd..5f915476e230c56795c33db86890cb311a31b075 100644 |
--- a/src/safepoint-table.cc |
+++ b/src/safepoint-table.cc |
@@ -43,8 +43,8 @@ SafepointTable::SafepointTable(Code* code) { |
length_ = Memory::uint32_at(header + kLengthOffset); |
entry_size_ = Memory::uint32_at(header + kEntrySizeOffset); |
pc_and_deoptimization_indexes_ = header + kHeaderSize; |
- entries_ = pc_and_deoptimization_indexes_ + |
- (length_ * kPcAndDeoptimizationIndexSize); |
+ entries_ = |
+ pc_and_deoptimization_indexes_ + (length_ * kPcAndDeoptimizationInfoSize); |
DCHECK(entry_size_ > 0); |
STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax == |
Safepoint::kNoDeoptimizationIndex); |
@@ -56,6 +56,7 @@ SafepointEntry SafepointTable::FindEntry(Address pc) const { |
for (unsigned i = 0; i < length(); i++) { |
// TODO(kasperl): Replace the linear search with binary search. |
if (GetPcOffset(i) == pc_offset) return GetEntry(i); |
+ if (GetDeoptimizationPcOffset(i) == pc_offset) return GetEntry(i); |
} |
return SafepointEntry(); |
} |
@@ -110,6 +111,8 @@ Safepoint SafepointTableBuilder::DefineSafepoint( |
info.pc = assembler->pc_offset(); |
info.arguments = arguments; |
info.has_doubles = (kind & Safepoint::kWithDoubles); |
+ info.deoptimization_pc = Safepoint::kNoDeoptimizationPc; |
+ int safepoint_id = deoptimization_info_.length(); |
deoptimization_info_.Add(info, zone_); |
deopt_index_list_.Add(Safepoint::kNoDeoptimizationIndex, zone_); |
if (deopt_mode == Safepoint::kNoLazyDeopt) { |
@@ -120,7 +123,7 @@ Safepoint SafepointTableBuilder::DefineSafepoint( |
? new(zone_) ZoneList<int>(4, zone_) |
: NULL, |
zone_); |
- return Safepoint(indexes_.last(), registers_.last()); |
+ return Safepoint(safepoint_id, indexes_.last(), registers_.last()); |
} |
@@ -159,6 +162,7 @@ void SafepointTableBuilder::Emit(Assembler* assembler, int bits_per_entry) { |
assembler->dd(deoptimization_info_[i].pc); |
assembler->dd(EncodeExceptPC(deoptimization_info_[i], |
deopt_index_list_[i])); |
+ assembler->dd(deoptimization_info_[i].deoptimization_pc); |
} |
// Emit table of bitmaps. |