Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(750)

Unified Diff: src/lithium-allocator.cc

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/lithium-allocator.h ('k') | src/lithium-allocator-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lithium-allocator.cc
diff --git a/src/lithium-allocator.cc b/src/lithium-allocator.cc
index 0ccb77399b8198d43053df1d479a8c326df0c5ec..8350c80bbfd951cd781d189836c0a150066e172a 100644
--- a/src/lithium-allocator.cc
+++ b/src/lithium-allocator.cc
@@ -37,7 +37,7 @@ UsePosition::UsePosition(LifetimePosition pos,
unalloc->HasDoubleRegisterPolicy();
register_beneficial_ = !unalloc->HasAnyPolicy();
}
- ASSERT(pos_.IsValid());
+ DCHECK(pos_.IsValid());
}
@@ -57,7 +57,7 @@ bool UsePosition::RegisterIsBeneficial() const {
void UseInterval::SplitAt(LifetimePosition pos, Zone* zone) {
- ASSERT(Contains(pos) && pos.Value() != start().Value());
+ DCHECK(Contains(pos) && pos.Value() != start().Value());
UseInterval* after = new(zone) UseInterval(pos, end_);
after->next_ = next_;
next_ = after;
@@ -71,7 +71,7 @@ void UseInterval::SplitAt(LifetimePosition pos, Zone* zone) {
void LiveRange::Verify() const {
UsePosition* cur = first_pos_;
while (cur != NULL) {
- ASSERT(Start().Value() <= cur->pos().Value() &&
+ DCHECK(Start().Value() <= cur->pos().Value() &&
cur->pos().Value() <= End().Value());
cur = cur->next();
}
@@ -113,15 +113,15 @@ LiveRange::LiveRange(int id, Zone* zone)
void LiveRange::set_assigned_register(int reg, Zone* zone) {
- ASSERT(!HasRegisterAssigned() && !IsSpilled());
+ DCHECK(!HasRegisterAssigned() && !IsSpilled());
assigned_register_ = reg;
ConvertOperands(zone);
}
void LiveRange::MakeSpilled(Zone* zone) {
- ASSERT(!IsSpilled());
- ASSERT(TopLevel()->HasAllocatedSpillOperand());
+ DCHECK(!IsSpilled());
+ DCHECK(TopLevel()->HasAllocatedSpillOperand());
spilled_ = true;
assigned_register_ = kInvalidAssignment;
ConvertOperands(zone);
@@ -129,15 +129,15 @@ void LiveRange::MakeSpilled(Zone* zone) {
bool LiveRange::HasAllocatedSpillOperand() const {
- ASSERT(spill_operand_ != NULL);
+ DCHECK(spill_operand_ != NULL);
return !spill_operand_->IsIgnored();
}
void LiveRange::SetSpillOperand(LOperand* operand) {
- ASSERT(!operand->IsUnallocated());
- ASSERT(spill_operand_ != NULL);
- ASSERT(spill_operand_->IsIgnored());
+ DCHECK(!operand->IsUnallocated());
+ DCHECK(spill_operand_ != NULL);
+ DCHECK(spill_operand_->IsIgnored());
spill_operand_->ConvertTo(operand->kind(), operand->index());
}
@@ -197,7 +197,7 @@ bool LiveRange::CanBeSpilled(LifetimePosition pos) {
LOperand* LiveRange::CreateAssignedOperand(Zone* zone) {
LOperand* op = NULL;
if (HasRegisterAssigned()) {
- ASSERT(!IsSpilled());
+ DCHECK(!IsSpilled());
switch (Kind()) {
case GENERAL_REGISTERS:
op = LRegister::Create(assigned_register(), zone);
@@ -209,9 +209,9 @@ LOperand* LiveRange::CreateAssignedOperand(Zone* zone) {
UNREACHABLE();
}
} else if (IsSpilled()) {
- ASSERT(!HasRegisterAssigned());
+ DCHECK(!HasRegisterAssigned());
op = TopLevel()->GetSpillOperand();
- ASSERT(!op->IsUnallocated());
+ DCHECK(!op->IsUnallocated());
} else {
LUnallocated* unalloc = new(zone) LUnallocated(LUnallocated::NONE);
unalloc->set_virtual_register(id_);
@@ -248,8 +248,8 @@ void LiveRange::AdvanceLastProcessedMarker(
void LiveRange::SplitAt(LifetimePosition position,
LiveRange* result,
Zone* zone) {
- ASSERT(Start().Value() < position.Value());
- ASSERT(result->IsEmpty());
+ DCHECK(Start().Value() < position.Value());
+ DCHECK(result->IsEmpty());
// Find the last interval that ends before the position. If the
// position is contained in one of the intervals in the chain, we
// split that interval and use the first part.
@@ -353,9 +353,9 @@ bool LiveRange::ShouldBeAllocatedBefore(const LiveRange* other) const {
void LiveRange::ShortenTo(LifetimePosition start) {
LAllocator::TraceAlloc("Shorten live range %d to [%d\n", id_, start.Value());
- ASSERT(first_interval_ != NULL);
- ASSERT(first_interval_->start().Value() <= start.Value());
- ASSERT(start.Value() < first_interval_->end().Value());
+ DCHECK(first_interval_ != NULL);
+ DCHECK(first_interval_->start().Value() <= start.Value());
+ DCHECK(start.Value() < first_interval_->end().Value());
first_interval_->set_start(start);
}
@@ -407,7 +407,7 @@ void LiveRange::AddUseInterval(LifetimePosition start,
// Order of instruction's processing (see ProcessInstructions) guarantees
// that each new use interval either precedes or intersects with
// last added interval.
- ASSERT(start.Value() < first_interval_->end().Value());
+ DCHECK(start.Value() < first_interval_->end().Value());
first_interval_->start_ = Min(start, first_interval_->start_);
first_interval_->end_ = Max(end, first_interval_->end_);
}
@@ -450,11 +450,11 @@ void LiveRange::ConvertOperands(Zone* zone) {
LOperand* op = CreateAssignedOperand(zone);
UsePosition* use_pos = first_pos();
while (use_pos != NULL) {
- ASSERT(Start().Value() <= use_pos->pos().Value() &&
+ DCHECK(Start().Value() <= use_pos->pos().Value() &&
use_pos->pos().Value() <= End().Value());
if (use_pos->HasOperand()) {
- ASSERT(op->IsRegister() || op->IsDoubleRegister() ||
+ DCHECK(op->IsRegister() || op->IsDoubleRegister() ||
!use_pos->RequiresRegister());
use_pos->operand()->ConvertTo(op->kind(), op->index());
}
@@ -476,7 +476,7 @@ bool LiveRange::Covers(LifetimePosition position) {
for (UseInterval* interval = start_search;
interval != NULL;
interval = interval->next()) {
- ASSERT(interval->next() == NULL ||
+ DCHECK(interval->next() == NULL ||
interval->next()->start().Value() >= interval->start().Value());
AdvanceLastProcessedMarker(interval, position);
if (interval->Contains(position)) return true;
@@ -594,7 +594,7 @@ LOperand* LAllocator::AllocateFixed(LUnallocated* operand,
int pos,
bool is_tagged) {
TraceAlloc("Allocating fixed reg for op %d\n", operand->virtual_register());
- ASSERT(operand->HasFixedPolicy());
+ DCHECK(operand->HasFixedPolicy());
if (operand->HasFixedSlotPolicy()) {
operand->ConvertTo(LOperand::STACK_SLOT, operand->fixed_slot_index());
} else if (operand->HasFixedRegisterPolicy()) {
@@ -618,11 +618,11 @@ LOperand* LAllocator::AllocateFixed(LUnallocated* operand,
LiveRange* LAllocator::FixedLiveRangeFor(int index) {
- ASSERT(index < Register::kMaxNumAllocatableRegisters);
+ DCHECK(index < Register::kMaxNumAllocatableRegisters);
LiveRange* result = fixed_live_ranges_[index];
if (result == NULL) {
result = new(zone()) LiveRange(FixedLiveRangeID(index), chunk()->zone());
- ASSERT(result->IsFixed());
+ DCHECK(result->IsFixed());
result->kind_ = GENERAL_REGISTERS;
SetLiveRangeAssignedRegister(result, index);
fixed_live_ranges_[index] = result;
@@ -632,12 +632,12 @@ LiveRange* LAllocator::FixedLiveRangeFor(int index) {
LiveRange* LAllocator::FixedDoubleLiveRangeFor(int index) {
- ASSERT(index < DoubleRegister::NumAllocatableRegisters());
+ DCHECK(index < DoubleRegister::NumAllocatableRegisters());
LiveRange* result = fixed_double_live_ranges_[index];
if (result == NULL) {
result = new(zone()) LiveRange(FixedDoubleLiveRangeID(index),
chunk()->zone());
- ASSERT(result->IsFixed());
+ DCHECK(result->IsFixed());
result->kind_ = DOUBLE_REGISTERS;
SetLiveRangeAssignedRegister(result, index);
fixed_double_live_ranges_[index] = result;
@@ -827,7 +827,7 @@ void LAllocator::MeetConstraintsBetween(LInstruction* first,
} else if (cur_input->HasWritableRegisterPolicy()) {
// The live range of writable input registers always goes until the end
// of the instruction.
- ASSERT(!cur_input->IsUsedAtStart());
+ DCHECK(!cur_input->IsUsedAtStart());
LUnallocated* input_copy = cur_input->CopyUnconstrained(
chunk()->zone());
@@ -927,7 +927,7 @@ void LAllocator::ProcessInstructions(HBasicBlock* block, BitVector* live) {
}
}
} else {
- ASSERT(!IsGapAt(index));
+ DCHECK(!IsGapAt(index));
LInstruction* instr = InstructionAt(index);
if (instr != NULL) {
@@ -1025,7 +1025,7 @@ void LAllocator::ResolvePhis(HBasicBlock* block) {
HConstant* constant = HConstant::cast(op);
operand = chunk_->DefineConstantOperand(constant);
} else {
- ASSERT(!op->EmitAtUses());
+ DCHECK(!op->EmitAtUses());
LUnallocated* unalloc =
new(chunk()->zone()) LUnallocated(LUnallocated::ANY);
unalloc->set_virtual_register(op->id());
@@ -1067,7 +1067,7 @@ void LAllocator::ResolvePhis(HBasicBlock* block) {
bool LAllocator::Allocate(LChunk* chunk) {
- ASSERT(chunk_ == NULL);
+ DCHECK(chunk_ == NULL);
chunk_ = static_cast<LPlatformChunk*>(chunk);
assigned_registers_ =
new(chunk->zone()) BitVector(Register::NumAllocatableRegisters(),
@@ -1125,18 +1125,18 @@ void LAllocator::ResolveControlFlow(LiveRange* range,
LiveRange* cur_range = range;
while (cur_range != NULL && (cur_cover == NULL || pred_cover == NULL)) {
if (cur_range->CanCover(cur_start)) {
- ASSERT(cur_cover == NULL);
+ DCHECK(cur_cover == NULL);
cur_cover = cur_range;
}
if (cur_range->CanCover(pred_end)) {
- ASSERT(pred_cover == NULL);
+ DCHECK(pred_cover == NULL);
pred_cover = cur_range;
}
cur_range = cur_range->next();
}
if (cur_cover->IsSpilled()) return;
- ASSERT(pred_cover != NULL && cur_cover != NULL);
+ DCHECK(pred_cover != NULL && cur_cover != NULL);
if (pred_cover != cur_cover) {
LOperand* pred_op = pred_cover->CreateAssignedOperand(chunk()->zone());
LOperand* cur_op = cur_cover->CreateAssignedOperand(chunk()->zone());
@@ -1145,7 +1145,7 @@ void LAllocator::ResolveControlFlow(LiveRange* range,
if (block->predecessors()->length() == 1) {
gap = GapAt(block->first_instruction_index());
} else {
- ASSERT(pred->end()->SecondSuccessor() == NULL);
+ DCHECK(pred->end()->SecondSuccessor() == NULL);
gap = GetLastGap(pred);
// We are going to insert a move before the branch instruction.
@@ -1294,7 +1294,7 @@ void LAllocator::BuildLiveRanges() {
break;
}
}
- ASSERT(hint != NULL);
+ DCHECK(hint != NULL);
LifetimePosition block_start = LifetimePosition::FromInstructionIndex(
block->first_instruction_index());
@@ -1341,7 +1341,7 @@ void LAllocator::BuildLiveRanges() {
CodeStub::Major major_key = chunk_->info()->code_stub()->MajorKey();
PrintF("Function: %s\n", CodeStub::MajorName(major_key, false));
} else {
- ASSERT(chunk_->info()->IsOptimizing());
+ DCHECK(chunk_->info()->IsOptimizing());
AllowHandleDereference allow_deref;
PrintF("Function: %s\n",
chunk_->info()->function()->debug_name()->ToCString().get());
@@ -1351,7 +1351,7 @@ void LAllocator::BuildLiveRanges() {
PrintF("First use is at %d\n", range->first_pos()->pos().Value());
iterator.Advance();
}
- ASSERT(!found);
+ DCHECK(!found);
}
#endif
}
@@ -1380,7 +1380,7 @@ void LAllocator::PopulatePointerMaps() {
LAllocatorPhase phase("L_Populate pointer maps", this);
const ZoneList<LPointerMap*>* pointer_maps = chunk_->pointer_maps();
- ASSERT(SafePointsAreInOrder());
+ DCHECK(SafePointsAreInOrder());
// Iterate over all safe point positions and record a pointer
// for all spilled live ranges at this point.
@@ -1402,7 +1402,7 @@ void LAllocator::PopulatePointerMaps() {
for (LiveRange* cur = range; cur != NULL; cur = cur->next()) {
LifetimePosition this_end = cur->End();
if (this_end.InstructionIndex() > end) end = this_end.InstructionIndex();
- ASSERT(cur->Start().InstructionIndex() >= start);
+ DCHECK(cur->Start().InstructionIndex() >= start);
}
// Most of the ranges are in order, but not all. Keep an eye on when
@@ -1456,7 +1456,7 @@ void LAllocator::PopulatePointerMaps() {
"at safe point %d\n",
cur->id(), cur->Start().Value(), safe_point);
LOperand* operand = cur->CreateAssignedOperand(chunk()->zone());
- ASSERT(!operand->IsStackSlot());
+ DCHECK(!operand->IsStackSlot());
map->RecordPointer(operand, chunk()->zone());
}
}
@@ -1481,7 +1481,7 @@ void LAllocator::AllocateDoubleRegisters() {
void LAllocator::AllocateRegisters() {
- ASSERT(unhandled_live_ranges_.is_empty());
+ DCHECK(unhandled_live_ranges_.is_empty());
for (int i = 0; i < live_ranges_.length(); ++i) {
if (live_ranges_[i] != NULL) {
@@ -1491,11 +1491,11 @@ void LAllocator::AllocateRegisters() {
}
}
SortUnhandled();
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
- ASSERT(reusable_slots_.is_empty());
- ASSERT(active_live_ranges_.is_empty());
- ASSERT(inactive_live_ranges_.is_empty());
+ DCHECK(reusable_slots_.is_empty());
+ DCHECK(active_live_ranges_.is_empty());
+ DCHECK(inactive_live_ranges_.is_empty());
if (mode_ == DOUBLE_REGISTERS) {
for (int i = 0; i < DoubleRegister::NumAllocatableRegisters(); ++i) {
@@ -1505,7 +1505,7 @@ void LAllocator::AllocateRegisters() {
}
}
} else {
- ASSERT(mode_ == GENERAL_REGISTERS);
+ DCHECK(mode_ == GENERAL_REGISTERS);
for (int i = 0; i < fixed_live_ranges_.length(); ++i) {
LiveRange* current = fixed_live_ranges_.at(i);
if (current != NULL) {
@@ -1515,9 +1515,9 @@ void LAllocator::AllocateRegisters() {
}
while (!unhandled_live_ranges_.is_empty()) {
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
LiveRange* current = unhandled_live_ranges_.RemoveLast();
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
LifetimePosition position = current->Start();
#ifdef DEBUG
allocation_finger_ = position;
@@ -1544,7 +1544,7 @@ void LAllocator::AllocateRegisters() {
// the register is too close to the start of live range.
SpillBetween(current, current->Start(), pos->pos());
if (!AllocationOk()) return;
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
continue;
}
}
@@ -1571,7 +1571,7 @@ void LAllocator::AllocateRegisters() {
}
}
- ASSERT(!current->HasRegisterAssigned() && !current->IsSpilled());
+ DCHECK(!current->HasRegisterAssigned() && !current->IsSpilled());
bool result = TryAllocateFreeReg(current);
if (!AllocationOk()) return;
@@ -1645,33 +1645,33 @@ void LAllocator::AddToInactive(LiveRange* range) {
void LAllocator::AddToUnhandledSorted(LiveRange* range) {
if (range == NULL || range->IsEmpty()) return;
- ASSERT(!range->HasRegisterAssigned() && !range->IsSpilled());
- ASSERT(allocation_finger_.Value() <= range->Start().Value());
+ DCHECK(!range->HasRegisterAssigned() && !range->IsSpilled());
+ DCHECK(allocation_finger_.Value() <= range->Start().Value());
for (int i = unhandled_live_ranges_.length() - 1; i >= 0; --i) {
LiveRange* cur_range = unhandled_live_ranges_.at(i);
if (range->ShouldBeAllocatedBefore(cur_range)) {
TraceAlloc("Add live range %d to unhandled at %d\n", range->id(), i + 1);
unhandled_live_ranges_.InsertAt(i + 1, range, zone());
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
return;
}
}
TraceAlloc("Add live range %d to unhandled at start\n", range->id());
unhandled_live_ranges_.InsertAt(0, range, zone());
- ASSERT(UnhandledIsSorted());
+ DCHECK(UnhandledIsSorted());
}
void LAllocator::AddToUnhandledUnsorted(LiveRange* range) {
if (range == NULL || range->IsEmpty()) return;
- ASSERT(!range->HasRegisterAssigned() && !range->IsSpilled());
+ DCHECK(!range->HasRegisterAssigned() && !range->IsSpilled());
TraceAlloc("Add live range %d to unhandled unsorted at end\n", range->id());
unhandled_live_ranges_.Add(range, zone());
}
static int UnhandledSortHelper(LiveRange* const* a, LiveRange* const* b) {
- ASSERT(!(*a)->ShouldBeAllocatedBefore(*b) ||
+ DCHECK(!(*a)->ShouldBeAllocatedBefore(*b) ||
!(*b)->ShouldBeAllocatedBefore(*a));
if ((*a)->ShouldBeAllocatedBefore(*b)) return 1;
if ((*b)->ShouldBeAllocatedBefore(*a)) return -1;
@@ -1725,7 +1725,7 @@ LOperand* LAllocator::TryReuseSpillSlot(LiveRange* range) {
void LAllocator::ActiveToHandled(LiveRange* range) {
- ASSERT(active_live_ranges_.Contains(range));
+ DCHECK(active_live_ranges_.Contains(range));
active_live_ranges_.RemoveElement(range);
TraceAlloc("Moving live range %d from active to handled\n", range->id());
FreeSpillSlot(range);
@@ -1733,7 +1733,7 @@ void LAllocator::ActiveToHandled(LiveRange* range) {
void LAllocator::ActiveToInactive(LiveRange* range) {
- ASSERT(active_live_ranges_.Contains(range));
+ DCHECK(active_live_ranges_.Contains(range));
active_live_ranges_.RemoveElement(range);
inactive_live_ranges_.Add(range, zone());
TraceAlloc("Moving live range %d from active to inactive\n", range->id());
@@ -1741,7 +1741,7 @@ void LAllocator::ActiveToInactive(LiveRange* range) {
void LAllocator::InactiveToHandled(LiveRange* range) {
- ASSERT(inactive_live_ranges_.Contains(range));
+ DCHECK(inactive_live_ranges_.Contains(range));
inactive_live_ranges_.RemoveElement(range);
TraceAlloc("Moving live range %d from inactive to handled\n", range->id());
FreeSpillSlot(range);
@@ -1749,7 +1749,7 @@ void LAllocator::InactiveToHandled(LiveRange* range) {
void LAllocator::InactiveToActive(LiveRange* range) {
- ASSERT(inactive_live_ranges_.Contains(range));
+ DCHECK(inactive_live_ranges_.Contains(range));
inactive_live_ranges_.RemoveElement(range);
active_live_ranges_.Add(range, zone());
TraceAlloc("Moving live range %d from inactive to active\n", range->id());
@@ -1777,7 +1777,7 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) {
for (int i = 0; i < inactive_live_ranges_.length(); ++i) {
LiveRange* cur_inactive = inactive_live_ranges_.at(i);
- ASSERT(cur_inactive->End().Value() > current->Start().Value());
+ DCHECK(cur_inactive->End().Value() > current->Start().Value());
LifetimePosition next_intersection =
cur_inactive->FirstIntersection(current);
if (!next_intersection.IsValid()) continue;
@@ -1831,7 +1831,7 @@ bool LAllocator::TryAllocateFreeReg(LiveRange* current) {
// Register reg is available at the range start and is free until
// the range end.
- ASSERT(pos.Value() >= current->End().Value());
+ DCHECK(pos.Value() >= current->End().Value());
TraceAlloc("Assigning free reg %s to live range %d\n",
RegisterName(reg),
current->id());
@@ -1877,7 +1877,7 @@ void LAllocator::AllocateBlockedReg(LiveRange* current) {
for (int i = 0; i < inactive_live_ranges_.length(); ++i) {
LiveRange* range = inactive_live_ranges_.at(i);
- ASSERT(range->End().Value() > current->Start().Value());
+ DCHECK(range->End().Value() > current->Start().Value());
LifetimePosition next_intersection = range->FirstIntersection(current);
if (!next_intersection.IsValid()) continue;
int cur_reg = range->assigned_register();
@@ -1916,7 +1916,7 @@ void LAllocator::AllocateBlockedReg(LiveRange* current) {
}
// Register reg is not blocked for the whole range.
- ASSERT(block_pos[reg].Value() >= current->End().Value());
+ DCHECK(block_pos[reg].Value() >= current->End().Value());
TraceAlloc("Assigning blocked reg %s to live range %d\n",
RegisterName(reg),
current->id());
@@ -1963,7 +1963,7 @@ LifetimePosition LAllocator::FindOptimalSpillingPos(LiveRange* range,
void LAllocator::SplitAndSpillIntersecting(LiveRange* current) {
- ASSERT(current->HasRegisterAssigned());
+ DCHECK(current->HasRegisterAssigned());
int reg = current->assigned_register();
LifetimePosition split_pos = current->Start();
for (int i = 0; i < active_live_ranges_.length(); ++i) {
@@ -1992,7 +1992,7 @@ void LAllocator::SplitAndSpillIntersecting(LiveRange* current) {
for (int i = 0; i < inactive_live_ranges_.length(); ++i) {
LiveRange* range = inactive_live_ranges_[i];
- ASSERT(range->End().Value() > current->Start().Value());
+ DCHECK(range->End().Value() > current->Start().Value());
if (range->assigned_register() == reg && !range->IsFixed()) {
LifetimePosition next_intersection = range->FirstIntersection(current);
if (next_intersection.IsValid()) {
@@ -2019,14 +2019,14 @@ bool LAllocator::IsBlockBoundary(LifetimePosition pos) {
LiveRange* LAllocator::SplitRangeAt(LiveRange* range, LifetimePosition pos) {
- ASSERT(!range->IsFixed());
+ DCHECK(!range->IsFixed());
TraceAlloc("Splitting live range %d at %d\n", range->id(), pos.Value());
if (pos.Value() <= range->Start().Value()) return range;
// We can't properly connect liveranges if split occured at the end
// of control instruction.
- ASSERT(pos.IsInstructionStart() ||
+ DCHECK(pos.IsInstructionStart() ||
!chunk_->instructions()->at(pos.InstructionIndex())->IsControl());
int vreg = GetVirtualRegister();
@@ -2040,14 +2040,14 @@ LiveRange* LAllocator::SplitRangeAt(LiveRange* range, LifetimePosition pos) {
LiveRange* LAllocator::SplitBetween(LiveRange* range,
LifetimePosition start,
LifetimePosition end) {
- ASSERT(!range->IsFixed());
+ DCHECK(!range->IsFixed());
TraceAlloc("Splitting live range %d in position between [%d, %d]\n",
range->id(),
start.Value(),
end.Value());
LifetimePosition split_pos = FindOptimalSplitPos(start, end);
- ASSERT(split_pos.Value() >= start.Value());
+ DCHECK(split_pos.Value() >= start.Value());
return SplitRangeAt(range, split_pos);
}
@@ -2056,7 +2056,7 @@ LifetimePosition LAllocator::FindOptimalSplitPos(LifetimePosition start,
LifetimePosition end) {
int start_instr = start.InstructionIndex();
int end_instr = end.InstructionIndex();
- ASSERT(start_instr <= end_instr);
+ DCHECK(start_instr <= end_instr);
// We have no choice
if (start_instr == end_instr) return end;
@@ -2118,7 +2118,7 @@ void LAllocator::SpillBetweenUntil(LiveRange* range,
end.PrevInstruction().InstructionEnd());
if (!AllocationOk()) return;
- ASSERT(third_part != second_part);
+ DCHECK(third_part != second_part);
Spill(second_part);
AddToUnhandledSorted(third_part);
@@ -2131,7 +2131,7 @@ void LAllocator::SpillBetweenUntil(LiveRange* range,
void LAllocator::Spill(LiveRange* range) {
- ASSERT(!range->IsSpilled());
+ DCHECK(!range->IsSpilled());
TraceAlloc("Spilling live range %d\n", range->id());
LiveRange* first = range->TopLevel();
« no previous file with comments | « src/lithium-allocator.h ('k') | src/lithium-allocator-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698