Chromium Code Reviews| Index: src/arm/fast-codegen-arm.cc |
| diff --git a/src/arm/fast-codegen-arm.cc b/src/arm/fast-codegen-arm.cc |
| index 6d0510e3249d79a0fff9fdaae879dbe7b551f68e..81474665a26032efff34c7e59496dc3901136c69 100644 |
| --- a/src/arm/fast-codegen-arm.cc |
| +++ b/src/arm/fast-codegen-arm.cc |
| @@ -376,26 +376,26 @@ void FastCodeGenerator::VisitDeclaration(Declaration* decl) { |
| __ mov(r0, Operand(Factory::the_hole_value())); |
| if (FLAG_debug_code) { |
| // Check if we have the correct context pointer. |
| - __ ldr(r1, CodeGenerator::ContextOperand( |
| - cp, Context::FCONTEXT_INDEX)); |
| + __ ldr(r1, CodeGenerator::ContextOperand(cp, |
| + Context::FCONTEXT_INDEX)); |
| __ cmp(r1, cp); |
| __ Check(eq, "Unexpected declaration in current context."); |
| } |
| __ str(r0, CodeGenerator::ContextOperand(cp, slot->index())); |
| // No write barrier since the_hole_value is in old space. |
| - ASSERT(Heap::InNewSpace(*Factory::the_hole_value())); |
| + ASSERT(!Heap::InNewSpace(*Factory::the_hole_value())); |
|
Mads Ager (chromium)
2009/11/24 14:46:32
Could you add a regression test for this? Somethi
Lasse Reichstein
2009/11/25 08:56:26
The code is currently unreachable since we don't f
|
| } else if (decl->fun() != NULL) { |
| Visit(decl->fun()); |
| __ pop(r0); |
| if (FLAG_debug_code) { |
| // Check if we have the correct context pointer. |
| - __ ldr(r1, CodeGenerator::ContextOperand( |
| - cp, Context::FCONTEXT_INDEX)); |
| + __ ldr(r1, CodeGenerator::ContextOperand(cp, |
| + Context::FCONTEXT_INDEX)); |
| __ cmp(r1, cp); |
| __ Check(eq, "Unexpected declaration in current context."); |
| } |
| __ str(r0, CodeGenerator::ContextOperand(cp, slot->index())); |
| - int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize; |
| + int offset = Context::SlotOffset(slot->index()); |
| __ mov(r2, Operand(offset)); |
| // We know that we have written a function, which is not a smi. |
| __ RecordWrite(cp, r2, r0); |