Index: src/ia32/fast-codegen-ia32.cc |
diff --git a/src/ia32/fast-codegen-ia32.cc b/src/ia32/fast-codegen-ia32.cc |
index a01d754e47a3bc03602a8f9f0b77fd21111f9650..deb50998d927ee89eeb567ca31e6691477d541ea 100644 |
--- a/src/ia32/fast-codegen-ia32.cc |
+++ b/src/ia32/fast-codegen-ia32.cc |
@@ -380,6 +380,7 @@ void FastCodeGenerator::VisitDeclaration(Declaration* decl) { |
} |
__ mov(CodeGenerator::ContextOperand(esi, slot->index()), eax); |
// No write barrier since the_hole_value is in old space. |
+ ASSERT(!Heap::InNewSpace(*Factory::the_hole_value())); |
} else if (decl->fun() != NULL) { |
Visit(decl->fun()); |
__ pop(eax); |
@@ -391,7 +392,7 @@ void FastCodeGenerator::VisitDeclaration(Declaration* decl) { |
__ Check(equal, "Unexpected declaration in current context."); |
} |
__ mov(CodeGenerator::ContextOperand(esi, slot->index()), eax); |
- int offset = FixedArray::kHeaderSize + slot->index() * kPointerSize; |
+ int offset = Context::SlotOffset(slot->index()); |
__ RecordWrite(esi, offset, eax, ecx); |
} |
break; |