Index: src/ia32/assembler-ia32.cc |
=================================================================== |
--- src/ia32/assembler-ia32.cc (revision 4816) |
+++ src/ia32/assembler-ia32.cc (working copy) |
@@ -206,6 +206,7 @@ |
patcher.masm()->SizeOfCodeGeneratedSince(&check_codesize)); |
// Add the requested number of int3 instructions after the call. |
+ ASSERT_GE(guard_bytes, 0); |
for (int i = 0; i < guard_bytes; i++) { |
patcher.masm()->int3(); |
} |
@@ -2371,6 +2372,13 @@ |
} |
+void Assembler::RecordDebugBreakSlot() { |
+ WriteRecordedPositions(); |
+ EnsureSpace ensure_space(this); |
+ RecordRelocInfo(RelocInfo::DEBUG_BREAK_SLOT); |
+} |
+ |
+ |
void Assembler::RecordComment(const char* msg) { |
if (FLAG_debug_code) { |
EnsureSpace ensure_space(this); |
@@ -2393,13 +2401,16 @@ |
} |
-void Assembler::WriteRecordedPositions() { |
+bool Assembler::WriteRecordedPositions() { |
+ bool written = false; |
+ |
// Write the statement position if it is different from what was written last |
// time. |
if (current_statement_position_ != written_statement_position_) { |
EnsureSpace ensure_space(this); |
RecordRelocInfo(RelocInfo::STATEMENT_POSITION, current_statement_position_); |
written_statement_position_ = current_statement_position_; |
+ written = true; |
} |
// Write the position if it is different from what was written last time and |
@@ -2409,7 +2420,11 @@ |
EnsureSpace ensure_space(this); |
RecordRelocInfo(RelocInfo::POSITION, current_position_); |
written_position_ = current_position_; |
+ written = true; |
} |
+ |
+ // Return whether something was written. |
+ return written; |
} |