diff --git a/compiler/src/prog8/ast/AST.kt b/compiler/src/prog8/ast/AST.kt index 8dee3526e..dab8bd641 100644 --- a/compiler/src/prog8/ast/AST.kt +++ b/compiler/src/prog8/ast/AST.kt @@ -429,7 +429,7 @@ interface INameScope { } fun getLabelOrVariable(name: String): IStatement? { - // this is called A LOT and could perhaps be optimized a bit more, but adding a cache didn't make much of a practical runtime difference + // TODO this is called A LOT and could perhaps be optimized a bit more, but adding a cache didn't make much of a practical runtime difference for (stmt in statements) { if (stmt is VarDecl && stmt.name==name) return stmt if (stmt is Label && stmt.name==name) return stmt @@ -437,8 +437,17 @@ interface INameScope { return null } - fun allDefinedNames(): Set = - statements.filterIsInstance