Index: src/ia32/full-codegen-ia32.cc |
=================================================================== |
--- src/ia32/full-codegen-ia32.cc (revision 3760) |
+++ src/ia32/full-codegen-ia32.cc (working copy) |
@@ -51,7 +51,7 @@ |
// |
// The function builds a JS frame. Please see JavaScriptFrameConstants in |
// frames-ia32.h for its layout. |
-void FullCodeGenerator::Generate(FunctionLiteral* fun, Mode mode) { |
+void FullCodeGenerator::Generate(FunctionLiteral* fun', Mode mode) { |
Mads Ager (chromium)
2010/02/02 07:51:15
Accidental edit?
Lasse Reichstein
2010/02/02 07:51:33
Typo '.
|
function_ = fun; |
SetFunctionPosition(fun); |
@@ -95,8 +95,14 @@ |
(num_parameters - 1 - i) * kPointerSize; |
// Load parameter from stack. |
__ mov(eax, Operand(ebp, parameter_offset)); |
- // Store it in the context |
- __ mov(Operand(esi, Context::SlotOffset(slot->index())), eax); |
+ // Store it in the context. |
+ int context_offset = Context::SlotOffset(slot->index()); |
+ __ mov(Operand(esi, context_offset), eax); |
+ // Update the write barrier. This clobbers all involved |
+ // registers, so we have use a third register to avoid |
+ // clobbering esi. |
+ __ mov(ecx, esi); |
+ __ RecordWrite(ecx, context_offset, eax, ebx); |
} |
} |
} |
@@ -112,7 +118,7 @@ |
} |
// Receiver is just before the parameters on the caller's stack. |
__ lea(edx, Operand(ebp, StandardFrameConstants::kCallerSPOffset + |
- fun->num_parameters() * kPointerSize)); |
+ fun->num_parameters() * kPointerSize)); |
__ push(edx); |
__ push(Immediate(Smi::FromInt(fun->num_parameters()))); |
// Arguments to ArgumentsAccessStub: |