Improve Dfg type system (#6390)

Added a mini type system for Dfg using DfgDataType to replace Dfg's use
of AstNodeDType. This is much more restricted and represents only the
types Dfg can handle in a canonical form. This will be needed when
adding more support for unpacked arrays and maybe unpacked structs one
day.

Also added an internal type checker for DfgGraphs which encodes all the
assumptions the code makes about type relationships in the graph. Run
this in a few places with --debug-check. Fix resulting fallout.
This commit is contained in:
Geza Lore
2025-09-07 20:38:50 +01:00
committed by GitHub
parent f67534069c
commit 6bc48fcdb3
27 changed files with 778 additions and 394 deletions
+3
View File
@@ -366,6 +366,9 @@ class DataflowOptimize final {
// Convert back to Ast
V3DfgPasses::dfgToAst(*dfgp, m_ctx);
}
// Reset interned types so the corresponding Ast types can be garbage collected
DfgDataType::reset();
}
public: