Update V8 to r6387 as required by WebKit r76408
Change-Id: Icfc5385b0996bd592f8b1ac8cbb44767ee09f1f6
diff --git a/src/objects.cc b/src/objects.cc
index f3f8003..36a8e5c 100644
--- a/src/objects.cc
+++ b/src/objects.cc
@@ -5399,7 +5399,8 @@
void JSFunction::MarkForLazyRecompilation() {
ASSERT(is_compiled() && !IsOptimized());
- ASSERT(shared()->allows_lazy_compilation());
+ ASSERT(shared()->allows_lazy_compilation() ||
+ code()->optimizable());
ReplaceCode(Builtins::builtin(Builtins::LazyRecompile));
}
@@ -5987,14 +5988,9 @@
}
-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,12 +6261,15 @@
PrintF(out, "%p %4d ", (instruction_start() + pc_offset), pc_offset);
table.PrintEntry(i);
PrintF(out, " (sp -> fp)");
- int deoptimization_index = table.GetDeoptimizationIndex(i);
- if (deoptimization_index != Safepoint::kNoDeoptimizationIndex) {
- PrintF(out, " %6d", deoptimization_index);
+ SafepointEntry entry = table.GetEntry(i);
+ if (entry.deoptimization_index() != Safepoint::kNoDeoptimizationIndex) {
+ PrintF(out, " %6d", entry.deoptimization_index());
} else {
PrintF(out, " <none>");
}
+ if (entry.argument_count() > 0) {
+ PrintF(out, " argc: %d", entry.argument_count());
+ }
PrintF(out, "\n");
}
PrintF(out, "\n");