Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index ce142b7a2ef729e298acc71d88d050f7768681f1..c08e38b50992bbc1a2fbae027654f08cda603c2c 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -780,24 +780,15 @@ void MathPowStub::Generate(MacroAssembler* masm) { |
void FunctionPrototypeStub::Generate(MacroAssembler* masm) { |
Label miss; |
- Register receiver; |
+ Register receiver = LoadIC::ReceiverRegister(); |
+ Register name = LoadIC::NameRegister(); |
+ |
+ ASSERT(kind() == Code::LOAD_IC || |
+ kind() == Code::KEYED_LOAD_IC); |
+ |
if (kind() == Code::KEYED_LOAD_IC) { |
- // ----------- S t a t e ------------- |
- // -- rax : key |
- // -- rdx : receiver |
- // -- rsp[0] : return address |
- // ----------------------------------- |
- __ Cmp(rax, isolate()->factory()->prototype_string()); |
+ __ Cmp(name, isolate()->factory()->prototype_string()); |
__ j(not_equal, &miss); |
- receiver = rdx; |
- } else { |
- ASSERT(kind() == Code::LOAD_IC); |
- // ----------- S t a t e ------------- |
- // -- rax : receiver |
- // -- rcx : name |
- // -- rsp[0] : return address |
- // ----------------------------------- |
- receiver = rax; |
} |
StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, r8, r9, &miss); |