diff options
author | Alon Zakai <azakai@google.com> | 2022-06-30 15:14:49 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 22:14:49 +0000 |
commit | b69d3a8fa0d6d7588811ef92067a48eed576e03f (patch) | |
tree | 47e7ba7659f2c65737f121b36e2334fc076b5bd6 /src/wasm/wasm-binary.cpp | |
parent | 53de5ed9ac251301c33125bb58137d0a992d984b (diff) | |
download | binaryen-b69d3a8fa0d6d7588811ef92067a48eed576e03f.tar.gz binaryen-b69d3a8fa0d6d7588811ef92067a48eed576e03f.tar.bz2 binaryen-b69d3a8fa0d6d7588811ef92067a48eed576e03f.zip |
[Strings] Add feature flag for Strings proposal (#4766)
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index f087e3e4b..263f905fb 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -1101,6 +1101,8 @@ void WasmBinaryWriter::writeFeaturesSection() { return BinaryConsts::UserSections::RelaxedSIMDFeature; case FeatureSet::ExtendedConst: return BinaryConsts::UserSections::ExtendedConstFeature; + case FeatureSet::Strings: + return BinaryConsts::UserSections::StringsFeature; default: WASM_UNREACHABLE("unexpected feature flag"); } @@ -3416,6 +3418,8 @@ void WasmBinaryBuilder::readFeatures(size_t payloadLen) { feature = FeatureSet::RelaxedSIMD; } else if (name == BinaryConsts::UserSections::ExtendedConstFeature) { feature = FeatureSet::ExtendedConst; + } else if (name == BinaryConsts::UserSections::StringsFeature) { + feature = FeatureSet::Strings; } else { // Silently ignore unknown features (this may be and old binaryen running // on a new wasm). |