Index: src/arm/codegen-arm.cc |
=================================================================== |
--- src/arm/codegen-arm.cc (revision 3592) |
+++ src/arm/codegen-arm.cc (working copy) |
@@ -4455,9 +4455,6 @@ |
Label gc; |
int length = slots_ + Context::MIN_CONTEXT_SLOTS; |
- // Pop the function from the stack. |
- __ pop(r3); |
- |
// Attempt to allocate the context in new space. |
__ AllocateInNewSpace(length + (FixedArray::kHeaderSize / kPointerSize), |
r0, |
@@ -4466,6 +4463,9 @@ |
&gc, |
TAG_OBJECT); |
+ // Load the function from the stack. |
+ __ ldr(r3, MemOperand(sp, 0 * kPointerSize)); |
+ |
// Setup the object header. |
__ LoadRoot(r2, Heap::kContextMapRootIndex); |
__ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |
@@ -4489,8 +4489,9 @@ |
__ str(r1, MemOperand(r0, Context::SlotOffset(i))); |
} |
- // Return. The on-stack parameter has already been popped. |
+ // Remove the on-stack argument and return. |
__ mov(cp, r0); |
+ __ pop(); |
__ Ret(); |
// Need to collect. Call into runtime system. |