Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: src/ia32/builtins-ia32.cc

Issue 338963003: KeyedLoadIC should have same register spec as LoadIC. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Last comment response. Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/builtins-ia32.cc
diff --git a/src/ia32/builtins-ia32.cc b/src/ia32/builtins-ia32.cc
index db86549382dfb6f35538bdb852fcd51b1258472b..0a1c0a5e6e4b92455c8f8186f735dcc939243291 100644
--- a/src/ia32/builtins-ia32.cc
+++ b/src/ia32/builtins-ia32.cc
@@ -995,10 +995,12 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Copy all arguments from the array to the stack.
Label entry, loop;
- __ mov(ecx, Operand(ebp, kIndexOffset));
+ Register receiver = LoadIC::ReceiverRegister();
+ Register key = LoadIC::NameRegister();
+ __ mov(key, Operand(ebp, kIndexOffset));
__ jmp(&entry);
__ bind(&loop);
- __ mov(edx, Operand(ebp, kArgumentsOffset)); // load arguments
+ __ mov(receiver, Operand(ebp, kArgumentsOffset)); // load arguments
// Use inline caching to speed up access to arguments.
Handle<Code> ic = masm->isolate()->builtins()->KeyedLoadIC_Initialize();
@@ -1011,19 +1013,19 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Push the nth argument.
__ push(eax);
- // Update the index on the stack and in register eax.
- __ mov(ecx, Operand(ebp, kIndexOffset));
- __ add(ecx, Immediate(1 << kSmiTagSize));
- __ mov(Operand(ebp, kIndexOffset), ecx);
+ // Update the index on the stack and in register key.
+ __ mov(key, Operand(ebp, kIndexOffset));
+ __ add(key, Immediate(1 << kSmiTagSize));
+ __ mov(Operand(ebp, kIndexOffset), key);
__ bind(&entry);
- __ cmp(ecx, Operand(ebp, kLimitOffset));
+ __ cmp(key, Operand(ebp, kLimitOffset));
__ j(not_equal, &loop);
// Call the function.
Label call_proxy;
- __ mov(eax, ecx);
ParameterCount actual(eax);
+ __ Move(eax, key);
__ SmiUntag(eax);
__ mov(edi, Operand(ebp, kFunctionOffset));
__ CmpObjectType(edi, JS_FUNCTION_TYPE, ecx);
« no previous file with comments | « src/code-stubs.cc ('k') | src/ia32/debug-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698