diff options
Diffstat (limited to 'src/wasm')
-rw-r--r-- | src/wasm/wasm-binary.cpp | 8 | ||||
-rw-r--r-- | src/wasm/wasm-type.cpp | 2 | ||||
-rw-r--r-- | src/wasm/wasm-validator.cpp | 4 | ||||
-rw-r--r-- | src/wasm/wasm.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp index 5942a979f..2910bb383 100644 --- a/src/wasm/wasm-binary.cpp +++ b/src/wasm/wasm-binary.cpp @@ -750,8 +750,8 @@ void WasmBinaryWriter::writeFeaturesSection() { return BinaryConsts::UserSections::ReferenceTypesFeature; case FeatureSet::Multivalue: return BinaryConsts::UserSections::MultivalueFeature; - case FeatureSet::Anyref: - return BinaryConsts::UserSections::AnyrefFeature; + case FeatureSet::GC: + return BinaryConsts::UserSections::GCFeature; default: WASM_UNREACHABLE("unexpected feature flag"); } @@ -2307,8 +2307,8 @@ void WasmBinaryBuilder::readFeatures(size_t payloadLen) { wasm.features.setReferenceTypes(); } else if (name == BinaryConsts::UserSections::MultivalueFeature) { wasm.features.setMultivalue(); - } else if (name == BinaryConsts::UserSections::AnyrefFeature) { - wasm.features.setAnyref(); + } else if (name == BinaryConsts::UserSections::GCFeature) { + wasm.features.setGC(); } } } diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp index 0c49e8dcc..d88b7b027 100644 --- a/src/wasm/wasm-type.cpp +++ b/src/wasm/wasm-type.cpp @@ -454,7 +454,7 @@ FeatureSet Type::getFeatures() const { case Type::exnref: return FeatureSet::ReferenceTypes | FeatureSet::ExceptionHandling; case Type::anyref: - return FeatureSet::ReferenceTypes | FeatureSet::Anyref; + return FeatureSet::ReferenceTypes | FeatureSet::GC; default: return FeatureSet::MVP; } diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp index 80c54abed..15fb66926 100644 --- a/src/wasm/wasm-validator.cpp +++ b/src/wasm/wasm-validator.cpp @@ -2478,10 +2478,10 @@ static void validateModule(Module& module, ValidationInfo& info) { } static void validateFeatures(Module& module, ValidationInfo& info) { - if (module.features.hasAnyref()) { + if (module.features.hasGC()) { info.shouldBeTrue(module.features.hasReferenceTypes(), module.features, - "--enable-anyref requires --enable-reference-types"); + "--enable-gc requires --enable-reference-types"); } if (module.features.hasExceptionHandling()) { // implies exnref info.shouldBeTrue( diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp index 5931b56aa..9d43a33b1 100644 --- a/src/wasm/wasm.cpp +++ b/src/wasm/wasm.cpp @@ -45,7 +45,7 @@ const char* SIMD128Feature = "simd128"; const char* TailCallFeature = "tail-call"; const char* ReferenceTypesFeature = "reference-types"; const char* MultivalueFeature = "multivalue"; -const char* AnyrefFeature = "anyref"; +const char* GCFeature = "gc"; } // namespace UserSections } // namespace BinaryConsts |