summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tools/tool-options.h9
-rw-r--r--src/wasm-type.h1
-rw-r--r--src/wasm/wasm-type.cpp3
3 files changed, 13 insertions, 0 deletions
diff --git a/src/tools/tool-options.h b/src/tools/tool-options.h
index f45569648..0ed0f27fb 100644
--- a/src/tools/tool-options.h
+++ b/src/tools/tool-options.h
@@ -135,6 +135,15 @@ struct ToolOptions : public Options {
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 "
+ "hybrid type system.",
+ ToolOptionsCategory,
+ Options::Arguments::Zero,
+ [](Options* o, const std::string& argument) {
+ setTypeSystem(TypeSystem::Isorecursive);
});
}
diff --git a/src/wasm-type.h b/src/wasm-type.h
index a54104cc0..c80e7cd0b 100644
--- a/src/wasm-type.h
+++ b/src/wasm-type.h
@@ -36,6 +36,7 @@ namespace wasm {
enum class TypeSystem {
Equirecursive,
Nominal,
+ Isorecursive,
};
// This should only ever be called before any Types or HeapTypes have been
diff --git a/src/wasm/wasm-type.cpp b/src/wasm/wasm-type.cpp
index a63c66770..738cd6e29 100644
--- a/src/wasm/wasm-type.cpp
+++ b/src/wasm/wasm-type.cpp
@@ -3197,6 +3197,9 @@ std::vector<HeapType> TypeBuilder::build() {
case TypeSystem::Nominal:
canonicalizeNominal(state);
break;
+ case TypeSystem::Isorecursive:
+ Fatal() << "Isorecursive types not yet implemented";
+ break;
}
#if TIME_CANONICALIZATION