Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 57d14a290a6274614c2fa46571043f902be0b264..93955e33d3db37b500ed5be645b4f4df6df52a50 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -177,12 +177,12 @@ Handle<Code> CodeGenerator::GenerateCode() { |
} |
} |
- 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. |
@@ -236,15 +236,12 @@ void CodeGenerator::RecordSafepoint(ReferenceMap* references, |
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 < 0) continue; |
+ if (index < stackSlotToSpillSlotDelta) continue; |
safepoint.DefinePointerSlot(index, zone()); |
} else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) { |
Register reg = LocationOperand::cast(operand).GetRegister(); |