Index: src/objects.cc |
diff --git a/src/objects.cc b/src/objects.cc |
index f3f80032a755dfa1eefe32f3d34070c7a84ff9c6..9c0287b6cd251e6b331cc653204c8f9cca909cf5 100644 |
--- a/src/objects.cc |
+++ b/src/objects.cc |
@@ -5987,14 +5987,9 @@ int Code::SourceStatementPosition(Address pc) { |
} |
-uint8_t* Code::GetSafepointEntry(Address pc) { |
+SafepointEntry Code::GetSafepointEntry(Address pc) { |
SafepointTable table(this); |
- unsigned pc_offset = static_cast<unsigned>(pc - instruction_start()); |
- for (unsigned i = 0; i < table.length(); i++) { |
- // TODO(kasperl): Replace the linear search with binary search. |
- if (table.GetPcOffset(i) == pc_offset) return table.GetEntry(i); |
- } |
- return NULL; |
+ return table.FindEntry(pc); |
} |
@@ -6265,7 +6260,7 @@ void Code::Disassemble(const char* name, FILE* out) { |
PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset); |
table.PrintEntry(i); |
PrintF(out, " (sp -> fp)"); |
- int deoptimization_index = table.GetDeoptimizationIndex(i); |
+ int deoptimization_index = table.GetEntry(i).deoptimization_index(); |
if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) { |
PrintF(out, " %6d", deoptimization_index); |
} else { |