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

Unified Diff: src/mips/regexp-macro-assembler-mips.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/mips/macro-assembler-mips.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/regexp-macro-assembler-mips.cc
diff --git a/src/mips/regexp-macro-assembler-mips.cc b/src/mips/regexp-macro-assembler-mips.cc
index e1a27295e8f7df9e40c34dcd2c59399c17bbec20..2bc66ecd25ab505bed57f426abe6b5bc8415db91 100644
--- a/src/mips/regexp-macro-assembler-mips.cc
+++ b/src/mips/regexp-macro-assembler-mips.cc
@@ -110,7 +110,7 @@ RegExpMacroAssemblerMIPS::RegExpMacroAssemblerMIPS(
backtrack_label_(),
exit_label_(),
internal_failure_label_() {
- ASSERT_EQ(0, registers_to_save % 2);
+ DCHECK_EQ(0, registers_to_save % 2);
__ jmp(&entry_label_); // We'll write the entry code later.
// If the code gets too big or corrupted, an internal exception will be
// raised, and we will exit right away.
@@ -149,8 +149,8 @@ void RegExpMacroAssemblerMIPS::AdvanceCurrentPosition(int by) {
void RegExpMacroAssemblerMIPS::AdvanceRegister(int reg, int by) {
- ASSERT(reg >= 0);
- ASSERT(reg < num_registers_);
+ DCHECK(reg >= 0);
+ DCHECK(reg < num_registers_);
if (by != 0) {
__ lw(a0, register_location(reg));
__ Addu(a0, a0, Operand(by));
@@ -289,7 +289,7 @@ void RegExpMacroAssemblerMIPS::CheckNotBackReferenceIgnoreCase(
// Compute new value of character position after the matched part.
__ Subu(current_input_offset(), a2, end_of_input_address());
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
// Put regexp engine registers on stack.
RegList regexp_registers_to_retain = current_input_offset().bit() |
current_character().bit() | backtrack_stackpointer().bit();
@@ -371,7 +371,7 @@ void RegExpMacroAssemblerMIPS::CheckNotBackReference(
__ lbu(t0, MemOperand(a2, 0));
__ addiu(a2, a2, char_size());
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
__ lhu(a3, MemOperand(a0, 0));
__ addiu(a0, a0, char_size());
__ lhu(t0, MemOperand(a2, 0));
@@ -415,7 +415,7 @@ void RegExpMacroAssemblerMIPS::CheckNotCharacterAfterMinusAnd(
uc16 minus,
uc16 mask,
Label* on_not_equal) {
- ASSERT(minus < String::kMaxUtf16CodeUnit);
+ DCHECK(minus < String::kMaxUtf16CodeUnit);
__ Subu(a0, current_character(), Operand(minus));
__ And(a0, a0, Operand(mask));
BranchOrBacktrack(on_not_equal, ne, a0, Operand(c));
@@ -706,7 +706,7 @@ Handle<HeapObject> RegExpMacroAssemblerMIPS::GetCode(Handle<String> source) {
__ Addu(a1, a1, Operand(a2));
// a1 is length of string in characters.
- ASSERT_EQ(0, num_saved_registers_ % 2);
+ DCHECK_EQ(0, num_saved_registers_ % 2);
// Always an even number of capture registers. This allows us to
// unroll the loop once to add an operation between a load of a register
// and the following use of that register.
@@ -908,8 +908,8 @@ void RegExpMacroAssemblerMIPS::LoadCurrentCharacter(int cp_offset,
Label* on_end_of_input,
bool check_bounds,
int characters) {
- ASSERT(cp_offset >= -1); // ^ and \b can look behind one character.
- ASSERT(cp_offset < (1<<30)); // Be sane! (And ensure negation works).
+ DCHECK(cp_offset >= -1); // ^ and \b can look behind one character.
+ DCHECK(cp_offset < (1<<30)); // Be sane! (And ensure negation works).
if (check_bounds) {
CheckPosition(cp_offset + characters - 1, on_end_of_input);
}
@@ -994,7 +994,7 @@ void RegExpMacroAssemblerMIPS::SetCurrentPositionFromEnd(int by) {
void RegExpMacroAssemblerMIPS::SetRegister(int register_index, int to) {
- ASSERT(register_index >= num_saved_registers_); // Reserved for positions!
+ DCHECK(register_index >= num_saved_registers_); // Reserved for positions!
__ li(a0, Operand(to));
__ sw(a0, register_location(register_index));
}
@@ -1018,7 +1018,7 @@ void RegExpMacroAssemblerMIPS::WriteCurrentPositionToRegister(int reg,
void RegExpMacroAssemblerMIPS::ClearRegisters(int reg_from, int reg_to) {
- ASSERT(reg_from <= reg_to);
+ DCHECK(reg_from <= reg_to);
__ lw(a0, MemOperand(frame_pointer(), kInputStartMinusOne));
for (int reg = reg_from; reg <= reg_to; reg++) {
__ sw(a0, register_location(reg));
@@ -1046,7 +1046,7 @@ void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) {
// Align the stack pointer and save the original sp value on the stack.
__ mov(scratch, sp);
__ Subu(sp, sp, Operand(kPointerSize));
- ASSERT(IsPowerOf2(stack_alignment));
+ DCHECK(IsPowerOf2(stack_alignment));
__ And(sp, sp, Operand(-stack_alignment));
__ sw(scratch, MemOperand(sp));
@@ -1055,7 +1055,7 @@ void RegExpMacroAssemblerMIPS::CallCheckStackGuardState(Register scratch) {
__ li(a1, Operand(masm_->CodeObject()), CONSTANT_SIZE);
// We need to make room for the return address on the stack.
- ASSERT(IsAligned(stack_alignment, kPointerSize));
+ DCHECK(IsAligned(stack_alignment, kPointerSize));
__ Subu(sp, sp, Operand(stack_alignment));
// Stack pointer now points to cell where return address is to be written.
@@ -1128,8 +1128,8 @@ int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address,
// Current string.
bool is_ascii = subject->IsOneByteRepresentationUnderneath();
- ASSERT(re_code->instruction_start() <= *return_address);
- ASSERT(*return_address <=
+ DCHECK(re_code->instruction_start() <= *return_address);
+ DCHECK(*return_address <=
re_code->instruction_start() + re_code->instruction_size());
Object* result = isolate->stack_guard()->HandleInterrupts();
@@ -1168,7 +1168,7 @@ int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address,
// be a sequential or external string with the same content.
// Update the start and end pointers in the stack frame to the current
// location (whether it has actually moved or not).
- ASSERT(StringShape(*subject_tmp).IsSequential() ||
+ DCHECK(StringShape(*subject_tmp).IsSequential() ||
StringShape(*subject_tmp).IsExternal());
// The original start address of the characters to match.
@@ -1200,7 +1200,7 @@ int RegExpMacroAssemblerMIPS::CheckStackGuardState(Address* return_address,
MemOperand RegExpMacroAssemblerMIPS::register_location(int register_index) {
- ASSERT(register_index < (1<<30));
+ DCHECK(register_index < (1<<30));
if (num_registers_ <= register_index) {
num_registers_ = register_index + 1;
}
@@ -1261,7 +1261,7 @@ void RegExpMacroAssemblerMIPS::SafeCallTarget(Label* name) {
void RegExpMacroAssemblerMIPS::Push(Register source) {
- ASSERT(!source.is(backtrack_stackpointer()));
+ DCHECK(!source.is(backtrack_stackpointer()));
__ Addu(backtrack_stackpointer(),
backtrack_stackpointer(),
Operand(-kPointerSize));
@@ -1270,7 +1270,7 @@ void RegExpMacroAssemblerMIPS::Push(Register source) {
void RegExpMacroAssemblerMIPS::Pop(Register target) {
- ASSERT(!target.is(backtrack_stackpointer()));
+ DCHECK(!target.is(backtrack_stackpointer()));
__ lw(target, MemOperand(backtrack_stackpointer()));
__ Addu(backtrack_stackpointer(), backtrack_stackpointer(), kPointerSize);
}
@@ -1306,12 +1306,12 @@ void RegExpMacroAssemblerMIPS::LoadCurrentCharacterUnchecked(int cp_offset,
}
// We assume that we cannot do unaligned loads on MIPS, so this function
// must only be used to load a single character at a time.
- ASSERT(characters == 1);
+ DCHECK(characters == 1);
__ Addu(t5, end_of_input_address(), Operand(offset));
if (mode_ == ASCII) {
__ lbu(current_character(), MemOperand(t5, 0));
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
__ lhu(current_character(), MemOperand(t5, 0));
}
}
« no previous file with comments | « src/mips/macro-assembler-mips.cc ('k') | src/mips/simulator-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698