diff options
author | Ashley Nelson <nashley@google.com> | 2022-08-25 13:35:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-25 13:35:46 -0700 |
commit | 8b81405778eb85fccbfdbe789beeba5108cf1021 (patch) | |
tree | 0263c08a9453021cb30712a199d9b8917e944fa6 /src/wasm/wasm-binary.cpp | |
parent | 37b457a00a46e5604b2a8a388efaf0813b3d1170 (diff) | |
download | binaryen-8b81405778eb85fccbfdbe789beeba5108cf1021.tar.gz binaryen-8b81405778eb85fccbfdbe789beeba5108cf1021.tar.bz2 binaryen-8b81405778eb85fccbfdbe789beeba5108cf1021.zip |
Adding Multi-Memories Wasm Feature (#4968)
Adding multi-memories to the the list of wasm-features.
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 0a5933baf..f8f3d9fbe 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -1202,6 +1202,8 @@ void WasmBinaryWriter::writeFeaturesSection() { return BinaryConsts::UserSections::ExtendedConstFeature; case FeatureSet::Strings: return BinaryConsts::UserSections::StringsFeature; + case FeatureSet::MultiMemories: + return BinaryConsts::UserSections::MultiMemoriesFeature; default: WASM_UNREACHABLE("unexpected feature flag"); } @@ -3534,6 +3536,8 @@ void WasmBinaryBuilder::readFeatures(size_t payloadLen) { feature = FeatureSet::ExtendedConst; } else if (name == BinaryConsts::UserSections::StringsFeature) { feature = FeatureSet::Strings; + } else if (name == BinaryConsts::UserSections::MultiMemoriesFeature) { + feature = FeatureSet::MultiMemories; } else { // Silently ignore unknown features (this may be and old binaryen running // on a new wasm). |