Index: test/unittests/wasm/ast-decoder-unittest.cc |
diff --git a/test/unittests/wasm/ast-decoder-unittest.cc b/test/unittests/wasm/ast-decoder-unittest.cc |
index 72e7b37be339ae9dbee27f77277162dbb740732f..cd13272641482c53da681f3a9d08fe3ead823277 100644 |
--- a/test/unittests/wasm/ast-decoder-unittest.cc |
+++ b/test/unittests/wasm/ast-decoder-unittest.cc |
@@ -2003,73 +2003,17 @@ TEST_F(AstDecoderTest, Throw) { |
#define WASM_CATCH(local) kExprCatch, static_cast<byte>(local) |
TEST_F(AstDecoderTest, TryCatch) { |
FLAG_wasm_eh_prototype = true; |
- EXPECT_VERIFIES_INLINE(sigs.v_i(), kExprTryCatch, WASM_CATCH(0), kExprEnd); |
+ EXPECT_VERIFIES_INLINE(sigs.v_i(), kExprTry, WASM_CATCH(0), kExprEnd); |
// Missing catch. |
- EXPECT_FAILURE_INLINE(sigs.v_v(), kExprTryCatch, kExprEnd); |
+ EXPECT_FAILURE_INLINE(sigs.v_v(), kExprTry, kExprEnd); |
// Missing end. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatch, WASM_CATCH(0)); |
+ EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTry, WASM_CATCH(0)); |
// Double catch. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatch, WASM_CATCH(0), WASM_CATCH(0), |
+ EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTry, WASM_CATCH(0), WASM_CATCH(0), |
kExprEnd); |
- |
- // Unexpected finally. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatch, WASM_CATCH(0), kExprFinally, |
- kExprEnd); |
-} |
- |
-TEST_F(AstDecoderTest, TryFinally) { |
- FLAG_wasm_eh_prototype = true; |
- EXPECT_VERIFIES_INLINE(sigs.v_v(), kExprTryFinally, kExprFinally, kExprEnd); |
- |
- // Mising finally. |
- EXPECT_FAILURE_INLINE(sigs.v_v(), kExprTryFinally, kExprEnd); |
- |
- // Missing end. |
- EXPECT_FAILURE_INLINE(sigs.v_v(), kExprTryFinally, kExprFinally); |
- |
- // Double finally. |
- EXPECT_FAILURE_INLINE(sigs.v_v(), kExprTryFinally, kExprFinally, kExprFinally, |
- kExprEnd); |
- |
- // Unexpected catch. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatch, WASM_CATCH(0), kExprFinally, |
- kExprEnd); |
-} |
- |
-TEST_F(AstDecoderTest, TryCatchFinally) { |
- FLAG_wasm_eh_prototype = true; |
- EXPECT_VERIFIES_INLINE(sigs.v_i(), kExprTryCatchFinally, WASM_CATCH(0), |
- kExprFinally, kExprEnd); |
- |
- // Missing catch. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, kExprFinally, |
- kExprEnd); |
- |
- // Double catch. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, WASM_CATCH(0), |
- WASM_CATCH(0), kExprFinally, kExprEnd); |
- |
- // Missing finally. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, WASM_CATCH(0), |
- kExprEnd); |
- |
- // Double finally. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, WASM_CATCH(0), |
- kExprFinally, kExprFinally, kExprEnd); |
- |
- // Finally before catch. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, kExprFinally, |
- WASM_CATCH(0), kExprEnd); |
- |
- // Missing both try and finally. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, kExprEnd); |
- |
- // Missing end. |
- EXPECT_FAILURE_INLINE(sigs.v_i(), kExprTryCatchFinally, WASM_CATCH(0), |
- kExprFinally); |
} |
class WasmOpcodeLengthTest : public TestWithZone { |
@@ -2100,11 +2044,8 @@ TEST_F(WasmOpcodeLengthTest, Statements) { |
EXPECT_LENGTH(3, kExprBr); |
EXPECT_LENGTH(3, kExprBrIf); |
EXPECT_LENGTH(1, kExprThrow); |
- EXPECT_LENGTH(1, kExprTryCatch); |
- EXPECT_LENGTH(1, kExprTryFinally); |
- EXPECT_LENGTH(1, kExprTryCatchFinally); |
+ EXPECT_LENGTH(1, kExprTry); |
EXPECT_LENGTH(2, kExprCatch); |
- EXPECT_LENGTH(1, kExprFinally); |
} |
TEST_F(WasmOpcodeLengthTest, MiscExpressions) { |
@@ -2348,11 +2289,8 @@ TEST_F(WasmOpcodeArityTest, Control) { |
} |
EXPECT_ARITY(0, kExprThrow); |
- EXPECT_ARITY(0, kExprTryCatch); |
- EXPECT_ARITY(0, kExprTryFinally); |
- EXPECT_ARITY(0, kExprTryCatchFinally); |
+ EXPECT_ARITY(0, kExprTry); |
EXPECT_ARITY(1, kExprCatch, 2); |
- EXPECT_ARITY(0, kExprFinally); |
} |
TEST_F(WasmOpcodeArityTest, Misc) { |