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 5799 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5810 Label fast_elements_case; | 5810 Label fast_elements_case; |
5811 __ cmpl(rcx, Immediate(FAST_ELEMENTS)); | 5811 __ cmpl(rcx, Immediate(FAST_ELEMENTS)); |
5812 __ j(equal, &fast_elements_case); | 5812 __ j(equal, &fast_elements_case); |
5813 GenerateCase(masm, FAST_HOLEY_ELEMENTS); | 5813 GenerateCase(masm, FAST_HOLEY_ELEMENTS); |
5814 | 5814 |
5815 __ bind(&fast_elements_case); | 5815 __ bind(&fast_elements_case); |
5816 GenerateCase(masm, FAST_ELEMENTS); | 5816 GenerateCase(masm, FAST_ELEMENTS); |
5817 } | 5817 } |
5818 | 5818 |
5819 | 5819 |
| 5820 void RecordObjectAllocationStub::Generate(MacroAssembler* masm) { |
| 5821 // ----------- S t a t e ------------- |
| 5822 // -- rsp[0] : return address |
| 5823 // -- rsp[8] : new object address |
| 5824 // -- rsp[16] : object size |
| 5825 // ----------------------------------- |
| 5826 Isolate* isolate = masm->isolate(); |
| 5827 FrameScope scope(masm, StackFrame::MANUAL); |
| 5828 __ EnterApiExitFrame(0); |
| 5829 |
| 5830 __ PushSafepointRegisters(); |
| 5831 __ PrepareCallCFunction(3); |
| 5832 __ movq(arg_reg_3, Operand(rbp, |
| 5833 kFPOnStackSize + kPCOnStackSize + 1 * kPointerSize)); |
| 5834 __ movq(arg_reg_2, Operand(rbp, kFPOnStackSize + kPCOnStackSize)); |
| 5835 __ movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE); |
| 5836 __ CallCFunction( |
| 5837 ExternalReference::record_object_allocation_function(isolate), 3); |
| 5838 __ PopSafepointRegisters(); |
| 5839 |
| 5840 __ LeaveApiExitFrame(false); |
| 5841 __ ret(0); |
| 5842 } |
| 5843 |
| 5844 |
5820 #undef __ | 5845 #undef __ |
5821 | 5846 |
5822 } } // namespace v8::internal | 5847 } } // namespace v8::internal |
5823 | 5848 |
5824 #endif // V8_TARGET_ARCH_X64 | 5849 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |