diff options
Diffstat (limited to 'src/wasm-features.h')
-rw-r--r-- | src/wasm-features.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/wasm-features.h b/src/wasm-features.h index 64d831ecc..10e4ac4c7 100644 --- a/src/wasm-features.h +++ b/src/wasm-features.h @@ -43,11 +43,12 @@ struct FeatureSet { GCNNLocals = 1 << 13, RelaxedSIMD = 1 << 14, ExtendedConst = 1 << 15, + Strings = 1 << 16, // GCNNLocals are opt-in: merely asking for "All" does not apply them. To // get all possible values use AllPossible. See setAll() below for more // details. - All = ((1 << 16) - 1) & ~GCNNLocals, - AllPossible = (1 << 16) - 1, + All = ((1 << 17) - 1) & ~GCNNLocals, + AllPossible = (1 << 17) - 1, }; static std::string toString(Feature f) { @@ -84,6 +85,8 @@ struct FeatureSet { return "relaxed-simd"; case ExtendedConst: return "extended-const"; + case Strings: + return "strings"; default: WASM_UNREACHABLE("unexpected feature"); } @@ -130,6 +133,7 @@ struct FeatureSet { bool hasGCNNLocals() const { return (features & GCNNLocals) != 0; } bool hasRelaxedSIMD() const { return (features & RelaxedSIMD) != 0; } bool hasExtendedConst() const { return (features & ExtendedConst) != 0; } + bool hasStrings() const { return (features & Strings) != 0; } bool hasAll() const { return (features & AllPossible) != 0; } void set(FeatureSet f, bool v = true) { @@ -153,6 +157,7 @@ struct FeatureSet { void setGCNNLocals(bool v = true) { set(GCNNLocals, v); } void setRelaxedSIMD(bool v = true) { set(RelaxedSIMD, v); } void setExtendedConst(bool v = true) { set(ExtendedConst, v); } + void setStrings(bool v = true) { set(Strings, v); } void setMVP() { features = MVP; } void setAll() { // Do not set GCNNLocals, which forces the user to opt in to that feature |