Commit 6c75e145 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[asm.js] Remove dead nullptr check of signatures.

R=clemensh@chromium.org

Change-Id: I616a972283cc85ccaf63c46d0cc11ccbb7563a46
Reviewed-on: https://chromium-review.googlesource.com/504527Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#45289}
parent f0082e56
......@@ -156,7 +156,7 @@ FunctionSig* AsmJsParser::ConvertSignature(
} else if (param->IsA(AsmType::Int())) {
sig_builder.AddParam(kWasmI32);
} else {
return nullptr;
UNREACHABLE();
}
}
if (!return_type->IsA(AsmType::Void())) {
......@@ -167,7 +167,7 @@ FunctionSig* AsmJsParser::ConvertSignature(
} else if (return_type->IsA(AsmType::Signed())) {
sig_builder.AddReturn(kWasmI32);
} else {
return 0;
UNREACHABLE();
}
}
return sig_builder.Build();
......@@ -767,9 +767,6 @@ void AsmJsParser::ValidateFunction() {
// TODO(bradnelson): WasmModuleBuilder can't take this in the right order.
// We should fix that so we can use it instead.
FunctionSig* sig = ConvertSignature(return_type_, params);
if (sig == nullptr) {
FAIL("Invalid function signature in declaration");
}
current_function_builder_->SetSignature(sig);
for (auto local : locals) {
current_function_builder_->AddLocal(local);
......@@ -2140,9 +2137,6 @@ AsmType* AsmJsParser::ValidateCall() {
function_type->AsFunctionType()->AddArgument(t);
}
FunctionSig* sig = ConvertSignature(return_type, param_types);
if (sig == nullptr) {
FAILn("Invalid function signature");
}
uint32_t signature_index = module_builder_->AddSignature(sig);
// Emit actual function invocation depending on the kind. At this point we
......
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