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

Unified Diff: src/jsregexp.cc

Issue 888613002: Initial switch to Chromium-style CHECK_* and DCHECK_* macros. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix slow dchecks. Created 5 years, 11 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
« src/checks.cc ('K') | « src/jsregexp.h ('k') | src/log.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/jsregexp.cc
diff --git a/src/jsregexp.cc b/src/jsregexp.cc
index 1843597e74d7e1c565eaef277edf0263a38f38b1..a6f89c95b7818462adc3d3699eef8771fdf29860 100644
--- a/src/jsregexp.cc
+++ b/src/jsregexp.cc
@@ -3446,14 +3446,14 @@ int ChoiceNode::GreedyLoopTextLengthForAlternative(
void LoopChoiceNode::AddLoopAlternative(GuardedAlternative alt) {
- DCHECK_EQ(loop_node_, NULL);
+ DCHECK(!loop_node_);
AddAlternative(alt);
loop_node_ = alt.node();
}
void LoopChoiceNode::AddContinueAlternative(GuardedAlternative alt) {
- DCHECK_EQ(continue_node_, NULL);
+ DCHECK(!continue_node_);
AddAlternative(alt);
continue_node_ = alt.node();
}
@@ -3473,7 +3473,7 @@ void LoopChoiceNode::Emit(RegExpCompiler* compiler, Trace* trace) {
macro_assembler->GoTo(trace->loop_label());
return;
}
- DCHECK(trace->stop_node() == NULL);
+ DCHECK(!trace->stop_node());
if (!trace->is_trivial()) {
trace->Flush(compiler, this);
return;
@@ -5294,8 +5294,8 @@ void CharacterRange::Split(ZoneList<CharacterRange>* base,
ZoneList<CharacterRange>** included,
ZoneList<CharacterRange>** excluded,
Zone* zone) {
- DCHECK_EQ(NULL, *included);
- DCHECK_EQ(NULL, *excluded);
+ DCHECK(!*included);
+ DCHECK(!*excluded);
DispatchTable table(zone);
for (int i = 0; i < base->length(); i++)
table.AddRange(base->at(i), CharacterRangeSplitter::kInBase, zone);
@@ -5374,7 +5374,7 @@ void CharacterRange::AddCaseEquivalents(Isolate* isolate, Zone* zone,
bool CharacterRange::IsCanonical(ZoneList<CharacterRange>* ranges) {
- DCHECK_NOT_NULL(ranges);
+ DCHECK(ranges);
int n = ranges->length();
if (n <= 1) return true;
int max = ranges->at(0).to();
@@ -5598,7 +5598,7 @@ void DispatchTable::AddRange(CharacterRange full_range, int value,
if (tree()->is_empty()) {
// If this is the first range we just insert into the table.
ZoneSplayTree<Config>::Locator loc;
- DCHECK_RESULT(tree()->Insert(current.from(), &loc));
+ CHECK(tree()->Insert(current.from(), &loc));
Sven Panne 2015/01/29 17:07:04 Here and at other places: Shouldn't this be a DCHE
Benedikt Meurer 2015/01/30 05:29:32 DCHECK_RESULT has slightly different semantics. Re
loc.set_value(Entry(current.from(), current.to(),
empty()->Extend(value, zone)));
return;
@@ -5624,7 +5624,7 @@ void DispatchTable::AddRange(CharacterRange full_range, int value,
// to the map and let the next step deal with merging it with
// the range we're adding.
ZoneSplayTree<Config>::Locator loc;
- DCHECK_RESULT(tree()->Insert(right.from(), &loc));
+ CHECK(tree()->Insert(right.from(), &loc));
loc.set_value(Entry(right.from(),
right.to(),
entry->out_set()));
@@ -5640,7 +5640,7 @@ void DispatchTable::AddRange(CharacterRange full_range, int value,
// then we have to add a range covering just that space.
if (current.from() < entry->from()) {
ZoneSplayTree<Config>::Locator ins;
- DCHECK_RESULT(tree()->Insert(current.from(), &ins));
+ CHECK(tree()->Insert(current.from(), &ins));
ins.set_value(Entry(current.from(),
entry->from() - 1,
empty()->Extend(value, zone)));
@@ -5651,7 +5651,7 @@ void DispatchTable::AddRange(CharacterRange full_range, int value,
// we have to snap the right part off and add it separately.
if (entry->to() > current.to()) {
ZoneSplayTree<Config>::Locator ins;
- DCHECK_RESULT(tree()->Insert(current.to() + 1, &ins));
+ CHECK(tree()->Insert(current.to() + 1, &ins));
ins.set_value(Entry(current.to() + 1,
entry->to(),
entry->out_set()));
@@ -5671,7 +5671,7 @@ void DispatchTable::AddRange(CharacterRange full_range, int value,
} else {
// There is no overlap so we can just add the range
ZoneSplayTree<Config>::Locator ins;
- DCHECK_RESULT(tree()->Insert(current.from(), &ins));
+ CHECK(tree()->Insert(current.from(), &ins));
ins.set_value(Entry(current.from(),
current.to(),
empty()->Extend(value, zone)));
« src/checks.cc ('K') | « src/jsregexp.h ('k') | src/log.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698