| Index: src/ia32/code-stubs-ia32.cc
|
| diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc
|
| index 72213dc817487e15e50cf35fb790d3bf7e84db82..2c83662efd3853cafeac85d23da62fd5cf8d441e 100644
|
| --- a/src/ia32/code-stubs-ia32.cc
|
| +++ b/src/ia32/code-stubs-ia32.cc
|
| @@ -91,8 +91,7 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) {
|
| void FastNewContextStub::Generate(MacroAssembler* masm) {
|
| // Try to allocate the context in new space.
|
| Label gc;
|
| - int length = slots_ + Context::MIN_CONTEXT_SLOTS;
|
| - __ AllocateInNewSpace((length * kPointerSize) + FixedArray::kHeaderSize,
|
| + __ AllocateInNewSpace((slots_ * kPointerSize) + FixedArray::kHeaderSize,
|
| eax, ebx, ecx, &gc, TAG_OBJECT);
|
|
|
| // Get the function from the stack.
|
| @@ -101,7 +100,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
|
| // Setup the object header.
|
| __ mov(FieldOperand(eax, HeapObject::kMapOffset), Factory::context_map());
|
| __ mov(FieldOperand(eax, Context::kLengthOffset),
|
| - Immediate(Smi::FromInt(length)));
|
| + Immediate(Smi::FromInt(slots_)));
|
|
|
| // Setup the fixed slots.
|
| __ Set(ebx, Immediate(0)); // Set to NULL.
|
| @@ -119,7 +118,7 @@ void FastNewContextStub::Generate(MacroAssembler* masm) {
|
|
|
| // Initialize the rest of the slots to undefined.
|
| __ mov(ebx, Factory::undefined_value());
|
| - for (int i = Context::MIN_CONTEXT_SLOTS; i < length; i++) {
|
| + for (int i = Context::MIN_CONTEXT_SLOTS; i < slots_; i++) {
|
| __ mov(Operand(eax, Context::SlotOffset(i)), ebx);
|
| }
|
|
|
|
|