Index: src/arm/fast-codegen-arm.cc |
=================================================================== |
--- src/arm/fast-codegen-arm.cc (revision 3101) |
+++ src/arm/fast-codegen-arm.cc (working copy) |
@@ -89,6 +89,10 @@ |
VisitDeclarations(fun->scope()->declarations()); |
} |
+ if (FLAG_trace) { |
+ __ CallRuntime(Runtime::kTraceEnter, 0); |
+ } |
+ |
{ Comment cmnt(masm_, "[ Body"); |
VisitStatements(fun->body()); |
} |
@@ -98,6 +102,13 @@ |
// body. |
__ LoadRoot(r0, Heap::kUndefinedValueRootIndex); |
SetReturnPosition(fun); |
+ if (FLAG_trace) { |
+ // Push the return value on the stack as the parameter. |
+ // Runtime::TraceExit returns its parameter in r0. |
+ __ push(r0); |
+ __ CallRuntime(Runtime::kTraceExit, 1); |
+ } |
+ |
__ RecordJSReturn(); |
__ mov(sp, fp); |
__ ldm(ia_w, sp, fp.bit() | lr.bit()); |
@@ -150,6 +161,14 @@ |
ASSERT(expr->AsLiteral() != NULL); |
__ mov(r0, Operand(expr->AsLiteral()->handle())); |
} |
+ |
+ if (FLAG_trace) { |
+ // Push the return value on the stack as the parameter. |
+ // Runtime::TraceExit returns its parameter in r0. |
+ __ push(r0); |
+ __ CallRuntime(Runtime::kTraceExit, 1); |
+ } |
+ |
__ RecordJSReturn(); |
__ mov(sp, fp); |
__ ldm(ia_w, sp, fp.bit() | lr.bit()); |