Reviewers: alph, loislo, Alexandra Mikhaylova, Hannes Payer,

Message:
I've got a test for this change (https://codereview.chromium.org/43713002/)
which I'd love to include into this patch but the test wouldn't work because of
https://code.google.com/p/v8/issues/detail?id=2960.

Description:
Correctly setup exit frame when calling into allocation tracker

Generated code should change Isolate::c_entry_fp value so that it points to the top exit frame otherwise StackTraceFrameIterator will not be able to find top
frame.

BUG=None

Please review this at https://codereview.chromium.org/43693002/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+10, -2 lines):
  M src/x64/macro-assembler-x64.cc


Index: src/x64/macro-assembler-x64.cc
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
index 075f07cc353e991fd7969a49725599cb5fcfd45b..e3b94cec1dd83e9a61e8f4b0a6f6cae79b431624 100644
--- a/src/x64/macro-assembler-x64.cc
+++ b/src/x64/macro-assembler-x64.cc
@@ -4939,7 +4939,9 @@ void MacroAssembler::TestJSArrayForAllocationMemento(
 void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
                                             Register object,
                                             Register object_size) {
-  FrameScope frame(this, StackFrame::EXIT);
+  FrameScope scope(this, StackFrame::MANUAL);
+  EnterApiExitFrame(0);
+
   PushSafepointRegisters();
   PrepareCallCFunction(3);
   // In case object is rdx
@@ -4950,13 +4952,17 @@ void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
   CallCFunction(
       ExternalReference::record_object_allocation_function(isolate), 3);
   PopSafepointRegisters();
+
+  LeaveApiExitFrame(false);
 }


 void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
                                             Register object,
                                             int object_size) {
-  FrameScope frame(this, StackFrame::EXIT);
+  FrameScope scope(this, StackFrame::MANUAL);
+  EnterApiExitFrame(0);
+
   PushSafepointRegisters();
   PrepareCallCFunction(3);
   movq(arg_reg_2, object);
@@ -4965,6 +4971,8 @@ void MacroAssembler::RecordObjectAllocation(Isolate* isolate,
   CallCFunction(
       ExternalReference::record_object_allocation_function(isolate), 3);
   PopSafepointRegisters();
+
+  LeaveApiExitFrame(false);
 }




--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to