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

Unified Diff: src/objects.cc

Issue 6125007: Allow arguments in safepoints with registers. (Closed)
Patch Set: Created 9 years, 11 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
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 {

Powered by Google App Engine
This is Rietveld 408576698