[IR] Drastically simplify the hierarchy of IR origins
IrStatementOriginImpl and IrDeclarationOriginImpl were made final classes to simplify the creation of them (a delegate provider was added) and to optimize performance when comparing the origins by type and name
This commit is contained in:
committed by
Space Team
parent
f2ddae533e
commit
a3b55cf758
+3
-1
@@ -310,5 +310,7 @@ internal class WasmPropertyReferenceLowering(val context: WasmBackendContext) :
|
||||
return type.classifier == expectedClass
|
||||
}
|
||||
|
||||
private object DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION : IrDeclarationOriginImpl("KPROPERTIES_FOR_DELEGATION")
|
||||
private companion object {
|
||||
private val DECLARATION_ORIGIN_KPROPERTIES_FOR_DELEGATION = IrDeclarationOriginImpl("KPROPERTIES_FOR_DELEGATION")
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ import org.jetbrains.kotlin.ir.util.isElseBranch
|
||||
import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
|
||||
import org.jetbrains.kotlin.name.Name
|
||||
|
||||
private object OPTIMISED_WHEN_SUBJECT : IrDeclarationOriginImpl("OPTIMISED_WHEN_SUBJECT")
|
||||
private val OPTIMISED_WHEN_SUBJECT by IrDeclarationOriginImpl
|
||||
|
||||
class WasmStringSwitchOptimizerLowering(
|
||||
private val context: WasmBackendContext
|
||||
|
||||
Reference in New Issue
Block a user