Index: src/safepoint-table.cc |
diff --git a/src/safepoint-table.cc b/src/safepoint-table.cc |
index e041e17ca9f8c78d35e04f6834b296d1ab2709db..a619228ab23090e78b41bc3b9755851b2831196a 100644 |
--- a/src/safepoint-table.cc |
+++ b/src/safepoint-table.cc |
@@ -60,7 +60,7 @@ SafepointEntry SafepointTable::FindEntry(Address pc) const { |
} |
-void SafepointTable::PrintEntry(unsigned index, FILE* out) const { |
+void SafepointTable::PrintEntry(unsigned index, OStream& os) const { // NOLINT |
disasm::NameConverter converter; |
SafepointEntry entry = GetEntry(index); |
uint8_t* bits = entry.bits(); |
@@ -70,25 +70,26 @@ void SafepointTable::PrintEntry(unsigned index, FILE* out) const { |
ASSERT(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
const int first = kNumSafepointRegisters >> kBitsPerByteLog2; |
int last = entry_size_ - 1; |
- for (int i = first; i < last; i++) PrintBits(out, bits[i], kBitsPerByte); |
+ for (int i = first; i < last; i++) PrintBits(os, bits[i], kBitsPerByte); |
int last_bits = code_->stack_slots() - ((last - first) * kBitsPerByte); |
- PrintBits(out, bits[last], last_bits); |
+ PrintBits(os, bits[last], last_bits); |
// Print the registers (if any). |
if (!entry.HasRegisters()) return; |
for (int j = 0; j < kNumSafepointRegisters; j++) { |
if (entry.HasRegisterAt(j)) { |
- PrintF(out, " | %s", converter.NameOfCPURegister(j)); |
+ os << " | " << converter.NameOfCPURegister(j); |
} |
} |
} |
} |
-void SafepointTable::PrintBits(FILE* out, uint8_t byte, int digits) { |
+void SafepointTable::PrintBits(OStream& os, // NOLINT |
+ uint8_t byte, int digits) { |
ASSERT(digits >= 0 && digits <= kBitsPerByte); |
for (int i = 0; i < digits; i++) { |
- PrintF(out, "%c", ((byte & (1 << i)) == 0) ? '0' : '1'); |
+ os << (((byte & (1 << i)) == 0) ? "0" : "1"); |
} |
} |