Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(467)

Unified Diff: test/unittests/wasm/ast-decoder-unittest.cc

Issue 2336303002: [V8][Wasm] Removes references to finally in wasm. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates comment Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/wasm/wasm-opcodes.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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) {
« no previous file with comments | « src/wasm/wasm-opcodes.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698