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

Unified Diff: src/ia32/regexp-macro-assembler-ia32.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/ia32/macro-assembler-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/regexp-macro-assembler-ia32.cc
diff --git a/src/ia32/regexp-macro-assembler-ia32.cc b/src/ia32/regexp-macro-assembler-ia32.cc
index 4d2d0517bde3299aa051bdfaf1e2c6bf0faad3d9..5f31298c9ab49019c9bcab6c057a8145eface950 100644
--- a/src/ia32/regexp-macro-assembler-ia32.cc
+++ b/src/ia32/regexp-macro-assembler-ia32.cc
@@ -92,7 +92,7 @@ RegExpMacroAssemblerIA32::RegExpMacroAssemblerIA32(
success_label_(),
backtrack_label_(),
exit_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.
__ bind(&start_label_); // And then continue from here.
}
@@ -124,8 +124,8 @@ void RegExpMacroAssemblerIA32::AdvanceCurrentPosition(int by) {
void RegExpMacroAssemblerIA32::AdvanceRegister(int reg, int by) {
- ASSERT(reg >= 0);
- ASSERT(reg < num_registers_);
+ DCHECK(reg >= 0);
+ DCHECK(reg < num_registers_);
if (by != 0) {
__ add(register_location(reg), Immediate(by));
}
@@ -282,7 +282,7 @@ void RegExpMacroAssemblerIA32::CheckNotBackReferenceIgnoreCase(
// Compute new value of character position after the matched part.
__ sub(edi, esi);
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
// Save registers before calling C function.
__ push(esi);
__ push(edi);
@@ -370,7 +370,7 @@ void RegExpMacroAssemblerIA32::CheckNotBackReference(
__ movzx_b(eax, Operand(edx, 0));
__ cmpb_al(Operand(ebx, 0));
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
__ movzx_w(eax, Operand(edx, 0));
__ cmpw_ax(Operand(ebx, 0));
}
@@ -439,7 +439,7 @@ void RegExpMacroAssemblerIA32::CheckNotCharacterAfterMinusAnd(
uc16 minus,
uc16 mask,
Label* on_not_equal) {
- ASSERT(minus < String::kMaxUtf16CodeUnit);
+ DCHECK(minus < String::kMaxUtf16CodeUnit);
__ lea(eax, Operand(current_character(), -minus));
if (c == 0) {
__ test(eax, Immediate(mask));
@@ -548,7 +548,7 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type,
__ cmp(current_character(), Immediate('z'));
BranchOrBacktrack(above, on_no_match);
}
- ASSERT_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
+ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
ExternalReference word_map = ExternalReference::re_word_character_map();
__ test_b(current_character(),
Operand::StaticArray(current_character(), times_1, word_map));
@@ -562,7 +562,7 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type,
__ cmp(current_character(), Immediate('z'));
__ j(above, &done);
}
- ASSERT_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
+ DCHECK_EQ(0, word_character_map[0]); // Character '\0' is not a word char.
ExternalReference word_map = ExternalReference::re_word_character_map();
__ test_b(current_character(),
Operand::StaticArray(current_character(), times_1, word_map));
@@ -589,7 +589,7 @@ bool RegExpMacroAssemblerIA32::CheckSpecialCharacterClass(uc16 type,
} else {
Label done;
BranchOrBacktrack(below_equal, &done);
- ASSERT_EQ(UC16, mode_);
+ DCHECK_EQ(UC16, mode_);
// Compare original value to 0x2028 and 0x2029, using the already
// computed (current_char ^ 0x01 - 0x0b). I.e., check for
// 0x201d (0x2028 - 0x0b) or 0x201e.
@@ -947,8 +947,8 @@ void RegExpMacroAssemblerIA32::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);
}
@@ -1010,7 +1010,7 @@ void RegExpMacroAssemblerIA32::SetCurrentPositionFromEnd(int by) {
void RegExpMacroAssemblerIA32::SetRegister(int register_index, int to) {
- ASSERT(register_index >= num_saved_registers_); // Reserved for positions!
+ DCHECK(register_index >= num_saved_registers_); // Reserved for positions!
__ mov(register_location(register_index), Immediate(to));
}
@@ -1033,7 +1033,7 @@ void RegExpMacroAssemblerIA32::WriteCurrentPositionToRegister(int reg,
void RegExpMacroAssemblerIA32::ClearRegisters(int reg_from, int reg_to) {
- ASSERT(reg_from <= reg_to);
+ DCHECK(reg_from <= reg_to);
__ mov(eax, Operand(ebp, kInputStartMinusOne));
for (int reg = reg_from; reg <= reg_to; reg++) {
__ mov(register_location(reg), eax);
@@ -1101,8 +1101,8 @@ int RegExpMacroAssemblerIA32::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();
@@ -1141,7 +1141,7 @@ int RegExpMacroAssemblerIA32::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.
@@ -1173,7 +1173,7 @@ int RegExpMacroAssemblerIA32::CheckStackGuardState(Address* return_address,
Operand RegExpMacroAssemblerIA32::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;
}
@@ -1227,7 +1227,7 @@ void RegExpMacroAssemblerIA32::SafeCallTarget(Label* name) {
void RegExpMacroAssemblerIA32::Push(Register source) {
- ASSERT(!source.is(backtrack_stackpointer()));
+ DCHECK(!source.is(backtrack_stackpointer()));
// Notice: This updates flags, unlike normal Push.
__ sub(backtrack_stackpointer(), Immediate(kPointerSize));
__ mov(Operand(backtrack_stackpointer(), 0), source);
@@ -1242,7 +1242,7 @@ void RegExpMacroAssemblerIA32::Push(Immediate value) {
void RegExpMacroAssemblerIA32::Pop(Register target) {
- ASSERT(!target.is(backtrack_stackpointer()));
+ DCHECK(!target.is(backtrack_stackpointer()));
__ mov(target, Operand(backtrack_stackpointer(), 0));
// Notice: This updates flags, unlike normal Pop.
__ add(backtrack_stackpointer(), Immediate(kPointerSize));
@@ -1284,16 +1284,16 @@ void RegExpMacroAssemblerIA32::LoadCurrentCharacterUnchecked(int cp_offset,
} else if (characters == 2) {
__ movzx_w(current_character(), Operand(esi, edi, times_1, cp_offset));
} else {
- ASSERT(characters == 1);
+ DCHECK(characters == 1);
__ movzx_b(current_character(), Operand(esi, edi, times_1, cp_offset));
}
} else {
- ASSERT(mode_ == UC16);
+ DCHECK(mode_ == UC16);
if (characters == 2) {
__ mov(current_character(),
Operand(esi, edi, times_1, cp_offset * sizeof(uc16)));
} else {
- ASSERT(characters == 1);
+ DCHECK(characters == 1);
__ movzx_w(current_character(),
Operand(esi, edi, times_1, cp_offset * sizeof(uc16)));
}
« no previous file with comments | « src/ia32/macro-assembler-ia32.cc ('k') | src/ia32/stub-cache-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698