Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 6f6d13d45ce56c9e9eff1b2f561ec19bdffe5360..4ecf2fb86cea1a42e29f5347d3c8fcdcb848d82b 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -167,10 +167,10 @@ void FastNewContextStub::Generate(MacroAssembler* masm) { |
__ mov(r1, Operand(Smi::FromInt(0))); |
__ str(r3, MemOperand(r0, Context::SlotOffset(Context::CLOSURE_INDEX))); |
__ str(r0, MemOperand(r0, Context::SlotOffset(Context::FCONTEXT_INDEX))); |
- __ str(r1, MemOperand(r0, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
+ __ str(cp, MemOperand(r0, Context::SlotOffset(Context::PREVIOUS_INDEX))); |
__ str(r1, MemOperand(r0, Context::SlotOffset(Context::EXTENSION_INDEX))); |
- // Copy the global object from the surrounding context. |
+ // Copy the global object from the previous context. |
__ ldr(r1, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
__ str(r1, MemOperand(r0, Context::SlotOffset(Context::GLOBAL_INDEX))); |