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

Unified Diff: src/x64/builtins-x64.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/ic.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/x64/builtins-x64.cc
diff --git a/src/x64/builtins-x64.cc b/src/x64/builtins-x64.cc
index 1a36341a92e63f20c4a830efd6ee3a6260b71c80..2aea7b9fdb74e160e90f11d338277db767ecb494 100644
--- a/src/x64/builtins-x64.cc
+++ b/src/x64/builtins-x64.cc
@@ -1066,10 +1066,12 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Copy all arguments from the array to the stack.
Label entry, loop;
- __ movp(rax, Operand(rbp, kIndexOffset));
+ Register receiver = LoadIC::ReceiverRegister();
+ Register key = LoadIC::NameRegister();
+ __ movp(key, Operand(rbp, kIndexOffset));
__ jmp(&entry);
__ bind(&loop);
- __ movp(rdx, Operand(rbp, kArgumentsOffset)); // load arguments
+ __ movp(receiver, Operand(rbp, kArgumentsOffset)); // load arguments
// Use inline caching to speed up access to arguments.
Handle<Code> ic =
@@ -1083,19 +1085,19 @@ void Builtins::Generate_FunctionApply(MacroAssembler* masm) {
// Push the nth argument.
__ Push(rax);
- // Update the index on the stack and in register rax.
- __ movp(rax, Operand(rbp, kIndexOffset));
- __ SmiAddConstant(rax, rax, Smi::FromInt(1));
- __ movp(Operand(rbp, kIndexOffset), rax);
+ // Update the index on the stack and in register key.
+ __ movp(key, Operand(rbp, kIndexOffset));
+ __ SmiAddConstant(key, key, Smi::FromInt(1));
+ __ movp(Operand(rbp, kIndexOffset), key);
__ bind(&entry);
- __ cmpp(rax, Operand(rbp, kLimitOffset));
+ __ cmpp(key, Operand(rbp, kLimitOffset));
__ j(not_equal, &loop);
// Call the function.
Label call_proxy;
ParameterCount actual(rax);
- __ SmiToInteger32(rax, rax);
+ __ SmiToInteger32(rax, key);
__ movp(rdi, Operand(rbp, kFunctionOffset));
__ CmpObjectType(rdi, JS_FUNCTION_TYPE, rcx);
__ j(not_equal, &call_proxy);
« no previous file with comments | « src/ic.h ('k') | src/x64/code-stubs-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698