summaryrefslogtreecommitdiff
path: root/src/expr-visitor.h
diff options
context:
space:
mode:
authorKarlSchimpf <karlschimpf@gmail.com>2017-06-22 07:59:09 -0700
committerGitHub <noreply@github.com>2017-06-22 07:59:09 -0700
commit917d3bfa6593c9a85c81b674770aec2ca404a4a2 (patch)
treeff279590a68c00714889d1667da9739f7e7cbd9a /src/expr-visitor.h
parentc0ae2e69b53f12e57833270e1b48a01864fb5156 (diff)
downloadwabt-917d3bfa6593c9a85c81b674770aec2ca404a4a2.tar.gz
wabt-917d3bfa6593c9a85c81b674770aec2ca404a4a2.tar.bz2
wabt-917d3bfa6593c9a85c81b674770aec2ca404a4a2.zip
Fix the validator to be able to validate exception handling constructs. (#514)
* Save state. * Add exception declaration syntax. * Extend validator to handle exception declarations. * Fix binary writer to handle exception declarations. * Fix code to handle external exception kind. * Regenerate lexer. * Fix bug with last merge. * Add exception declarations, and add examples. * Fix nits. * Initial extensions for expr visitor. * Save state. * Fix issues with master merge. * Reconcile issues with merge of tools wast2wasm and wast-desugar. * Save state. * Save work to move to mtv. * Fix resolving names on try/throw constructs. * Completed implementation of validation for exception handling. * Fix nits. * Combine Catch and CatchAll in IR. * Remove tryblock visitors. * Clean up to only use one visitor for each catch. * Rework the structure of try blocks and catches. * Remove the need for common CLI options. * Fix issues raised by binji. * Fix re2c generated file. * Fix memory leak, and fix nits.
Diffstat (limited to 'src/expr-visitor.h')
-rw-r--r--src/expr-visitor.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/expr-visitor.h b/src/expr-visitor.h
index 11103d5e..99a74ec1 100644
--- a/src/expr-visitor.h
+++ b/src/expr-visitor.h
@@ -21,6 +21,7 @@
namespace wabt {
+struct Catch;
struct Expr;
struct Func;
@@ -74,6 +75,11 @@ class ExprVisitor::Delegate {
virtual Result OnTeeLocalExpr(Expr*) = 0;
virtual Result OnUnaryExpr(Expr*) = 0;
virtual Result OnUnreachableExpr(Expr*) = 0;
+ virtual Result BeginTryExpr(Expr*) = 0;
+ virtual Result EndTryExpr(Expr*) = 0;
+ virtual Result OnCatchExpr(Expr*, Catch*) = 0;
+ virtual Result OnThrowExpr(Expr*) = 0;
+ virtual Result OnRethrowExpr(Expr*) = 0;
};
class ExprVisitor::DelegateNop : public ExprVisitor::Delegate {
@@ -109,6 +115,11 @@ class ExprVisitor::DelegateNop : public ExprVisitor::Delegate {
Result OnTeeLocalExpr(Expr*) override { return Result::Ok; }
Result OnUnaryExpr(Expr*) override { return Result::Ok; }
Result OnUnreachableExpr(Expr*) override { return Result::Ok; }
+ Result BeginTryExpr(Expr*) override { return Result::Ok; }
+ Result EndTryExpr(Expr*) override { return Result::Ok; }
+ Result OnCatchExpr(Expr*, Catch*) override { return Result::Ok; }
+ Result OnThrowExpr(Expr*) override { return Result::Ok; }
+ Result OnRethrowExpr(Expr*) override { return Result::Ok; }
};
} // namespace wabt