Commit 3fe6f95c authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Add CHECKs to hunt down a crash

Bug: chromium:1027130
Change-Id: Ifd1f355ce266e672183f337f114432f11a866a52
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2011835
Auto-Submit: Georg Neis <neis@chromium.org>
Reviewed-by: 's avatarMichael Stanton <mvstanton@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65910}
parent f82c27f7
......@@ -22,6 +22,7 @@ Handle<String> StringConstantBase::AllocateStringConstant(
switch (kind()) {
case StringConstantKind::kStringLiteral: {
result = static_cast<const StringLiteral*>(this)->str();
CHECK(!result.is_null());
break;
}
case StringConstantKind::kNumberToStringConstant: {
......@@ -29,6 +30,7 @@ Handle<String> StringConstantBase::AllocateStringConstant(
Handle<Object> num_obj =
isolate->factory()->NewNumber(num_constant->num());
result = isolate->factory()->NumberToString(num_obj);
CHECK(!result.is_null());
break;
}
case StringConstantKind::kStringCons: {
......
......@@ -894,6 +894,7 @@ Handle<DeoptimizationData> CodeGenerator::GenerateDeoptimizationData() {
static_cast<int>(deoptimization_literals_.size()), AllocationType::kOld);
for (unsigned i = 0; i < deoptimization_literals_.size(); i++) {
Handle<Object> object = deoptimization_literals_[i].Reify(isolate());
CHECK(!object.is_null());
literals->set(i, *object);
}
data->SetLiteralArray(*literals);
......
......@@ -59,7 +59,7 @@ class DeoptimizationLiteral {
DeoptimizationLiteral() : object_(), number_(0), string_(nullptr) {}
explicit DeoptimizationLiteral(Handle<Object> object)
: kind_(DeoptimizationLiteralKind::kObject), object_(object) {
DCHECK(!object_.is_null());
CHECK(!object_.is_null());
}
explicit DeoptimizationLiteral(double number)
: kind_(DeoptimizationLiteralKind::kNumber), number_(number) {}
......
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