| Index: src/arm/lithium-codegen-arm.cc | 
| diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc | 
| index 5e2e380ba8927688a9b2b4e11b58652991694b39..a90287cf1e397cda4627a2b3158cf2cfcf2df882 100644 | 
| --- a/src/arm/lithium-codegen-arm.cc | 
| +++ b/src/arm/lithium-codegen-arm.cc | 
| @@ -736,37 +736,40 @@ void LCodeGen::PopulateDeoptimizationLiteralsWithInlinedFunctions() { | 
| } | 
|  | 
|  | 
| -void LCodeGen::RecordSafepoint(LPointerMap* pointers, | 
| -                               int deoptimization_index) { | 
| +void LCodeGen::RecordSafepoint( | 
| +    LPointerMap* pointers, | 
| +    Safepoint::Kind kind, | 
| +    int arguments, | 
| +    int deoptimization_index) { | 
| const ZoneList<LOperand*>* operands = pointers->operands(); | 
| Safepoint safepoint = safepoints_.DefineSafepoint(masm(), | 
| -                                                    deoptimization_index); | 
| +      kind, arguments, deoptimization_index); | 
| for (int i = 0; i < operands->length(); i++) { | 
| LOperand* pointer = operands->at(i); | 
| if (pointer->IsStackSlot()) { | 
| safepoint.DefinePointerSlot(pointer->index()); | 
| +    } else if (pointer->IsRegister() && (kind & Safepoint::kWithRegisters)) { | 
| +      safepoint.DefinePointerRegister(ToRegister(pointer)); | 
| } | 
| } | 
| +  if (kind & Safepoint::kWithRegisters) { | 
| +    // Register cp always contains a pointer to the context. | 
| +    safepoint.DefinePointerRegister(cp); | 
| +  } | 
| +} | 
| + | 
| + | 
| +void LCodeGen::RecordSafepoint(LPointerMap* pointers, | 
| +                               int deoptimization_index) { | 
| +  RecordSafepoint(pointers, Safepoint::kSimple, 0, deoptimization_index); | 
| } | 
|  | 
|  | 
| void LCodeGen::RecordSafepointWithRegisters(LPointerMap* pointers, | 
| int arguments, | 
| int deoptimization_index) { | 
| -  const ZoneList<LOperand*>* operands = pointers->operands(); | 
| -  Safepoint safepoint = | 
| -      safepoints_.DefineSafepointWithRegisters( | 
| -          masm(), arguments, deoptimization_index); | 
| -  for (int i = 0; i < operands->length(); i++) { | 
| -    LOperand* pointer = operands->at(i); | 
| -    if (pointer->IsStackSlot()) { | 
| -      safepoint.DefinePointerSlot(pointer->index()); | 
| -    } else if (pointer->IsRegister()) { | 
| -      safepoint.DefinePointerRegister(ToRegister(pointer)); | 
| -    } | 
| -  } | 
| -  // Register cp always contains a pointer to the context. | 
| -  safepoint.DefinePointerRegister(cp); | 
| +  RecordSafepoint(pointers, Safepoint::kWithRegisters, arguments, | 
| +      deoptimization_index); | 
| } | 
|  | 
|  | 
| @@ -774,20 +777,8 @@ void LCodeGen::RecordSafepointWithRegistersAndDoubles( | 
| LPointerMap* pointers, | 
| int arguments, | 
| int deoptimization_index) { | 
| -  const ZoneList<LOperand*>* operands = pointers->operands(); | 
| -  Safepoint safepoint = | 
| -      safepoints_.DefineSafepointWithRegistersAndDoubles( | 
| -          masm(), arguments, deoptimization_index); | 
| -  for (int i = 0; i < operands->length(); i++) { | 
| -    LOperand* pointer = operands->at(i); | 
| -    if (pointer->IsStackSlot()) { | 
| -      safepoint.DefinePointerSlot(pointer->index()); | 
| -    } else if (pointer->IsRegister()) { | 
| -      safepoint.DefinePointerRegister(ToRegister(pointer)); | 
| -    } | 
| -  } | 
| -  // Register cp always contains a pointer to the context. | 
| -  safepoint.DefinePointerRegister(cp); | 
| +  RecordSafepoint(pointers, Safepoint::kWithRegistersAndDoubles, arguments, | 
| +      deoptimization_index); | 
| } | 
|  | 
|  | 
|  |