I actually prefer the more explicit (less abstract code) with __ mov + __
RecordWrite.

Under all the levels of abstraction, this does a context chain lookup (on a
chain guaranteed to have length 0) and inserts the silly and probably
unnecessary extra load from the context.

No reason to do a context chain lookup.  We've just allocated it and it's in
esi.

On Mon, Feb 1, 2010 at 12:36 PM, <[email protected]> wrote:

> Reviewers: Kevin Millikin,
>
> Description:
> Add missing write barrirer code.
>
> Please review this at http://codereview.chromium.org/552256
>
> Affected files:
>  M src/ia32/full-codegen-ia32.cc
>
>
> Index: src/ia32/full-codegen-ia32.cc
> diff --git a/src/ia32/full-codegen-ia32.cc b/src/ia32/full-codegen-ia32.cc
> index
> 5fd594cbe9eb8dd8d7e1f868df07a3d943bbb12f..514a8b34294bd79bec5d9ab54a22429b31002d7f
> 100644
> --- a/src/ia32/full-codegen-ia32.cc
> +++ b/src/ia32/full-codegen-ia32.cc
> @@ -95,7 +95,7 @@ void FullCodeGenerator::Generate(FunctionLiteral* fun) {
>         // Load parameter from stack.
>         __ mov(eax, Operand(ebp, parameter_offset));
>         // Store it in the context
> -        __ mov(Operand(esi, Context::SlotOffset(slot->index())), eax);
> +        Move(slot, eax, ecx, edx);
>       }
>     }
>   }
>
>
>

-- 
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to