Commit 997982e9 authored by Francis McCabe's avatar Francis McCabe Committed by Commit Bot

[wasm] Clean up on missed reviewers comments.

Bug: v8:7431
Change-Id: I80ec116d21d67868747093887ca4660675dab8e4
Reviewed-on: https://chromium-review.googlesource.com/c/1473795Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Francis McCabe <fgm@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59783}
parent b724020e
...@@ -1863,12 +1863,12 @@ class LiftoffCompiler { ...@@ -1863,12 +1863,12 @@ class LiftoffCompiler {
__ FinishCall(imm.sig, call_descriptor); __ FinishCall(imm.sig, call_descriptor);
} }
void ReturnCall(FullDecoder* decoder, void ReturnCall(FullDecoder* decoder,
const CallFunctionImmediate<validate>& imm, const CallFunctionImmediate<validate>& imm,
const Value args[]) { const Value args[]) {
unsupported(decoder, "return_call"); unsupported(decoder, "return_call");
} }
void ReturnCallIndirect(FullDecoder* decoder, const Value& index_val, void ReturnCallIndirect(FullDecoder* decoder, const Value& index_val,
const CallIndirectImmediate<validate>& imm, const CallIndirectImmediate<validate>& imm,
const Value args[]) { const Value args[]) {
......
...@@ -924,12 +924,12 @@ class WasmDecoder : public Decoder { ...@@ -924,12 +924,12 @@ class WasmDecoder : public Decoder {
return true; return true;
} }
inline bool CanTailCall(FunctionSig* tgt_sig) { inline bool CanReturnCall(FunctionSig* target_sig) {
if (tgt_sig == nullptr) return false; if (target_sig == nullptr) return false;
size_t num_returns = sig_->return_count(); size_t num_returns = sig_->return_count();
if (num_returns != tgt_sig->return_count()) return false; if (num_returns != target_sig->return_count()) return false;
for (size_t i = 0; i < num_returns; ++i) { for (size_t i = 0; i < num_returns; ++i) {
if (sig_->GetReturn(i) != tgt_sig->GetReturn(i)) return false; if (sig_->GetReturn(i) != target_sig->GetReturn(i)) return false;
} }
return true; return true;
} }
...@@ -2176,7 +2176,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2176,7 +2176,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
CallFunctionImmediate<validate> imm(this, this->pc_); CallFunctionImmediate<validate> imm(this, this->pc_);
len = 1 + imm.length; len = 1 + imm.length;
if (!this->Validate(this->pc_, imm)) break; if (!this->Validate(this->pc_, imm)) break;
if (!this->CanTailCall(imm.sig)) { if (!this->CanReturnCall(imm.sig)) {
OPCODE_ERROR(opcode, "tail call return types mismatch"); OPCODE_ERROR(opcode, "tail call return types mismatch");
break; break;
} }
...@@ -2192,7 +2192,7 @@ class WasmFullDecoder : public WasmDecoder<validate> { ...@@ -2192,7 +2192,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
CallIndirectImmediate<validate> imm(this, this->pc_); CallIndirectImmediate<validate> imm(this, this->pc_);
len = 1 + imm.length; len = 1 + imm.length;
if (!this->Validate(this->pc_, imm)) break; if (!this->Validate(this->pc_, imm)) break;
if (!this->CanTailCall(imm.sig)) { if (!this->CanReturnCall(imm.sig)) {
OPCODE_ERROR(opcode, "tail call return types mismatch"); OPCODE_ERROR(opcode, "tail call return types mismatch");
break; break;
} }
......
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