summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-validator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm/wasm-validator.cpp')
-rw-r--r--src/wasm/wasm-validator.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 1557240bb..cc8a2bb56 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -1398,6 +1398,7 @@ void FunctionValidator::validateMemBytes(uint8_t bytes,
case Type::exnref:
case Type::anyref:
case Type::eqref:
+ case Type::dataref:
case Type::i31ref:
case Type::none:
WASM_UNREACHABLE("unexpected type");
@@ -2447,7 +2448,7 @@ void FunctionValidator::visitFunction(Function* curr) {
}
for (const auto& var : curr->vars) {
features |= var.getFeatures();
- shouldBeTrue(var.isDefaultable(), curr, "vars must be defaultable");
+ shouldBeTrue(var.isDefaultable(), var, "vars must be defaultable");
}
shouldBeTrue(features <= getModule()->features,
curr->name,
@@ -2544,6 +2545,7 @@ void FunctionValidator::validateAlignment(
case Type::exnref:
case Type::anyref:
case Type::eqref:
+ case Type::dataref:
case Type::i31ref:
case Type::none:
WASM_UNREACHABLE("invalid type");