IR: introduce abstract class IrDeclarationBase

The main purpose of this class is to improve performance of IR visitors
and transformers. `IrElementVisitor.visitDeclaration` now takes
IrDeclarationBase as a parameter, and therefore the call to `accept`
there is now a virtual class call, instead of an interface call.
This commit is contained in:
Alexander Udalov
2020-07-22 15:28:27 +02:00
parent 771e7574f4
commit 8db1c3611b
45 changed files with 85 additions and 74 deletions
@@ -181,7 +181,7 @@ abstract class AbstractIrTextTestCase : AbstractIrGeneratorTestCase() {
}
@OptIn(ObsoleteDescriptorBasedAPI::class)
override fun visitDeclaration(declaration: IrDeclaration) {
override fun visitDeclaration(declaration: IrDeclarationBase) {
if (declaration is IrSymbolOwner) {
declaration.symbol.checkBinding("decl", declaration)