Commit 352e4bf2 authored by Clemens Hammacher's avatar Clemens Hammacher Committed by Commit Bot

[wasm] Some CHECK / DCHECK fixes

Even inside an "#ifdef DEBUG", we still want to use the DCHECK macro
instead of CHECK in order to get the "correct" error message.

Drive-by: Remove "#ifdef DEBUG" around DCHECKS in macro-assembler-x64.cc

R=ahaas@chromium.org
CC=mtrofin@chromium.org

Change-Id: I5b92c87fa9b10e5751cc2704d6218bee292cfb8f
Reviewed-on: https://chromium-review.googlesource.com/832687Reviewed-by: 's avatarMircea Trofin <mtrofin@chromium.org>
Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#50184}
parent e1e2aa06
......@@ -4443,7 +4443,7 @@ void ValidateImportWrapperReferencesImmovables(Handle<Code> wrapper) {
default:
UNREACHABLE();
}
CHECK_NOT_NULL(target);
DCHECK_NOT_NULL(target);
bool is_immovable =
target->IsSmi() || Heap::IsImmovable(HeapObject::cast(target));
bool is_allowed_stub = false;
......@@ -4453,7 +4453,7 @@ void ValidateImportWrapperReferencesImmovables(Handle<Code> wrapper) {
code->kind() == Code::STUB &&
CodeStub::MajorKeyFromKey(code->stub_key()) == CodeStub::DoubleToI;
}
CHECK(is_immovable || is_allowed_stub);
DCHECK(is_immovable || is_allowed_stub);
}
#endif
}
......
......@@ -1283,7 +1283,7 @@ const wasm::WasmCode* LazyCompilationOrchestrator::CompileFromJsToWasm(
}
#ifdef DEBUG
it.next();
CHECK(it.done());
DCHECK(it.done());
#endif
}
......
......@@ -1622,9 +1622,7 @@ void TurboAssembler::Call(ExternalReference ext) {
#endif
LoadAddress(kScratchRegister, ext);
call(kScratchRegister);
#ifdef DEBUG
DCHECK_EQ(end_position, pc_offset());
#endif
}
void TurboAssembler::Call(const Operand& op) {
......@@ -1642,9 +1640,7 @@ void TurboAssembler::Call(Address destination, RelocInfo::Mode rmode) {
#endif
Move(kScratchRegister, destination, rmode);
call(kScratchRegister);
#ifdef DEBUG
DCHECK_EQ(pc_offset(), end_position);
#endif
}
void TurboAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
......@@ -1653,9 +1649,7 @@ void TurboAssembler::Call(Handle<Code> code_object, RelocInfo::Mode rmode) {
#endif
DCHECK(RelocInfo::IsCodeTarget(rmode));
call(code_object, rmode);
#ifdef DEBUG
DCHECK_EQ(end_position, pc_offset());
#endif
}
void TurboAssembler::Pextrd(Register dst, XMMRegister src, int8_t imm8) {
......
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