diff options
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/tool-options.h | 13 | ||||
-rw-r--r-- | src/tools/wasm-fuzz-types.cpp | 14 | ||||
-rw-r--r-- | src/tools/wasm-reduce.cpp | 5 |
3 files changed, 7 insertions, 25 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h index eb5212c84..0522b5538 100644 --- a/src/tools/tool-options.h +++ b/src/tools/tool-options.h @@ -148,15 +148,6 @@ struct ToolOptions : public Options { [](Options* o, const std::string& argument) { setTypeSystem(TypeSystem::Nominal); }) - .add("--structural", - "", - "Force all GC type definitions to be parsed as structural " - "(i.e. equirecursive). This is the default.", - ToolOptionsCategory, - Options::Arguments::Zero, - [](Options* o, const std::string& argument) { - setTypeSystem(TypeSystem::Equirecursive); - }) .add("--hybrid", "", "Force all GC type definitions to be parsed using the isorecursive " @@ -196,9 +187,7 @@ struct ToolOptions : public Options { void applyFeatures(Module& module) const { module.features.enable(enabledFeatures); module.features.disable(disabledFeatures); - // Non-default type systems only make sense with GC enabled. TODO: Error on - // non-GC equirecursive types as well once we make isorecursive the default - // if we don't remove equirecursive types entirely. + // Non-default type systems only make sense with GC enabled. if (!module.features.hasGC() && getTypeSystem() == TypeSystem::Nominal) { Fatal() << "Nominal typing is only allowed when GC is enabled"; } diff --git a/src/tools/wasm-fuzz-types.cpp b/src/tools/wasm-fuzz-types.cpp index bbf4967e3..0e40e7a15 100644 --- a/src/tools/wasm-fuzz-types.cpp +++ b/src/tools/wasm-fuzz-types.cpp @@ -517,25 +517,17 @@ int main(int argc, const char* argv[]) { Options::Arguments::Zero, [&](Options*, const std::string& arg) { verbose = true; }); - TypeSystem system = TypeSystem::Nominal; + TypeSystem system = TypeSystem::Isorecursive; options.add( "--nominal", "", - "Use the nominal type system (default)", + "Use the nominal type system", WasmFuzzTypesOption, Options::Arguments::Zero, [&](Options*, const std::string& arg) { system = TypeSystem::Nominal; }); - options.add("--structural", - "", - "Use the equirecursive type system", - WasmFuzzTypesOption, - Options::Arguments::Zero, - [&](Options*, const std::string& arg) { - system = TypeSystem::Equirecursive; - }); options.add("--hybrid", "", - "Use the isorecursive hybrid type system", + "Use the isorecursive hybrid type system (default)", WasmFuzzTypesOption, Options::Arguments::Zero, [&](Options*, const std::string& arg) { diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index eec1e0874..d92e0a93c 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -1293,9 +1293,10 @@ int main(int argc, const char* argv[]) { } if (getTypeSystem() == TypeSystem::Nominal) { extraFlags += " --nominal"; - } - if (getTypeSystem() == TypeSystem::Isorecursive) { + } else if (getTypeSystem() == TypeSystem::Isorecursive) { extraFlags += " --hybrid"; + } else { + WASM_UNREACHABLE("unexpected type system"); } if (test.size() == 0) { |