Index: src/compiler/code-generator.cc |
diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc |
index 68d4cc38575eb9438d6ee354f756276b6878f23f..57d14a290a6274614c2fa46571043f902be0b264 100644 |
--- a/src/compiler/code-generator.cc |
+++ b/src/compiler/code-generator.cc |
@@ -239,6 +239,12 @@ void CodeGenerator::RecordSafepoint(ReferenceMap* references, |
// 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; |
safepoint.DefinePointerSlot(index, zone()); |
} else if (operand.IsRegister() && (kind & Safepoint::kWithRegisters)) { |
Register reg = LocationOperand::cast(operand).GetRegister(); |