Good catch - LGTM.

On Wed, Dec 10, 2008 at 2:37 PM,  <[EMAIL PROTECTED]> wrote:
> Reviewers: Erik Corry,
>
> Description:
> A recursive call to the code generator could (conceivably) clobber any
> register.  Generate code to evaluate both arguments of FastCharCodeAt
> before popping either from the stack.
>
> Please review this at http://codereview.chromium.org/13706
>
> SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/
>
> Affected files:
>  M     src/codegen-ia32.cc
>
>
> Index: src/codegen-ia32.cc
> ===================================================================
> --- src/codegen-ia32.cc (revision 957)
> +++ src/codegen-ia32.cc (working copy)
> @@ -2919,18 +2919,16 @@
>   Label ascii_string;
>   Label got_char_code;
>
> -  // Load the string into eax.
> +  // Load the string into eax and the index into ebx.
>   Load(args->at(0));
> +  Load(args->at(1));
> +  frame_->Pop(ebx);
>   frame_->Pop(eax);
>   // If the receiver is a smi return undefined.
>   ASSERT(kSmiTag == 0);
>   __ test(eax, Immediate(kSmiTagMask));
>   __ j(zero, &slow_case, not_taken);
>
> -  // Load the index into ebx.
> -  Load(args->at(1));
> -  frame_->Pop(ebx);
> -
>   // Check for negative or non-smi index.
>   ASSERT(kSmiTag == 0);
>   __ test(ebx, Immediate(kSmiTagMask | 0x80000000));
>
>
>



-- 
Erik Corry, Software Engineer
Google Denmark ApS.  CVR nr. 28 86 69 84
c/o Philip & Partners, 7 Vognmagergade, P.O. Box 2227, DK-1018
Copenhagen K, Denmark.

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

Reply via email to