Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1231)

Unified Diff: src/safepoint-table.cc

Issue 504493002: Fix deoptimization address patching in Turbofan to use safepoints. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Compilation fix. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/safepoint-table.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « src/safepoint-table.h ('k') | src/x64/lithium-codegen-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698