diff options
author | Thomas Lively <tlively@google.com> | 2023-04-14 17:54:25 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-14 17:54:25 -0700 |
commit | d0621e5820b4ce1b72907f5cdb3c68487ce20c60 (patch) | |
tree | 60832f328708f01ea6eed4cffc2da95cccc58c70 /src | |
parent | 56fe22d30ddd4deac619e41824fc69079dcd7a47 (diff) | |
download | binaryen-d0621e5820b4ce1b72907f5cdb3c68487ce20c60.tar.gz binaryen-d0621e5820b4ce1b72907f5cdb3c68487ce20c60.tar.bz2 binaryen-d0621e5820b4ce1b72907f5cdb3c68487ce20c60.zip |
Remove the --hybrid and --nominal command line options (#5669)
After this change, the only type system usable from the tools will be the
standard isorecursive type system. The nominal type system is still usable via
the API, but it will be removed entirely in a follow-on PR.
Diffstat (limited to 'src')
-rw-r--r-- | src/tools/fuzzing/fuzzing.cpp | 6 | ||||
-rw-r--r-- | src/tools/tool-options.h | 17 | ||||
-rw-r--r-- | src/tools/wasm-fuzz-types.cpp | 19 | ||||
-rw-r--r-- | src/tools/wasm-reduce.cpp | 7 |
4 files changed, 2 insertions, 47 deletions
diff --git a/src/tools/fuzzing/fuzzing.cpp b/src/tools/fuzzing/fuzzing.cpp index 6ce299822..062e66260 100644 --- a/src/tools/fuzzing/fuzzing.cpp +++ b/src/tools/fuzzing/fuzzing.cpp @@ -2260,14 +2260,12 @@ Expression* TranslateToFuzzReader::makeBasicRef(Type type) { assert(wasm.features.hasGC()); // TODO: Construct nontrivial types. For now just create a hard coded // struct. - // Use a local static to avoid creating a fresh nominal types in - // --nominal mode. + // Use a local static to avoid the expense of canonicalizing a new type + // every time. static HeapType trivialStruct = HeapType(Struct()); return builder.makeStructNew(trivialStruct, std::vector<Expression*>{}); } case HeapType::array: { - // Use a local static to avoid creating a fresh nominal types in - // --nominal mode. static HeapType trivialArray = HeapType(Array(Field(Field::PackedType::i8, Immutable))); return builder.makeArrayNewFixed(trivialArray, {}); diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h index 02b825079..4e9d85d00 100644 --- a/src/tools/tool-options.h +++ b/src/tools/tool-options.h @@ -140,23 +140,6 @@ struct ToolOptions : public Options { } passOptions.arguments[key] = value; }) - .add("--nominal", - "", - "Force all GC type definitions to be parsed as nominal.", - ToolOptionsCategory, - Options::Arguments::Zero, - [](Options* o, const std::string& argument) { - setTypeSystem(TypeSystem::Nominal); - }) - .add("--hybrid", - "", - "Force all GC type definitions to be parsed using the isorecursive " - "hybrid type system.", - ToolOptionsCategory, - Options::Arguments::Zero, - [](Options* o, const std::string& argument) { - setTypeSystem(TypeSystem::Isorecursive); - }) .add( "--closed-world", "-cw", diff --git a/src/tools/wasm-fuzz-types.cpp b/src/tools/wasm-fuzz-types.cpp index 44572c85d..ce393d133 100644 --- a/src/tools/wasm-fuzz-types.cpp +++ b/src/tools/wasm-fuzz-types.cpp @@ -559,27 +559,8 @@ int main(int argc, const char* argv[]) { Options::Arguments::Zero, [&](Options*, const std::string& arg) { verbose = true; }); - TypeSystem system = TypeSystem::Isorecursive; - options.add( - "--nominal", - "", - "Use the nominal type system", - WasmFuzzTypesOption, - Options::Arguments::Zero, - [&](Options*, const std::string& arg) { system = TypeSystem::Nominal; }); - options.add("--hybrid", - "", - "Use the isorecursive hybrid type system (default)", - WasmFuzzTypesOption, - Options::Arguments::Zero, - [&](Options*, const std::string& arg) { - system = TypeSystem::Isorecursive; - }); - options.parse(argc, argv); - setTypeSystem(system); - Fuzzer fuzzer{verbose}; if (seed) { // Run just a single workload with the given seed. diff --git a/src/tools/wasm-reduce.cpp b/src/tools/wasm-reduce.cpp index 895b7d8bc..40d9aba6a 100644 --- a/src/tools/wasm-reduce.cpp +++ b/src/tools/wasm-reduce.cpp @@ -1296,13 +1296,6 @@ int main(int argc, const char* argv[]) { if (debugInfo) { extraFlags += " -g "; } - if (getTypeSystem() == TypeSystem::Nominal) { - extraFlags += " --nominal"; - } else if (getTypeSystem() == TypeSystem::Isorecursive) { - extraFlags += " --hybrid"; - } else { - WASM_UNREACHABLE("unexpected type system"); - } if (test.size() == 0) { Fatal() << "test file not provided\n"; |