diff options
-rw-r--r-- | src/wasm-binary.h | 6 | ||||
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 |
2 files changed, 3 insertions, 11 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index 3c59ed3aa..ca14bd41f 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1156,11 +1156,7 @@ enum MemoryAccess { enum MemoryFlags { HasMaximum = 1 << 0, IsShared = 1 << 1, Is64 = 1 << 2 }; -enum FeaturePrefix { - FeatureUsed = '+', - FeatureRequired = '=', - FeatureDisallowed = '-' -}; +enum FeaturePrefix { FeatureUsed = '+', FeatureDisallowed = '-' }; } // namespace BinaryConsts diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index bc7ec8ac8..173a89163 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -3816,15 +3816,11 @@ void WasmBinaryReader::readFeatures(size_t payloadLen) { uint8_t prefix = getInt8(); bool disallowed = prefix == BinaryConsts::FeatureDisallowed; - bool required = prefix == BinaryConsts::FeatureRequired; bool used = prefix == BinaryConsts::FeatureUsed; - if (!disallowed && !required && !used) { + if (!disallowed && !used) { throwError("Unrecognized feature policy prefix"); } - if (required) { - std::cerr << "warning: required features in feature section are ignored"; - } Name name = getInlineString(); if (pos > sectionPos + payloadLen) { @@ -3881,7 +3877,7 @@ void WasmBinaryReader::readFeatures(size_t payloadLen) { << "warning: feature " << feature.toString() << " was enabled by the user, but disallowed in the features section."; } - if (required || used) { + if (used) { wasm.features.enable(feature); } } |