introduce ir nop to fix loop bugs

This commit is contained in:
alex committed 2025-07-24 22:30:18 -07:00
1 parent 837e0c1b38
commit 69230deefc
11 files changed
+65 -12

No files matched your search

@@ -11,6 +11,14 @@ class ExternalSymbolUsageAnalyzer : FunctionLevelVisitor<Unit>() {
get() = symbols
override fun visitFunctionDefinition(node: FunctionDefinition) {
for (argument in node.arguments) {
visit(argument.typeSpec!!)
}
if (node.returnType != null) {
visit(node.returnType!!)
}
internalSymbols.add(node.arguments.map { it.symbol }.toMutableSet())
node.block?.visit(this)
internalSymbols.removeLast()