Revert "Revert "Upgrade to 5.0.71.48"" DO NOT MERGE
This reverts commit f2e3994fa5148cc3d9946666f0b0596290192b0e,
and updates the x64 makefile properly so it doesn't break that
build.
FPIIM-449
Change-Id: Ib83e35bfbae6af627451c926a9650ec57c045605
(cherry picked from commit 109988c7ccb6f3fd1a58574fa3dfb88beaef6632)
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc
index 313567e..712cfe0 100644
--- a/src/compiler/code-generator.cc
+++ b/src/compiler/code-generator.cc
@@ -78,10 +78,12 @@
if (linkage()->GetIncomingDescriptor()->IsJSFunctionCall()) {
ProfileEntryHookStub::MaybeCallEntryHook(masm());
}
-
// Architecture-specific, linkage-specific prologue.
info->set_prologue_offset(masm()->pc_offset());
AssemblePrologue();
+ if (linkage()->GetIncomingDescriptor()->InitializeRootRegister()) {
+ masm()->InitializeRootRegister();
+ }
// Define deoptimization literals for all inlined functions.
DCHECK_EQ(0u, deoptimization_literals_.size());
@@ -175,12 +177,12 @@
}
}
- safepoints()->Emit(masm(), frame()->GetSpillSlotCount());
+ safepoints()->Emit(masm(), frame()->GetTotalFrameSlotCount());
Handle<Code> result =
v8::internal::CodeGenerator::MakeCodeEpilogue(masm(), info);
result->set_is_turbofanned(true);
- result->set_stack_slots(frame()->GetSpillSlotCount());
+ result->set_stack_slots(frame()->GetTotalFrameSlotCount());
result->set_safepoint_table_offset(safepoints()->GetCodeOffset());
// Emit exception handler table.
@@ -234,9 +236,12 @@
if (operand.IsStackSlot()) {
int index = LocationOperand::cast(operand).index();
DCHECK(index >= 0);
- // Safepoint table indices are 0-based from the beginning of the spill
- // slot area, adjust appropriately.
- index -= stackSlotToSpillSlotDelta;
+ // We might index values in the fixed part of the frame (i.e. the
+ // closure pointer or the context pointer); these are not spill slots
+ // and therefore don't work with the SafepointTable currently, but
+ // we also don't need to worry about them, since the GC has special
+ // knowledge about those fields anyway.
+ if (index < stackSlotToSpillSlotDelta) continue;
safepoint.DefinePointerSlot(index, zone());
} else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) {
Register reg = LocationOperand::cast(operand).GetRegister();
@@ -583,7 +588,7 @@
case FrameStateType::kInterpretedFunction:
translation->BeginInterpretedFrame(
descriptor->bailout_id(), shared_info_id,
- static_cast<unsigned int>(descriptor->locals_count()));
+ static_cast<unsigned int>(descriptor->locals_count() + 1));
break;
case FrameStateType::kArgumentsAdaptor:
translation->BeginArgumentsAdaptorFrame(