Author: [EMAIL PROTECTED]
Date: Wed Dec 10 05:49:19 2008
New Revision: 958
Modified:
branches/bleeding_edge/src/codegen-ia32.cc
Log:
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.
Review URL: http://codereview.chromium.org/13706
Modified: branches/bleeding_edge/src/codegen-ia32.cc
==============================================================================
--- branches/bleeding_edge/src/codegen-ia32.cc (original)
+++ branches/bleeding_edge/src/codegen-ia32.cc Wed Dec 10 05:49:19 2008
@@ -2919,17 +2919,15 @@
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);
--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---