summaryrefslogtreecommitdiff
path: root/src/wasm
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm')
-rw-r--r--src/wasm/wasm-binary.cpp5
-rw-r--r--src/wasm/wasm-validator.cpp25
-rw-r--r--src/wasm/wasm.cpp1
3 files changed, 8 insertions, 23 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 03ae5ce5a..9540bd8f3 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -1218,8 +1218,6 @@ void WasmBinaryWriter::writeFeaturesSection() {
return BinaryConsts::UserSections::GCFeature;
case FeatureSet::Memory64:
return BinaryConsts::UserSections::Memory64Feature;
- case FeatureSet::TypedFunctionReferences:
- return BinaryConsts::UserSections::TypedFunctionReferencesFeature;
case FeatureSet::RelaxedSIMD:
return BinaryConsts::UserSections::RelaxedSIMDFeature;
case FeatureSet::ExtendedConst:
@@ -3519,9 +3517,6 @@ void WasmBinaryBuilder::readFeatures(size_t payloadLen) {
feature = FeatureSet::GC;
} else if (name == BinaryConsts::UserSections::Memory64Feature) {
feature = FeatureSet::Memory64;
- } else if (name ==
- BinaryConsts::UserSections::TypedFunctionReferencesFeature) {
- feature = FeatureSet::TypedFunctionReferences;
} else if (name == BinaryConsts::UserSections::RelaxedSIMDFeature) {
feature = FeatureSet::RelaxedSIMD;
} else if (name == BinaryConsts::UserSections::ExtendedConstFeature) {
diff --git a/src/wasm/wasm-validator.cpp b/src/wasm/wasm-validator.cpp
index c1a8eea7f..a6356766e 100644
--- a/src/wasm/wasm-validator.cpp
+++ b/src/wasm/wasm-validator.cpp
@@ -2450,9 +2450,8 @@ void FunctionValidator::visitTupleExtract(TupleExtract* curr) {
void FunctionValidator::visitCallRef(CallRef* curr) {
validateReturnCall(curr);
- shouldBeTrue(getModule()->features.hasTypedFunctionReferences(),
- curr,
- "call_ref requires typed-function-references to be enabled");
+ shouldBeTrue(
+ getModule()->features.hasGC(), curr, "call_ref requires gc to be enabled");
if (curr->target->type != Type::unreachable) {
if (shouldBeTrue(curr->target->type.isFunction(),
curr,
@@ -3228,11 +3227,11 @@ static void validateTables(Module& module, ValidationInfo& info) {
"Only function reference types or externref are valid "
"for table type (when GC is disabled)");
}
- if (!module.features.hasTypedFunctionReferences()) {
+ if (!module.features.hasGC()) {
info.shouldBeTrue(table->type == funcref || table->type == externref,
"table",
"Only funcref and externref are valid for table type "
- "(when typed-function references are disabled)");
+ "(when gc is disabled)");
}
}
@@ -3267,18 +3266,10 @@ static void validateTables(Module& module, ValidationInfo& info) {
module.features),
segment->offset,
"table segment offset should be reasonable");
- if (module.features.hasTypedFunctionReferences()) {
- info.shouldBeTrue(
- Type::isSubType(segment->type, table->type),
- "elem",
- "element segment type must be a subtype of the table type");
- } else {
- info.shouldBeEqual(
- segment->type,
- table->type,
- "elem",
- "element segment type must be the same as the table type");
- }
+ info.shouldBeTrue(
+ Type::isSubType(segment->type, table->type),
+ "elem",
+ "element segment type must be a subtype of the table type");
validator.validate(segment->offset);
} else {
info.shouldBeTrue(!segment->offset,
diff --git a/src/wasm/wasm.cpp b/src/wasm/wasm.cpp
index af40896ce..34bcf68c7 100644
--- a/src/wasm/wasm.cpp
+++ b/src/wasm/wasm.cpp
@@ -47,7 +47,6 @@ const char* ReferenceTypesFeature = "reference-types";
const char* MultivalueFeature = "multivalue";
const char* GCFeature = "gc";
const char* Memory64Feature = "memory64";
-const char* TypedFunctionReferencesFeature = "typed-function-references";
const char* RelaxedSIMDFeature = "relaxed-simd";
const char* ExtendedConstFeature = "extended-const";
const char* StringsFeature = "strings";