summaryrefslogtreecommitdiff
path: root/src/validator.cc
diff options
context:
space:
mode:
authorSam Clegg <sbc@chromium.org>2019-12-13 18:21:20 -0600
committerGitHub <noreply@github.com>2019-12-13 18:21:20 -0600
commitb238f211161c38b8b92eecd43aa057e8fb60f01a (patch)
tree6b97135d121a7e44993326913615cc71412304c6 /src/validator.cc
parentc3038c52956e84b53736e7155d6aaf89e2ac48b1 (diff)
downloadwabt-b238f211161c38b8b92eecd43aa057e8fb60f01a.tar.gz
wabt-b238f211161c38b8b92eecd43aa057e8fb60f01a.tar.bz2
wabt-b238f211161c38b8b92eecd43aa057e8fb60f01a.zip
reference-types: add final test: br_table (#1264)
This requires some slightly different validation rules for MVP vs interface-types. There is a test in unreachable-invalid.wast that was removed in the reference-types repo: type-br_table-label-num-vs-label-num-after-unreachable This test depends on the old validation rules and still exists in the master testsuite so we need to continue to support both sets of rules for now.
Diffstat (limited to 'src/validator.cc')
-rw-r--r--src/validator.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/validator.cc b/src/validator.cc
index d8ac6666..5978275d 100644
--- a/src/validator.cc
+++ b/src/validator.cc
@@ -228,7 +228,10 @@ class Validator : public ExprVisitor::Delegate {
Validator::Validator(Errors* errors,
const Script* script,
const ValidateOptions& options)
- : options_(options), errors_(errors), script_(script) {
+ : options_(options),
+ errors_(errors),
+ script_(script),
+ typechecker_(options.features) {
typechecker_.set_error_callback(
[this](const char* msg) { OnTypecheckerError(msg); });
}