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.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index 4bb556160..0b60aed5c 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -490,6 +490,7 @@ public:
void visitContBind(ContBind* curr);
void visitContNew(ContNew* curr);
void visitResume(Resume* curr);
+ void visitSuspend(Suspend* curr);
void visitFunction(Function* curr);
@@ -3345,6 +3346,14 @@ void FunctionValidator::visitResume(Resume* curr) {
"invalid type in Resume expression");
}
+void FunctionValidator::visitSuspend(Suspend* curr) {
+ // TODO implement actual type-checking
+ shouldBeTrue(
+ !getModule() || getModule()->features.hasTypedContinuations(),
+ curr,
+ "suspend requires typed-continuations [--enable-typed-continuations]");
+}
+
void FunctionValidator::visitFunction(Function* curr) {
FeatureSet features;
// Check for things like having a rec group with GC enabled. The type we're