summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/binary-reader-ir.cc28
-rw-r--r--src/binary-reader-logging.cc1
-rw-r--r--src/binary-reader-logging.h1
-rw-r--r--src/binary-reader-nop.h1
-rw-r--r--src/binary-reader-objdump.cc1
-rw-r--r--src/binary-reader.cc6
-rw-r--r--src/binary-reader.h1
-rw-r--r--src/binary-writer.cc5
-rw-r--r--src/common.h3
-rw-r--r--src/expr-visitor.cc16
-rw-r--r--src/expr-visitor.h3
-rw-r--r--src/interp/interp.cc1
-rw-r--r--src/interp/istream.cc1
-rw-r--r--src/ir.h2
-rw-r--r--src/lexer-keywords.txt1
-rw-r--r--src/opcode.cc1
-rw-r--r--src/opcode.def1
-rw-r--r--src/prebuilt/lexer-keywords.cc5
-rw-r--r--src/shared-validator.cc7
-rw-r--r--src/shared-validator.h1
-rw-r--r--src/token.def3
-rw-r--r--src/type-checker.cc31
-rw-r--r--src/type-checker.h3
-rw-r--r--src/validator.cc6
-rw-r--r--src/wast-parser.cc14
-rw-r--r--src/wat-writer.cc17
26 files changed, 13 insertions, 147 deletions
diff --git a/src/binary-reader-ir.cc b/src/binary-reader-ir.cc
index 1251c0af..19fec5c9 100644
--- a/src/binary-reader-ir.cc
+++ b/src/binary-reader-ir.cc
@@ -199,7 +199,6 @@ class BinaryReaderIR : public BinaryReaderNop {
Result OnUnaryExpr(Opcode opcode) override;
Result OnTernaryExpr(Opcode opcode) override;
Result OnUnreachableExpr() override;
- Result OnUnwindExpr() override;
Result EndFunctionBody(Index index) override;
Result OnSimdLaneOpExpr(Opcode opcode, uint64_t value) override;
Result OnSimdLoadLaneExpr(Opcode opcode,
@@ -813,7 +812,6 @@ Result BinaryReaderIR::OnEndExpr() {
case LabelType::Func:
case LabelType::Catch:
- case LabelType::Unwind:
break;
}
@@ -1015,7 +1013,7 @@ Result BinaryReaderIR::AppendCatch(Catch&& catch_) {
if (try_->kind == TryKind::Invalid) {
try_->kind = TryKind::Catch;
} else if (try_->kind != TryKind::Catch) {
- PrintError("catch not allowed in try-unwind or try-delegate");
+ PrintError("catch not allowed in try-delegate");
return Result::Error;
}
@@ -1032,28 +1030,6 @@ Result BinaryReaderIR::OnCatchAllExpr() {
return AppendCatch(Catch(GetLocation()));
}
-Result BinaryReaderIR::OnUnwindExpr() {
- LabelNode* label = nullptr;
- CHECK_RESULT(TopLabel(&label));
-
- if (label->label_type != LabelType::Try) {
- PrintError("unwind not inside try block");
- return Result::Error;
- }
-
- auto* try_ = cast<TryExpr>(label->context);
-
- if (try_->kind == TryKind::Invalid) {
- try_->kind = TryKind::Unwind;
- } else if (try_->kind != TryKind::Unwind) {
- PrintError("unwind not allowed in try-catch or try-delegate");
- return Result::Error;
- }
-
- label->exprs = &try_->unwind;
- return Result::Ok;
-}
-
Result BinaryReaderIR::OnDelegateExpr(Index depth) {
LabelNode* label = nullptr;
CHECK_RESULT(TopLabel(&label));
@@ -1068,7 +1044,7 @@ Result BinaryReaderIR::OnDelegateExpr(Index depth) {
if (try_->kind == TryKind::Invalid) {
try_->kind = TryKind::Delegate;
} else if (try_->kind != TryKind::Delegate) {
- PrintError("delegate not allowed in try-catch or try-unwind");
+ PrintError("delegate not allowed in try-catch");
return Result::Error;
}
diff --git a/src/binary-reader-logging.cc b/src/binary-reader-logging.cc
index 71e43864..d67bb5cb 100644
--- a/src/binary-reader-logging.cc
+++ b/src/binary-reader-logging.cc
@@ -844,7 +844,6 @@ DEFINE_LOAD_STORE_OPCODE(OnLoadZeroExpr);
DEFINE_LOAD_STORE_OPCODE(OnStoreExpr);
DEFINE_INDEX_DESC(OnThrowExpr, "tag_index")
DEFINE0(OnUnreachableExpr)
-DEFINE0(OnUnwindExpr)
DEFINE_OPCODE(OnUnaryExpr)
DEFINE_OPCODE(OnTernaryExpr)
DEFINE_SIMD_LOAD_STORE_LANE_OPCODE(OnSimdLoadLaneExpr);
diff --git a/src/binary-reader-logging.h b/src/binary-reader-logging.h
index 9b7eb862..5e385748 100644
--- a/src/binary-reader-logging.h
+++ b/src/binary-reader-logging.h
@@ -222,7 +222,6 @@ class BinaryReaderLogging : public BinaryReaderDelegate {
Result OnUnaryExpr(Opcode opcode) override;
Result OnTernaryExpr(Opcode opcode) override;
Result OnUnreachableExpr() override;
- Result OnUnwindExpr() override;
Result OnAtomicWaitExpr(Opcode opcode,
Address alignment_log2,
Address offset) override;
diff --git a/src/binary-reader-nop.h b/src/binary-reader-nop.h
index c069914f..1ae01e53 100644
--- a/src/binary-reader-nop.h
+++ b/src/binary-reader-nop.h
@@ -303,7 +303,6 @@ class BinaryReaderNop : public BinaryReaderDelegate {
Result OnUnaryExpr(Opcode opcode) override { return Result::Ok; }
Result OnTernaryExpr(Opcode opcode) override { return Result::Ok; }
Result OnUnreachableExpr() override { return Result::Ok; }
- Result OnUnwindExpr() override { return Result::Ok; }
Result EndFunctionBody(Index index) override { return Result::Ok; }
Result EndCodeSection() override { return Result::Ok; }
Result OnSimdLaneOpExpr(Opcode opcode, uint64_t value) override {
diff --git a/src/binary-reader-objdump.cc b/src/binary-reader-objdump.cc
index 20f82c86..1f02d335 100644
--- a/src/binary-reader-objdump.cc
+++ b/src/binary-reader-objdump.cc
@@ -598,7 +598,6 @@ void BinaryReaderObjdumpDisassemble::LogOpcode(size_t data_size,
case Opcode::Else:
case Opcode::Catch:
case Opcode::CatchAll:
- case Opcode::Unwind:
indent_level--;
default:
break;
diff --git a/src/binary-reader.cc b/src/binary-reader.cc
index 6892bbcc..42fb5029 100644
--- a/src/binary-reader.cc
+++ b/src/binary-reader.cc
@@ -1435,12 +1435,6 @@ Result BinaryReader::ReadFunctionBody(Offset end_offset) {
break;
}
- case Opcode::Unwind: {
- CALLBACK0(OnUnwindExpr);
- CALLBACK0(OnOpcodeBare);
- break;
- }
-
case Opcode::Delegate: {
Index index;
CHECK_RESULT(ReadIndex(&index, "depth"));
diff --git a/src/binary-reader.h b/src/binary-reader.h
index a9463ce5..a688eada 100644
--- a/src/binary-reader.h
+++ b/src/binary-reader.h
@@ -290,7 +290,6 @@ class BinaryReaderDelegate {
virtual Result OnUnaryExpr(Opcode opcode) = 0;
virtual Result OnTernaryExpr(Opcode opcode) = 0;
virtual Result OnUnreachableExpr() = 0;
- virtual Result OnUnwindExpr() = 0;
virtual Result EndFunctionBody(Index index) = 0;
virtual Result EndCodeSection() = 0;
diff --git a/src/binary-writer.cc b/src/binary-writer.cc
index 2cac2967..5638bd4e 100644
--- a/src/binary-writer.cc
+++ b/src/binary-writer.cc
@@ -1006,11 +1006,6 @@ void BinaryWriter::WriteExpr(const Func* func, const Expr* expr) {
}
WriteOpcode(stream_, Opcode::End);
break;
- case TryKind::Unwind:
- WriteOpcode(stream_, Opcode::Unwind);
- WriteExprList(func, try_expr->unwind);
- WriteOpcode(stream_, Opcode::End);
- break;
case TryKind::Delegate:
WriteOpcode(stream_, Opcode::Delegate);
WriteU32Leb128(stream_,
diff --git a/src/common.h b/src/common.h
index c48f22de..d90ba45b 100644
--- a/src/common.h
+++ b/src/common.h
@@ -230,10 +230,9 @@ enum class LabelType {
Else,
Try,
Catch,
- Unwind,
First = Func,
- Last = Unwind,
+ Last = Catch,
};
static const int kLabelTypeCount = WABT_ENUM_COUNT(LabelType);
diff --git a/src/expr-visitor.cc b/src/expr-visitor.cc
index 5ef2b473..fa572285 100644
--- a/src/expr-visitor.cc
+++ b/src/expr-visitor.cc
@@ -107,10 +107,6 @@ Result ExprVisitor::VisitExpr(Expr* root_expr) {
CHECK_RESULT(delegate_->EndTryExpr(try_expr));
}
break;
- case TryKind::Unwind:
- CHECK_RESULT(delegate_->OnUnwindExpr(try_expr));
- PushExprlist(State::Unwind, expr, try_expr->unwind);
- break;
case TryKind::Delegate:
CHECK_RESULT(delegate_->OnDelegateExpr(try_expr));
break;
@@ -141,18 +137,6 @@ Result ExprVisitor::VisitExpr(Expr* root_expr) {
}
break;
}
-
- case State::Unwind: {
- auto try_expr = cast<TryExpr>(expr);
- auto& iter = expr_iter_stack_.back();
- if (iter != try_expr->unwind.end()) {
- PushDefault(&*iter++);
- } else {
- CHECK_RESULT(delegate_->EndTryExpr(try_expr));
- PopExprlist();
- }
- break;
- }
}
}
diff --git a/src/expr-visitor.h b/src/expr-visitor.h
index 19277d56..eda287f0 100644
--- a/src/expr-visitor.h
+++ b/src/expr-visitor.h
@@ -42,7 +42,6 @@ class ExprVisitor {
Loop,
Try,
Catch,
- Unwind,
};
Result HandleDefaultState(Expr*);
@@ -118,7 +117,6 @@ class ExprVisitor::Delegate {
virtual Result OnUnreachableExpr(UnreachableExpr*) = 0;
virtual Result BeginTryExpr(TryExpr*) = 0;
virtual Result OnCatchExpr(TryExpr*, Catch*) = 0;
- virtual Result OnUnwindExpr(TryExpr*) = 0;
virtual Result OnDelegateExpr(TryExpr*) = 0;
virtual Result EndTryExpr(TryExpr*) = 0;
virtual Result OnThrowExpr(ThrowExpr*) = 0;
@@ -193,7 +191,6 @@ class ExprVisitor::DelegateNop : public ExprVisitor::Delegate {
Result OnUnreachableExpr(UnreachableExpr*) override { return Result::Ok; }
Result BeginTryExpr(TryExpr*) override { return Result::Ok; }
Result OnCatchExpr(TryExpr*, Catch*) override { return Result::Ok; }
- Result OnUnwindExpr(TryExpr*) override { return Result::Ok; }
Result OnDelegateExpr(TryExpr*) override { return Result::Ok; }
Result EndTryExpr(TryExpr*) override { return Result::Ok; }
Result OnThrowExpr(ThrowExpr*) override { return Result::Ok; }
diff --git a/src/interp/interp.cc b/src/interp/interp.cc
index 6a7fd2fe..44fa5b66 100644
--- a/src/interp/interp.cc
+++ b/src/interp/interp.cc
@@ -1794,7 +1794,6 @@ RunResult Thread::StepInternal(Trap::Ptr* out_trap) {
case O::Try:
case O::Catch:
case O::CatchAll:
- case O::Unwind:
case O::Delegate:
case O::Throw:
case O::Rethrow:
diff --git a/src/interp/istream.cc b/src/interp/istream.cc
index cc8ec547..609c6923 100644
--- a/src/interp/istream.cc
+++ b/src/interp/istream.cc
@@ -764,7 +764,6 @@ Instr Istream::Read(Offset* offset) const {
case Opcode::Rethrow:
case Opcode::Throw:
case Opcode::Try:
- case Opcode::Unwind:
case Opcode::ReturnCall:
// Not used.
break;
diff --git a/src/ir.h b/src/ir.h
index ca2d6c2f..d68cd141 100644
--- a/src/ir.h
+++ b/src/ir.h
@@ -380,7 +380,6 @@ typedef std::vector<Catch> CatchVector;
enum class TryKind {
Invalid,
Catch,
- Unwind,
Delegate
};
@@ -609,7 +608,6 @@ class TryExpr : public ExprMixin<ExprType::Try> {
TryKind kind;
Block block;
CatchVector catches;
- ExprList unwind;
Var delegate_target;
};
diff --git a/src/lexer-keywords.txt b/src/lexer-keywords.txt
index 67eb7fad..9f23590e 100644
--- a/src/lexer-keywords.txt
+++ b/src/lexer-keywords.txt
@@ -628,4 +628,3 @@ i64.trunc_u:sat/f64, TokenType::Convert, Opcode::I64TruncSatF64U
set_global, TokenType::GlobalSet, Opcode::GlobalSet
set_local, TokenType::LocalSet, Opcode::LocalSet
tee_local, TokenType::LocalTee, Opcode::LocalTee
-unwind, TokenType::Unwind, Opcode::Unwind
diff --git a/src/opcode.cc b/src/opcode.cc
index 1883aa86..d4ffcdc1 100644
--- a/src/opcode.cc
+++ b/src/opcode.cc
@@ -65,7 +65,6 @@ bool Opcode::IsEnabled(const Features& features) const {
switch (enum_) {
case Opcode::Try:
case Opcode::Catch:
- case Opcode::Unwind:
case Opcode::Delegate:
case Opcode::Throw:
case Opcode::Rethrow:
diff --git a/src/opcode.def b/src/opcode.def
index 18c415ca..846841d1 100644
--- a/src/opcode.def
+++ b/src/opcode.def
@@ -45,7 +45,6 @@ WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x06, Try, "try", "")
WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x07, Catch, "catch", "")
WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x08, Throw, "throw", "")
WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x09, Rethrow, "rethrow", "")
-WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x0a, Unwind, "unwind", "")
WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x0b, End, "end", "")
WABT_OPCODE(___, ___, ___, ___, 0, 0, 0x0c, Br, "br", "")
WABT_OPCODE(___, I32, ___, ___, 0, 0, 0x0d, BrIf, "br_if", "")
diff --git a/src/prebuilt/lexer-keywords.cc b/src/prebuilt/lexer-keywords.cc
index 3e74f582..0c2d8df8 100644
--- a/src/prebuilt/lexer-keywords.cc
+++ b/src/prebuilt/lexer-keywords.cc
@@ -158,7 +158,7 @@ Perfect_Hash::InWordSet (const char *str, size_t len)
{
enum
{
- TOTAL_KEYWORDS = 611,
+ TOTAL_KEYWORDS = 610,
MIN_WORD_LENGTH = 2,
MAX_WORD_LENGTH = 29,
MIN_HASH_VALUE = 19,
@@ -457,8 +457,7 @@ Perfect_Hash::InWordSet (const char *str, size_t len)
{"i64x2.bitmask", TokenType::Unary, Opcode::I64X2Bitmask},
#line 383 "src/lexer-keywords.txt"
{"i64.atomic.store32", TokenType::AtomicStore, Opcode::I64AtomicStore32},
-#line 631 "src/lexer-keywords.txt"
- {"unwind", TokenType::Unwind, Opcode::Unwind},
+ {""},
#line 407 "src/lexer-keywords.txt"
{"i64.load32_u", TokenType::Load, Opcode::I64Load32U},
{""},
diff --git a/src/shared-validator.cc b/src/shared-validator.cc
index 0071d2f2..214c4204 100644
--- a/src/shared-validator.cc
+++ b/src/shared-validator.cc
@@ -1241,11 +1241,4 @@ Result SharedValidator::OnUnreachable(const Location& loc) {
return result;
}
-Result SharedValidator::OnUnwind(const Location& loc) {
- Result result = Result::Ok;
- expr_loc_ = &loc;
- result |= typechecker_.OnUnwind();
- return result;
-}
-
} // namespace wabt
diff --git a/src/shared-validator.h b/src/shared-validator.h
index f5b8ce9a..da49e4e0 100644
--- a/src/shared-validator.h
+++ b/src/shared-validator.h
@@ -175,7 +175,6 @@ class SharedValidator {
Result OnTry(const Location&, Type sig_type);
Result OnUnary(const Location&, Opcode);
Result OnUnreachable(const Location&);
- Result OnUnwind(const Location&);
private:
struct FuncType {
diff --git a/src/token.def b/src/token.def
index a54e37ac..4c582491 100644
--- a/src/token.def
+++ b/src/token.def
@@ -145,9 +145,8 @@ WABT_TOKEN(Throw, "throw")
WABT_TOKEN(Try, "try")
WABT_TOKEN(Unary, "UNARY")
WABT_TOKEN(Unreachable, "unreachable")
-WABT_TOKEN(Unwind, "unwind")
WABT_TOKEN_FIRST(Opcode, AtomicFence)
-WABT_TOKEN_LAST(Opcode, Unwind)
+WABT_TOKEN_LAST(Opcode, Unreachable)
/* Tokens with string data. */
WABT_TOKEN(AlignEqNat, "align=")
diff --git a/src/type-checker.cc b/src/type-checker.cc
index 1826e1d2..1daa5ecf 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -589,11 +589,10 @@ Result TypeChecker::OnElse() {
}
Result TypeChecker::OnEnd(Label* label,
- TypeVector& check_type,
const char* sig_desc,
const char* end_desc) {
Result result = Result::Ok;
- result |= PopAndCheckSignature(check_type, sig_desc);
+ result |= PopAndCheckSignature(label->result_types, sig_desc);
result |= CheckTypeStackEnd(end_desc);
ResetTypeStackToLabel(label);
PushTypes(label->result_types);
@@ -604,8 +603,7 @@ Result TypeChecker::OnEnd(Label* label,
Result TypeChecker::OnEnd() {
Result result = Result::Ok;
static const char* s_label_type_name[] = {
- "function", "block", "loop", "if", "if false branch", "try",
- "try catch", "try unwind"};
+ "function", "block", "loop", "if", "if false branch", "try", "try catch"};
WABT_STATIC_ASSERT(WABT_ARRAY_SIZE(s_label_type_name) == kLabelTypeCount);
Label* label;
CHECK_RESULT(TopLabel(&label));
@@ -618,15 +616,7 @@ Result TypeChecker::OnEnd() {
}
const char* desc = s_label_type_name[static_cast<int>(label->label_type)];
- if (label->label_type == LabelType::Unwind) {
- // Unwind is unusual in that it always unwinds the control stack at the end,
- // and therefore the return type of the unwind expressions are not the same
- // as the block return type.
- TypeVector empty;
- result |= OnEnd(label, empty, desc, desc);
- } else {
- result |= OnEnd(label, label->result_types, desc, desc);
- }
+ result |= OnEnd(label, desc, desc);
return result;
}
@@ -914,25 +904,12 @@ Result TypeChecker::OnUnreachable() {
return SetUnreachable();
}
-Result TypeChecker::OnUnwind() {
- Result result = Result::Ok;
- Label* label;
- CHECK_RESULT(TopLabel(&label));
- result |= CheckLabelType(label, LabelType::Try);
- result |= PopAndCheckSignature(label->result_types, "try block");
- result |= CheckTypeStackEnd("try block");
- ResetTypeStackToLabel(label);
- label->label_type = LabelType::Unwind;
- label->unreachable = false;
- return result;
-}
-
Result TypeChecker::EndFunction() {
Result result = Result::Ok;
Label* label;
CHECK_RESULT(TopLabel(&label));
result |= CheckLabelType(label, LabelType::Func);
- result |= OnEnd(label, label->result_types, "implicit return", "function");
+ result |= OnEnd(label, "implicit return", "function");
return result;
}
diff --git a/src/type-checker.h b/src/type-checker.h
index b183ee07..4a027568 100644
--- a/src/type-checker.h
+++ b/src/type-checker.h
@@ -125,7 +125,6 @@ class TypeChecker {
Result OnTry(const TypeVector& param_types, const TypeVector& result_types);
Result OnUnary(Opcode);
Result OnUnreachable();
- Result OnUnwind();
Result EndFunction();
static Result CheckType(Type actual, Type expected);
@@ -169,7 +168,7 @@ class TypeChecker {
const Limits* limits1 = nullptr,
const Limits* limits2 = nullptr,
const Limits* limits3 = nullptr);
- Result OnEnd(Label* label, TypeVector& check_type, const char* sig_desc, const char* end_desc);
+ Result OnEnd(Label* label, const char* sig_desc, const char* end_desc);
template <typename... Args>
void PrintStackIfFailed(Result result, const char* desc, Args... args) {
diff --git a/src/validator.cc b/src/validator.cc
index e192ff98..b98121d4 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -135,7 +135,6 @@ class Validator : public ExprVisitor::Delegate {
Result OnUnreachableExpr(UnreachableExpr*) override;
Result BeginTryExpr(TryExpr*) override;
Result OnCatchExpr(TryExpr*, Catch*) override;
- Result OnUnwindExpr(TryExpr*) override;
Result OnDelegateExpr(TryExpr*) override;
Result EndTryExpr(TryExpr*) override;
Result OnThrowExpr(ThrowExpr*) override;
@@ -499,11 +498,6 @@ Result Validator::OnCatchExpr(TryExpr*, Catch* catch_) {
return Result::Ok;
}
-Result Validator::OnUnwindExpr(TryExpr* expr) {
- result_ |= validator_.OnUnwind(expr->loc);
- return Result::Ok;
-}
-
Result Validator::OnDelegateExpr(TryExpr* expr) {
result_ |= validator_.OnDelegate(expr->loc, expr->delegate_target);
return Result::Ok;
diff --git a/src/wast-parser.cc b/src/wast-parser.cc
index 955b6a3d..22dd5322 100644
--- a/src/wast-parser.cc
+++ b/src/wast-parser.cc
@@ -2591,10 +2591,6 @@ Result WastParser::ParseBlockInstr(std::unique_ptr<Expr>* out_expr) {
if (IsCatch(Peek())) {
CHECK_RESULT(ParseCatchInstrList(&expr->catches));
expr->kind = TryKind::Catch;
- } else if (PeekMatch(TokenType::Unwind)) {
- Consume();
- CHECK_RESULT(ParseInstrList(&expr->unwind));
- expr->kind = TryKind::Unwind;
} else if (PeekMatch(TokenType::Delegate)) {
Consume();
Var var;
@@ -2602,7 +2598,7 @@ Result WastParser::ParseBlockInstr(std::unique_ptr<Expr>* out_expr) {
expr->delegate_target = var;
expr->kind = TryKind::Delegate;
} else {
- return ErrorExpected({"catch", "catch_all", "unwind", "delegate"});
+ return ErrorExpected({"catch", "catch_all", "delegate"});
}
CHECK_RESULT(ErrorIfLpar({"a valid try clause"}));
expr->block.end_loc = GetLocation();
@@ -2779,12 +2775,6 @@ Result WastParser::ParseExpr(ExprList* exprs) {
CHECK_RESULT(ParseCatchExprList(&expr->catches));
expr->kind = TryKind::Catch;
break;
- case TokenType::Unwind:
- Consume();
- CHECK_RESULT(ParseTerminatingInstrList(&expr->unwind));
- expr->kind = TryKind::Unwind;
- EXPECT(Rpar);
- break;
case TokenType::Delegate: {
Consume();
Var var;
@@ -2795,7 +2785,7 @@ Result WastParser::ParseExpr(ExprList* exprs) {
break;
}
default:
- ErrorExpected({"catch", "catch_all", "unwind", "delegate"});
+ ErrorExpected({"catch", "catch_all", "delegate"});
break;
}
CHECK_RESULT(ErrorIfLpar({"a valid try clause"}));
diff --git a/src/wat-writer.cc b/src/wat-writer.cc
index e3df443b..74964888 100644
--- a/src/wat-writer.cc
+++ b/src/wat-writer.cc
@@ -558,7 +558,6 @@ class WatWriter::ExprVisitorDelegate : public ExprVisitor::Delegate {
Result OnUnreachableExpr(UnreachableExpr*) override;
Result BeginTryExpr(TryExpr*) override;
Result OnCatchExpr(TryExpr*, Catch*) override;
- Result OnUnwindExpr(TryExpr*) override;
Result OnDelegateExpr(TryExpr*) override;
Result EndTryExpr(TryExpr*) override;
Result OnThrowExpr(ThrowExpr*) override;
@@ -894,14 +893,6 @@ Result WatWriter::ExprVisitorDelegate::OnCatchExpr(
return Result::Ok;
}
-Result WatWriter::ExprVisitorDelegate::OnUnwindExpr(TryExpr* expr) {
- writer_->Dedent();
- writer_->WritePutsNewline(Opcode::Unwind_Opcode.GetName());
- writer_->Indent();
- writer_->SetTopLabelType(LabelType::Unwind);
- return Result::Ok;
-}
-
Result WatWriter::ExprVisitorDelegate::OnDelegateExpr(TryExpr* expr) {
writer_->Dedent();
writer_->EndBlock();
@@ -1174,14 +1165,6 @@ void WatWriter::FlushExprTree(const ExprTree& expr_tree) {
WriteCloseNewline();
}
break;
- case TryKind::Unwind:
- WritePuts("(", NextChar::None);
- WritePutsNewline(Opcode::Unwind_Opcode.GetName());
- Indent();
- WriteFoldedExprList(try_expr->unwind);
- FlushExprTreeStack();
- WriteCloseNewline();
- break;
case TryKind::Delegate:
WritePuts("(", NextChar::None);
WritePutsSpace(Opcode::Delegate_Opcode.GetName());