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

Unified 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 comment Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: src/x64/code-stubs-x64.cc
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc
index b3ab8c1e7588306dda1dacc8d8f6f6f032700c7f..3371e5515414833fa8a53a14b9fbc1f85f255595 100644
--- a/src/x64/code-stubs-x64.cc
+++ b/src/x64/code-stubs-x64.cc
@@ -5817,6 +5817,31 @@ void InternalArrayConstructorStub::Generate(MacroAssembler* masm) {
}
+void RecordObjectAllocationStub::Generate(MacroAssembler* masm) {
+ // ----------- S t a t e -------------
+ // -- rsp[0] : return address
+ // -- rsp[8] : new object address
+ // -- rsp[16] : object size
+ // -----------------------------------
+ Isolate* isolate = masm->isolate();
+ FrameScope scope(masm, StackFrame::MANUAL);
+ __ EnterApiExitFrame(0);
+
+ __ PushSafepointRegisters();
+ __ PrepareCallCFunction(3);
+ __ movq(arg_reg_3, Operand(rbp,
+ kFPOnStackSize + kPCOnStackSize + 1 * kPointerSize));
+ __ movq(arg_reg_2, Operand(rbp, kFPOnStackSize + kPCOnStackSize));
+ __ movq(arg_reg_1, isolate, RelocInfo::EXTERNAL_REFERENCE);
+ __ CallCFunction(
+ ExternalReference::record_object_allocation_function(isolate), 3);
+ __ PopSafepointRegisters();
+
+ __ LeaveApiExitFrame(false);
+ __ ret(0);
+}
+
+
#undef __
} } // namespace v8::internal
« src/code-stubs.h ('K') | « src/frames-inl.h ('k') | src/x64/macro-assembler-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698