Index: src/codegen.cc |
=================================================================== |
--- src/codegen.cc (revision 4816) |
+++ src/codegen.cc (working copy) |
@@ -415,32 +415,41 @@ |
} |
-void CodeGenerator::RecordPositions(MacroAssembler* masm, int pos) { |
+bool CodeGenerator::RecordPositions(MacroAssembler* masm, |
+ int pos, |
+ bool right_here) { |
if (pos != RelocInfo::kNoPosition) { |
masm->RecordStatementPosition(pos); |
masm->RecordPosition(pos); |
+ if (right_here) { |
+ return masm->WriteRecordedPositions(); |
+ } |
} |
+ return false; |
} |
void CodeGenerator::CodeForFunctionPosition(FunctionLiteral* fun) { |
- if (FLAG_debug_info) RecordPositions(masm(), fun->start_position()); |
+ if (FLAG_debug_info) RecordPositions(masm(), fun->start_position(), false); |
} |
void CodeGenerator::CodeForReturnPosition(FunctionLiteral* fun) { |
- if (FLAG_debug_info) RecordPositions(masm(), fun->end_position()); |
+ if (FLAG_debug_info) RecordPositions(masm(), fun->end_position(), false); |
} |
void CodeGenerator::CodeForStatementPosition(Statement* stmt) { |
- if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos()); |
+ if (FLAG_debug_info) RecordPositions(masm(), stmt->statement_pos(), false); |
} |
+ |
void CodeGenerator::CodeForDoWhileConditionPosition(DoWhileStatement* stmt) { |
- if (FLAG_debug_info) RecordPositions(masm(), stmt->condition_position()); |
+ if (FLAG_debug_info) |
+ RecordPositions(masm(), stmt->condition_position(), false); |
} |
+ |
void CodeGenerator::CodeForSourcePosition(int pos) { |
if (FLAG_debug_info && pos != RelocInfo::kNoPosition) { |
masm()->RecordPosition(pos); |