Commit b00ea0f1 authored by tfarina's avatar tfarina Committed by Commit bot

Cleanup: Remove DCHECK_RESULT macro.

BUG=None
R=bmeurer@chromium.org
LOG=N

Review URL: https://codereview.chromium.org/933673002

Cr-Commit-Position: refs/heads/master@{#26733}
parent 48670299
......@@ -149,9 +149,7 @@ void DumpBacktrace();
// The DCHECK macro is equivalent to CHECK except that it only
// generates code in debug builds.
// TODO(bmeurer): DCHECK_RESULT(expr) must die!
#ifdef DEBUG
#define DCHECK_RESULT(expr) CHECK(expr)
#define DCHECK(condition) CHECK(condition)
#define DCHECK_EQ(v1, v2) CHECK_EQ(v1, v2)
#define DCHECK_NE(v1, v2) CHECK_NE(v1, v2)
......@@ -162,7 +160,6 @@ void DumpBacktrace();
#define DCHECK_NOT_NULL(val) CHECK_NOT_NULL(val)
#define DCHECK_IMPLIES(v1, v2) CHECK_IMPLIES(v1, v2)
#else
#define DCHECK_RESULT(expr) (expr)
#define DCHECK(condition) ((void) 0)
#define DCHECK_EQ(v1, v2) ((void) 0)
#define DCHECK_NE(v1, v2) ((void) 0)
......
......@@ -5598,7 +5598,9 @@ 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));
bool inserted = tree()->Insert(current.from(), &loc);
DCHECK(inserted);
USE(inserted);
loc.set_value(Entry(current.from(), current.to(),
empty()->Extend(value, zone)));
return;
......@@ -5624,7 +5626,9 @@ 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));
bool inserted = tree()->Insert(right.from(), &loc);
DCHECK(inserted);
USE(inserted);
loc.set_value(Entry(right.from(),
right.to(),
entry->out_set()));
......@@ -5640,7 +5644,9 @@ 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));
bool inserted = tree()->Insert(current.from(), &ins);
DCHECK(inserted);
USE(inserted);
ins.set_value(Entry(current.from(),
entry->from() - 1,
empty()->Extend(value, zone)));
......@@ -5651,7 +5657,9 @@ 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));
bool inserted = tree()->Insert(current.to() + 1, &ins);
DCHECK(inserted);
USE(inserted);
ins.set_value(Entry(current.to() + 1,
entry->to(),
entry->out_set()));
......@@ -5671,7 +5679,9 @@ 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));
bool inserted = tree()->Insert(current.from(), &ins);
DCHECK(inserted);
USE(inserted);
ins.set_value(Entry(current.from(),
current.to(),
empty()->Extend(value, zone)));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment