Reviewers: Erik Corry, Description: Fix bug in the ARM port of FastNewContextStub. Load the function from the stack instead of popping it - it is needed by the slow case.
Please review this at http://codereview.chromium.org/546031 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/arm/codegen-arm.cc 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.
-- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
