Index: src/arm64/code-stubs-arm64.cc |
diff --git a/src/arm64/code-stubs-arm64.cc b/src/arm64/code-stubs-arm64.cc |
index 427f82a73f1d44ca14d798bb8ec3cbe0ee53d5df..6dc564da4a9d434a7643b1a3102f5d1dd0cfb6cb 100644 |
--- a/src/arm64/code-stubs-arm64.cc |
+++ b/src/arm64/code-stubs-arm64.cc |
@@ -1727,26 +1727,15 @@ void JSEntryStub::GenerateBody(MacroAssembler* masm, bool is_construct) { |
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 ------------- |
- // -- lr : return address |
- // -- x1 : receiver |
- // -- x0 : key |
- // ----------------------------------- |
- Register key = x0; |
- receiver = x1; |
- __ Cmp(key, Operand(isolate()->factory()->prototype_string())); |
+ __ Cmp(name, Operand(isolate()->factory()->prototype_string())); |
__ B(ne, &miss); |
- } else { |
- ASSERT(kind() == Code::LOAD_IC); |
- // ----------- S t a t e ------------- |
- // -- lr : return address |
- // -- x2 : name |
- // -- x0 : receiver |
- // -- sp[0] : receiver |
- // ----------------------------------- |
- receiver = x0; |
} |
StubCompiler::GenerateLoadFunctionPrototype(masm, receiver, x10, x11, &miss); |