summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBen Smith <binji@chromium.org>2020-07-15 14:54:33 -0700
committerGitHub <noreply@github.com>2020-07-15 14:54:33 -0700
commit3041d94d21c82c5a31d1d003bfacbcf2fc28b573 (patch)
treea57a2b12cb8133c3494c47d0e0b3290302779dcb /src
parent3e8b0bb489d63f0a211e00c7de3b629410aa3c08 (diff)
downloadwabt-3041d94d21c82c5a31d1d003bfacbcf2fc28b573.tar.gz
wabt-3041d94d21c82c5a31d1d003bfacbcf2fc28b573.tar.bz2
wabt-3041d94d21c82c5a31d1d003bfacbcf2fc28b573.zip
Revert br_table in reference types proposal (#1484)
The reference types proposal originally modified the `br_table` behavior to only check arity, not the specific types. This was to remove a subtyping check, but now that subtyping has been removed, we can revert back to the original (MVP) br_table behavior.
Diffstat (limited to 'src')
-rw-r--r--src/type-checker.cc20
1 files changed, 5 insertions, 15 deletions
diff --git a/src/type-checker.cc b/src/type-checker.cc
index 0304a09f..b823ce81 100644
--- a/src/type-checker.cc
+++ b/src/type-checker.cc
@@ -420,21 +420,11 @@ Result TypeChecker::OnBrTableTarget(Index depth) {
if (br_table_sig_ == nullptr) {
br_table_sig_ = &label_sig;
} else {
- if (features_.reference_types_enabled()) {
- if (br_table_sig_->size() != label_sig.size()) {
- result |= Result::Error;
- PrintError("br_table labels have inconsistent arity: expected %" PRIzd
- " got %" PRIzd,
- br_table_sig_->size(), label_sig.size());
- }
- } else {
- if (*br_table_sig_ != label_sig) {
- result |= Result::Error;
- PrintError(
- "br_table labels have inconsistent types: expected %s, got %s",
- TypesToString(*br_table_sig_).c_str(),
- TypesToString(label_sig).c_str());
- }
+ if (*br_table_sig_ != label_sig) {
+ result |= Result::Error;
+ PrintError("br_table labels have inconsistent types: expected %s, got %s",
+ TypesToString(*br_table_sig_).c_str(),
+ TypesToString(label_sig).c_str());
}
}