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

Side by Side Diff: src/x64/code-stubs-x64.cc

Issue 43693002: Correctly setup exit frame when calling into allocation tracker (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Added PrintName Created 7 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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);
Yang 2013/10/30 15:12:57 If you need to erect a frame and also pass the iso
yurys 2013/10/31 08:56:01 There are two reasons for this: 1. CallRuntime doe
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
OLDNEW
« no previous file with comments | « src/frames-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | src/x64/macro-assembler-x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698