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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user