summaryrefslogtreecommitdiff
path: root/src/wasm-features.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-features.h')
-rw-r--r--src/wasm-features.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/wasm-features.h b/src/wasm-features.h
index 4dd806e28..49f49db09 100644
--- a/src/wasm-features.h
+++ b/src/wasm-features.h
@@ -54,6 +54,11 @@ struct FeatureSet {
void setSignExt(bool v = true) { set(SignExt, v); }
void setAll(bool v = true) { features = v ? All : MVP; }
+ void enable(const FeatureSet& other) { features |= other.features; }
+ void disable(const FeatureSet& other) {
+ features = features & ~other.features & All;
+ }
+
bool operator<=(const FeatureSet& other) {
return !(features & ~other.features);
}