| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 // Generate call to api function. | 747 // Generate call to api function. |
| 748 void StubCompiler::GenerateFastApiCall(MacroAssembler* masm, | 748 void StubCompiler::GenerateFastApiCall(MacroAssembler* masm, |
| 749 const CallOptimization& optimization, | 749 const CallOptimization& optimization, |
| 750 Handle<Map> receiver_map, | 750 Handle<Map> receiver_map, |
| 751 Register receiver, | 751 Register receiver, |
| 752 Register scratch, | 752 Register scratch, |
| 753 bool is_store, | 753 bool is_store, |
| 754 int argc, | 754 int argc, |
| 755 Register* values) { | 755 Register* values) { |
| 756 ASSERT(!AreAliased(receiver, scratch)); | 756 ASSERT(!AreAliased(receiver, scratch)); |
| 757 __ Push(receiver); | 757 |
| 758 // Write the arguments to stack frame. | 758 MacroAssembler::PushPopQueue queue(masm); |
| 759 queue.Queue(receiver); |
| 760 // Write the arguments to the stack frame. |
| 759 for (int i = 0; i < argc; i++) { | 761 for (int i = 0; i < argc; i++) { |
| 760 // TODO(jbramley): Push these in as few Push() calls as possible. | |
| 761 Register arg = values[argc-1-i]; | 762 Register arg = values[argc-1-i]; |
| 762 ASSERT(!AreAliased(receiver, scratch, arg)); | 763 ASSERT(!AreAliased(receiver, scratch, arg)); |
| 763 __ Push(arg); | 764 queue.Queue(arg); |
| 764 } | 765 } |
| 766 queue.PushQueued(); |
| 765 | 767 |
| 766 ASSERT(optimization.is_simple_api_call()); | 768 ASSERT(optimization.is_simple_api_call()); |
| 767 | 769 |
| 768 // Abi for CallApiFunctionStub. | 770 // Abi for CallApiFunctionStub. |
| 769 Register callee = x0; | 771 Register callee = x0; |
| 770 Register call_data = x4; | 772 Register call_data = x4; |
| 771 Register holder = x2; | 773 Register holder = x2; |
| 772 Register api_function_address = x1; | 774 Register api_function_address = x1; |
| 773 | 775 |
| 774 // Put holder in place. | 776 // Put holder in place. |
| (...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 | 1537 |
| 1536 // Miss case, call the runtime. | 1538 // Miss case, call the runtime. |
| 1537 __ Bind(&miss); | 1539 __ Bind(&miss); |
| 1538 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); | 1540 TailCallBuiltin(masm, Builtins::kKeyedLoadIC_Miss); |
| 1539 } | 1541 } |
| 1540 | 1542 |
| 1541 | 1543 |
| 1542 } } // namespace v8::internal | 1544 } } // namespace v8::internal |
| 1543 | 1545 |
| 1544 #endif // V8_TARGET_ARCH_A64 | 1546 #endif // V8_TARGET_ARCH_A64 |
| OLD | NEW |