Commit 9cea188e authored by Sven Sauleau's avatar Sven Sauleau Committed by Commit Bot

Replace some assertions with their more verbose equivalent

Replaces some DCHECK with their verbose equivalent because it's more
convenient while debugging.

Change-Id: I83c199c389341a68dfccd949e7353ef68ff3b9c2
Reviewed-on: https://chromium-review.googlesource.com/c/1352289Reviewed-by: 's avatarSathya Gunasekaran <gsathya@chromium.org>
Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Benedikt Meurer <bmeurer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58013}
parent 0536ee43
......@@ -1087,7 +1087,7 @@ Node* CodeAssembler::Retain(Node* value) {
}
Node* CodeAssembler::Projection(int index, Node* value) {
DCHECK(index < value->op()->ValueOutputCount());
DCHECK_LT(index, value->op()->ValueOutputCount());
return raw_assembler()->Projection(index, value);
}
......
......@@ -401,7 +401,7 @@ Node* RawMachineAssembler::TargetParameter() {
}
Node* RawMachineAssembler::Parameter(size_t index) {
DCHECK(index < parameter_count());
DCHECK_LT(index, parameter_count());
return parameters_[index];
}
......
......@@ -27,12 +27,12 @@ class Signature : public ZoneObject {
size_t parameter_count() const { return parameter_count_; }
T GetParam(size_t index) const {
DCHECK(index < parameter_count_);
DCHECK_LT(index, parameter_count_);
return reps_[return_count_ + index];
}
T GetReturn(size_t index = 0) const {
DCHECK(index < return_count_);
DCHECK_LT(index, return_count_);
return reps_[index];
}
......@@ -71,16 +71,16 @@ class Signature : public ZoneObject {
const size_t parameter_count_;
void AddReturn(T val) {
DCHECK(rcursor_ < return_count_);
DCHECK_LT(rcursor_, return_count_);
buffer_[rcursor_++] = val;
}
void AddParam(T val) {
DCHECK(pcursor_ < parameter_count_);
DCHECK_LT(pcursor_, parameter_count_);
buffer_[return_count_ + pcursor_++] = val;
}
Signature<T>* Build() {
DCHECK(rcursor_ == return_count_);
DCHECK(pcursor_ == parameter_count_);
DCHECK_EQ(rcursor_, return_count_);
DCHECK_EQ(pcursor_, parameter_count_);
return new (zone_) Signature<T>(return_count_, parameter_count_, buffer_);
}
......
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