Index: src/x64/fast-codegen-x64.cc |
=================================================================== |
--- src/x64/fast-codegen-x64.cc (revision 3101) |
+++ src/x64/fast-codegen-x64.cc (working copy) |
@@ -78,6 +78,10 @@ |
VisitDeclarations(fun->scope()->declarations()); |
} |
+ if (FLAG_trace) { |
+ __ CallRuntime(Runtime::kTraceEnter, 0); |
+ } |
+ |
{ Comment cmnt(masm_, "[ Body"); |
VisitStatements(fun->body()); |
} |
@@ -87,7 +91,12 @@ |
// body. |
__ LoadRoot(rax, Heap::kUndefinedValueRootIndex); |
SetReturnPosition(fun); |
+ if (FLAG_trace) { |
+ __ push(rax); |
+ __ CallRuntime(Runtime::kTraceExit, 1); |
+ } |
__ RecordJSReturn(); |
+ |
// Do not use the leave instruction here because it is too short to |
// patch with the code required by the debugger. |
__ movq(rsp, rbp); |
@@ -146,6 +155,11 @@ |
ASSERT(expr->AsLiteral() != NULL); |
__ Move(rax, expr->AsLiteral()->handle()); |
} |
+ if (FLAG_trace) { |
+ __ push(rax); |
+ __ CallRuntime(Runtime::kTraceExit, 1); |
+ } |
+ |
__ RecordJSReturn(); |
// Do not use the leave instruction here because it is too short to |
// patch with the code required by the debugger. |