introduce ir nop to fix loop bugs

This commit is contained in:
Alex Zenla
2025-07-24 22:30:18 -07:00
parent 837e0c1b38
commit 69230deefc
11 changed files with 65 additions and 12 deletions

View File

@ -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()