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

[wasm] Fix {WasmDecoder::OpcodeLength} for rethrow.

R=clemensh@chromium.org
TEST=unittests/WasmOpcodeLengthTest.Statements
BUG=v8:8091

Change-Id: Ia2a01d5c35ace33c9c8a29a8df7b30e3f1e119cc
Reviewed-on: https://chromium-review.googlesource.com/c/1278728Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56606}
parent d88bd9a1
......@@ -1009,6 +1009,7 @@ class WasmDecoder : public Decoder {
MemoryAccessImmediate<validate> imm(decoder, pc, UINT32_MAX);
return 1 + imm.length;
}
case kExprRethrow:
case kExprBr:
case kExprBrIf: {
BreakDepthImmediate<validate> imm(decoder, pc);
......
......@@ -2818,6 +2818,7 @@ TEST_F(WasmOpcodeLengthTest, Statements) {
EXPECT_LENGTH(2, kExprBr);
EXPECT_LENGTH(2, kExprBrIf);
EXPECT_LENGTH(2, kExprThrow);
EXPECT_LENGTH(2, kExprRethrow);
EXPECT_LENGTH(2, kExprCatch);
EXPECT_LENGTH_N(2, kExprBlock, kLocalI32);
EXPECT_LENGTH_N(2, kExprLoop, kLocalI32);
......
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