IR: remove unused code, cleanup
(cherry picked from commit 67cbd04077ea41f3bb13cbef5da0a4ee38495dbf)
This commit is contained in:
committed by
Vasily Levchenko
parent
cbb828d026
commit
d8b56cbe6a
-10
@@ -6,14 +6,12 @@
|
|||||||
package org.jetbrains.kotlin.ir.util
|
package org.jetbrains.kotlin.ir.util
|
||||||
|
|
||||||
import org.jetbrains.kotlin.backend.common.CommonBackendContext
|
import org.jetbrains.kotlin.backend.common.CommonBackendContext
|
||||||
import org.jetbrains.kotlin.backend.common.descriptors.substitute
|
|
||||||
import org.jetbrains.kotlin.backend.konan.KonanBackendContext
|
import org.jetbrains.kotlin.backend.konan.KonanBackendContext
|
||||||
import org.jetbrains.kotlin.backend.konan.KonanCompilationException
|
import org.jetbrains.kotlin.backend.konan.KonanCompilationException
|
||||||
import org.jetbrains.kotlin.backend.konan.descriptors.synthesizedName
|
import org.jetbrains.kotlin.backend.konan.descriptors.synthesizedName
|
||||||
import org.jetbrains.kotlin.backend.konan.ir.buildSimpleAnnotation
|
import org.jetbrains.kotlin.backend.konan.ir.buildSimpleAnnotation
|
||||||
import org.jetbrains.kotlin.builtins.KOTLIN_REFLECT_FQ_NAME
|
import org.jetbrains.kotlin.builtins.KOTLIN_REFLECT_FQ_NAME
|
||||||
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||||
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
|
|
||||||
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
import org.jetbrains.kotlin.descriptors.ParameterDescriptor
|
||||||
import org.jetbrains.kotlin.descriptors.Visibilities
|
import org.jetbrains.kotlin.descriptors.Visibilities
|
||||||
import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
import org.jetbrains.kotlin.descriptors.impl.PackageFragmentDescriptorImpl
|
||||||
@@ -194,14 +192,6 @@ fun IrFunctionAccessExpression.addArguments(args: Map<IrValueParameter, IrExpres
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun FunctionDescriptor.substitute(
|
|
||||||
typeArguments: List<IrType>
|
|
||||||
): FunctionDescriptor = if (typeArguments.isEmpty()) {
|
|
||||||
this
|
|
||||||
} else {
|
|
||||||
this.substitute(*typeArguments.map { it.toKotlinType() }.toTypedArray())
|
|
||||||
}
|
|
||||||
|
|
||||||
fun IrType.substitute(map: Map<IrTypeParameterSymbol, IrType>): IrType {
|
fun IrType.substitute(map: Map<IrTypeParameterSymbol, IrType>): IrType {
|
||||||
if (this !is IrSimpleType) return this
|
if (this !is IrSimpleType) return this
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user