Commit e0c882e2 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[wasm] Remove redundant calls to {EndControl}.

The templatized function body decoder already properly terminates
control flow, it is not needed for the graph building implementation to
do that explicitly upon {Throw} and {Rethrow}.

R=titzer@chromium.org
BUG=v8:8091

Change-Id: I47a93135c41b4cdf2fa6b8f5c7abfd6c212aaa12
Reviewed-on: https://chromium-review.googlesource.com/c/1273239
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarBen Titzer <titzer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56559}
parent f90f20d8
......@@ -1816,7 +1816,7 @@ class LiftoffCompiler {
unsupported(decoder, "simd");
}
void Throw(FullDecoder* decoder, const ExceptionIndexImmediate<validate>&,
Control* block, const Vector<Value>& args) {
const Vector<Value>& args) {
unsupported(decoder, "throw");
}
void Rethrow(FullDecoder* decoder, Control* block) {
......
......@@ -660,7 +660,7 @@ struct ControlWithNamedConstructors : public ControlBase<Value> {
const Value& input, Value* result) \
F(Simd8x16ShuffleOp, const Simd8x16ShuffleImmediate<validate>& imm, \
const Value& input0, const Value& input1, Value* result) \
F(Throw, const ExceptionIndexImmediate<validate>& imm, Control* block, \
F(Throw, const ExceptionIndexImmediate<validate>& imm, \
const Vector<Value>& args) \
F(Rethrow, Control* block) \
F(CatchException, const ExceptionIndexImmediate<validate>& imm, \
......@@ -1482,8 +1482,7 @@ class WasmFullDecoder : public WasmDecoder<validate> {
len = 1 + imm.length;
if (!this->Validate(this->pc_, imm)) break;
PopArgs(imm.exception->ToFunctionSig());
CALL_INTERFACE_IF_REACHABLE(Throw, imm, &control_.back(),
vec2vec(args_));
CALL_INTERFACE_IF_REACHABLE(Throw, imm, vec2vec(args_));
EndControl();
break;
}
......
......@@ -408,7 +408,7 @@ class WasmGraphBuildingInterface {
}
void Throw(FullDecoder* decoder, const ExceptionIndexImmediate<validate>& imm,
Control* block, const Vector<Value>& value_args) {
const Vector<Value>& value_args) {
int count = value_args.length();
ZoneVector<TFNode*> args(count, decoder->zone());
for (int i = 0; i < count; ++i) {
......@@ -416,14 +416,12 @@ class WasmGraphBuildingInterface {
}
BUILD(Throw, imm.index, imm.exception, vec2vec(args));
Unreachable(decoder);
EndControl(decoder, block);
}
void Rethrow(FullDecoder* decoder, Control* block) {
TFNode* exception = block->try_info->exception;
BUILD(Rethrow, exception);
Unreachable(decoder);
EndControl(decoder, block);
}
void CatchException(FullDecoder* decoder,
......
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