mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-08-03 13:11:32 +00:00
introduce ir nop to fix loop bugs
This commit is contained in:
@ -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()
|
||||
|
Reference in New Issue
Block a user