Index: src/safepoint-table.cc |
diff --git a/src/safepoint-table.cc b/src/safepoint-table.cc |
index edc951d5278b4d4e62e75270c3d27e00704196d1..d00b751a05818344d71fb2b8b2bbd3d948a2c6bd 100644 |
--- a/src/safepoint-table.cc |
+++ b/src/safepoint-table.cc |
@@ -17,8 +17,8 @@ namespace internal { |
bool SafepointEntry::HasRegisters() const { |
- ASSERT(is_valid()); |
- ASSERT(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
+ DCHECK(is_valid()); |
+ DCHECK(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
const int num_reg_bytes = kNumSafepointRegisters >> kBitsPerByteLog2; |
for (int i = 0; i < num_reg_bytes; i++) { |
if (bits_[i] != SafepointTable::kNoRegisters) return true; |
@@ -28,8 +28,8 @@ bool SafepointEntry::HasRegisters() const { |
bool SafepointEntry::HasRegisterAt(int reg_index) const { |
- ASSERT(is_valid()); |
- ASSERT(reg_index >= 0 && reg_index < kNumSafepointRegisters); |
+ DCHECK(is_valid()); |
+ DCHECK(reg_index >= 0 && reg_index < kNumSafepointRegisters); |
int byte_index = reg_index >> kBitsPerByteLog2; |
int bit_index = reg_index & (kBitsPerByte - 1); |
return (bits_[byte_index] & (1 << bit_index)) != 0; |
@@ -37,7 +37,7 @@ bool SafepointEntry::HasRegisterAt(int reg_index) const { |
SafepointTable::SafepointTable(Code* code) { |
- ASSERT(code->is_crankshafted()); |
+ DCHECK(code->is_crankshafted()); |
code_ = code; |
Address header = code->instruction_start() + code->safepoint_table_offset(); |
length_ = Memory::uint32_at(header + kLengthOffset); |
@@ -45,7 +45,7 @@ SafepointTable::SafepointTable(Code* code) { |
pc_and_deoptimization_indexes_ = header + kHeaderSize; |
entries_ = pc_and_deoptimization_indexes_ + |
(length_ * kPcAndDeoptimizationIndexSize); |
- ASSERT(entry_size_ > 0); |
+ DCHECK(entry_size_ > 0); |
STATIC_ASSERT(SafepointEntry::DeoptimizationIndexField::kMax == |
Safepoint::kNoDeoptimizationIndex); |
} |
@@ -68,7 +68,7 @@ void SafepointTable::PrintEntry(unsigned index, OStream& os) const { // NOLINT |
// Print the stack slot bits. |
if (entry_size_ > 0) { |
- ASSERT(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
+ DCHECK(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
const int first = kNumSafepointRegisters >> kBitsPerByteLog2; |
int last = entry_size_ - 1; |
for (int i = first; i < last; i++) PrintBits(os, bits[i], kBitsPerByte); |
@@ -88,7 +88,7 @@ void SafepointTable::PrintEntry(unsigned index, OStream& os) const { // NOLINT |
void SafepointTable::PrintBits(OStream& os, // NOLINT |
uint8_t byte, int digits) { |
- ASSERT(digits >= 0 && digits <= kBitsPerByte); |
+ DCHECK(digits >= 0 && digits <= kBitsPerByte); |
for (int i = 0; i < digits; i++) { |
os << (((byte & (1 << i)) == 0) ? "0" : "1"); |
} |
@@ -105,7 +105,7 @@ Safepoint SafepointTableBuilder::DefineSafepoint( |
Safepoint::Kind kind, |
int arguments, |
Safepoint::DeoptMode deopt_mode) { |
- ASSERT(arguments >= 0); |
+ DCHECK(arguments >= 0); |
DeoptimizationInfo info; |
info.pc = assembler->pc_offset(); |
info.arguments = arguments; |
@@ -131,7 +131,7 @@ void SafepointTableBuilder::RecordLazyDeoptimizationIndex(int index) { |
} |
unsigned SafepointTableBuilder::GetCodeOffset() const { |
- ASSERT(emitted_); |
+ DCHECK(emitted_); |
return offset_; |
} |
@@ -170,7 +170,7 @@ void SafepointTableBuilder::Emit(Assembler* assembler, int bits_per_entry) { |
bits.AddBlock(0, bytes_per_entry, zone_); |
// Run through the registers (if any). |
- ASSERT(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
+ DCHECK(IsAligned(kNumSafepointRegisters, kBitsPerByte)); |
if (registers == NULL) { |
const int num_reg_bytes = kNumSafepointRegisters >> kBitsPerByteLog2; |
for (int j = 0; j < num_reg_bytes; j++) { |
@@ -179,7 +179,7 @@ void SafepointTableBuilder::Emit(Assembler* assembler, int bits_per_entry) { |
} else { |
for (int j = 0; j < registers->length(); j++) { |
int index = registers->at(j); |
- ASSERT(index >= 0 && index < kNumSafepointRegisters); |
+ DCHECK(index >= 0 && index < kNumSafepointRegisters); |
int byte_index = index >> kBitsPerByteLog2; |
int bit_index = index & (kBitsPerByte - 1); |
bits[byte_index] |= (1 << bit_index); |