[kotlin compiler][update] 1.3.20-dev-1048
This commit is contained in:
+1
-6
@@ -307,12 +307,7 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
|
|||||||
fun <T> getValue(member: LazyMember<T>): T =
|
fun <T> getValue(member: LazyMember<T>): T =
|
||||||
@Suppress("UNCHECKED_CAST") (lazyValues.getOrPut(member, { member.initializer(this) }) as T)
|
@Suppress("UNCHECKED_CAST") (lazyValues.getOrPut(member, { member.initializer(this) }) as T)
|
||||||
|
|
||||||
@Deprecated("Use reflectionTypes0 instead.", ReplaceWith("this.reflectionTypes0"))
|
val reflectionTypes: KonanReflectionTypes by lazy(PUBLICATION) {
|
||||||
override val reflectionTypes: org.jetbrains.kotlin.backend.common.ReflectionTypes
|
|
||||||
get() = throw UnsupportedOperationException("This method will be removed soon")
|
|
||||||
|
|
||||||
// TODO: rename to reflectionTypes after updating the Kotlin compiler
|
|
||||||
val reflectionTypes0: KonanReflectionTypes by lazy(PUBLICATION) {
|
|
||||||
KonanReflectionTypes(moduleDescriptor, KonanFqNames.internalPackageName)
|
KonanReflectionTypes(moduleDescriptor, KonanFqNames.internalPackageName)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+13
@@ -93,6 +93,13 @@ internal class KonanLower(val context: Context, val parentPhaser: PhaseManager)
|
|||||||
phaser.phase(KonanPhase.LOWER_ENUMS) {
|
phaser.phase(KonanPhase.LOWER_ENUMS) {
|
||||||
EnumClassLowering(context).run(irFile)
|
EnumClassLowering(context).run(irFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: this is workaround for issue of unitialized parents in IrDeclaration,
|
||||||
|
* the last one detected in [EnumClassLowering]. The issue appears in [DefaultArgumentStubGenerator].
|
||||||
|
*/
|
||||||
|
irFile.patchDeclarationParents()
|
||||||
|
|
||||||
phaser.phase(KonanPhase.LOWER_INITIALIZERS) {
|
phaser.phase(KonanPhase.LOWER_INITIALIZERS) {
|
||||||
InitializersLowering(context).runOnFilePostfix(irFile)
|
InitializersLowering(context).runOnFilePostfix(irFile)
|
||||||
}
|
}
|
||||||
@@ -105,6 +112,12 @@ internal class KonanLower(val context: Context, val parentPhaser: PhaseManager)
|
|||||||
phaser.phase(KonanPhase.LOWER_CALLABLES) {
|
phaser.phase(KonanPhase.LOWER_CALLABLES) {
|
||||||
CallableReferenceLowering(context).lower(irFile)
|
CallableReferenceLowering(context).lower(irFile)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO: this is workaround for issue of unitialized parents in IrDeclaration,
|
||||||
|
* the last one detected in [CallableReferenceLowering]. The issue appears in [LocalDeclarationsLowering].
|
||||||
|
*/
|
||||||
|
irFile.patchDeclarationParents()
|
||||||
phaser.phase(KonanPhase.LOWER_LOCAL_FUNCTIONS) {
|
phaser.phase(KonanPhase.LOWER_LOCAL_FUNCTIONS) {
|
||||||
LocalDeclarationsLowering(context).runOnFilePostfix(irFile)
|
LocalDeclarationsLowering(context).runOnFilePostfix(irFile)
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-12
@@ -36,7 +36,6 @@ import org.jetbrains.kotlin.ir.util.*
|
|||||||
import org.jetbrains.kotlin.name.ClassId
|
import org.jetbrains.kotlin.name.ClassId
|
||||||
import org.jetbrains.kotlin.name.FqName
|
import org.jetbrains.kotlin.name.FqName
|
||||||
import org.jetbrains.kotlin.name.Name
|
import org.jetbrains.kotlin.name.Name
|
||||||
import org.jetbrains.kotlin.resolve.scopes.MemberScope
|
|
||||||
import org.jetbrains.kotlin.types.KotlinType
|
import org.jetbrains.kotlin.types.KotlinType
|
||||||
import org.jetbrains.kotlin.types.TypeUtils
|
import org.jetbrains.kotlin.types.TypeUtils
|
||||||
import kotlin.properties.Delegates
|
import kotlin.properties.Delegates
|
||||||
@@ -426,23 +425,23 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
|
|||||||
val isInitializedPropertyDescriptor = builtInsPackage("kotlin")
|
val isInitializedPropertyDescriptor = builtInsPackage("kotlin")
|
||||||
.getContributedVariables(Name.identifier("isInitialized"), NoLookupLocation.FROM_BACKEND).single {
|
.getContributedVariables(Name.identifier("isInitialized"), NoLookupLocation.FROM_BACKEND).single {
|
||||||
it.extensionReceiverParameter.let {
|
it.extensionReceiverParameter.let {
|
||||||
it != null && TypeUtils.getClassDescriptor(it.type) == context.reflectionTypes0.kProperty0
|
it != null && TypeUtils.getClassDescriptor(it.type) == context.reflectionTypes.kProperty0
|
||||||
} && !it.isExpect
|
} && !it.isExpect
|
||||||
}
|
}
|
||||||
|
|
||||||
val isInitializedGetterDescriptor = isInitializedPropertyDescriptor.getter!!
|
val isInitializedGetterDescriptor = isInitializedPropertyDescriptor.getter!!
|
||||||
|
|
||||||
val kFunctionImpl = symbolTable.referenceClass(context.reflectionTypes0.kFunctionImpl)
|
val kFunctionImpl = symbolTable.referenceClass(context.reflectionTypes.kFunctionImpl)
|
||||||
|
|
||||||
val kProperty0Impl = symbolTable.referenceClass(context.reflectionTypes0.kProperty0Impl)
|
val kProperty0Impl = symbolTable.referenceClass(context.reflectionTypes.kProperty0Impl)
|
||||||
val kProperty1Impl = symbolTable.referenceClass(context.reflectionTypes0.kProperty1Impl)
|
val kProperty1Impl = symbolTable.referenceClass(context.reflectionTypes.kProperty1Impl)
|
||||||
val kProperty2Impl = symbolTable.referenceClass(context.reflectionTypes0.kProperty2Impl)
|
val kProperty2Impl = symbolTable.referenceClass(context.reflectionTypes.kProperty2Impl)
|
||||||
val kMutableProperty0Impl = symbolTable.referenceClass(context.reflectionTypes0.kMutableProperty0Impl)
|
val kMutableProperty0Impl = symbolTable.referenceClass(context.reflectionTypes.kMutableProperty0Impl)
|
||||||
val kMutableProperty1Impl = symbolTable.referenceClass(context.reflectionTypes0.kMutableProperty1Impl)
|
val kMutableProperty1Impl = symbolTable.referenceClass(context.reflectionTypes.kMutableProperty1Impl)
|
||||||
val kMutableProperty2Impl = symbolTable.referenceClass(context.reflectionTypes0.kMutableProperty2Impl)
|
val kMutableProperty2Impl = symbolTable.referenceClass(context.reflectionTypes.kMutableProperty2Impl)
|
||||||
|
|
||||||
val kLocalDelegatedPropertyImpl = symbolTable.referenceClass(context.reflectionTypes0.kLocalDelegatedPropertyImpl)
|
val kLocalDelegatedPropertyImpl = symbolTable.referenceClass(context.reflectionTypes.kLocalDelegatedPropertyImpl)
|
||||||
val kLocalDelegatedMutablePropertyImpl = symbolTable.referenceClass(context.reflectionTypes0.kLocalDelegatedMutablePropertyImpl)
|
val kLocalDelegatedMutablePropertyImpl = symbolTable.referenceClass(context.reflectionTypes.kLocalDelegatedMutablePropertyImpl)
|
||||||
|
|
||||||
val getClassTypeInfo = internalFunction("getClassTypeInfo")
|
val getClassTypeInfo = internalFunction("getClassTypeInfo")
|
||||||
val getObjectTypeInfo = internalFunction("getObjectTypeInfo")
|
val getObjectTypeInfo = internalFunction("getObjectTypeInfo")
|
||||||
@@ -483,7 +482,7 @@ internal class KonanSymbols(context: Context, val symbolTable: SymbolTable, val
|
|||||||
.map { symbolTable.referenceClass(builtIns.getFunction(it)) }
|
.map { symbolTable.referenceClass(builtIns.getFunction(it)) }
|
||||||
|
|
||||||
val kFunctions = (0 .. KONAN_FUNCTION_INTERFACES_MAX_PARAMETERS)
|
val kFunctions = (0 .. KONAN_FUNCTION_INTERFACES_MAX_PARAMETERS)
|
||||||
.map { symbolTable.referenceClass(context.reflectionTypes0.getKFunction(it)) }
|
.map { symbolTable.referenceClass(context.reflectionTypes.getKFunction(it)) }
|
||||||
|
|
||||||
fun getKFunctionType(returnType: IrType, parameterTypes: List<IrType>): IrType {
|
fun getKFunctionType(returnType: IrType, parameterTypes: List<IrType>): IrType {
|
||||||
val kFunctionClassSymbol = kFunctions[parameterTypes.size]
|
val kFunctionClassSymbol = kFunctions[parameterTypes.size]
|
||||||
|
|||||||
+3
-3
@@ -300,9 +300,9 @@ internal class PropertyDelegationLowering(val context: Context) : FileLoweringPa
|
|||||||
val arguments = type.arguments
|
val arguments = type.arguments
|
||||||
val expectedClassDescriptor = when (arguments.size) {
|
val expectedClassDescriptor = when (arguments.size) {
|
||||||
0 -> return false
|
0 -> return false
|
||||||
1 -> context.reflectionTypes0.kMutableProperty0
|
1 -> context.reflectionTypes.kMutableProperty0
|
||||||
2 -> context.reflectionTypes0.kMutableProperty1
|
2 -> context.reflectionTypes.kMutableProperty1
|
||||||
3 -> context.reflectionTypes0.kMutableProperty2
|
3 -> context.reflectionTypes.kMutableProperty2
|
||||||
else -> throw AssertionError("More than 2 receivers is not allowed")
|
else -> throw AssertionError("More than 2 receivers is not allowed")
|
||||||
}
|
}
|
||||||
return type == expectedClassDescriptor.defaultType.replace(arguments)
|
return type == expectedClassDescriptor.defaultType.replace(arguments)
|
||||||
|
|||||||
@@ -15,6 +15,9 @@ buildscript {
|
|||||||
maven {
|
maven {
|
||||||
url buildKotlinCompilerRepo
|
url buildKotlinCompilerRepo
|
||||||
}
|
}
|
||||||
|
maven {
|
||||||
|
url kotlinCompilerRepo
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|||||||
+3
-3
@@ -19,9 +19,9 @@ buildKotlinVersion=1.3.0-rc-116
|
|||||||
buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_130_CompilerAllPlugins),number:1.3.0-rc-116,tag:kotlin-native,pinned:true/artifacts/content/maven
|
buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_130_CompilerAllPlugins),number:1.3.0-rc-116,tag:kotlin-native,pinned:true/artifacts/content/maven
|
||||||
remoteRoot=konan_tests
|
remoteRoot=konan_tests
|
||||||
testDataVersion=1226829:id
|
testDataVersion=1226829:id
|
||||||
kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_CompilerAllPlugins),number:1.3.20-dev-863,tag:kotlin-native,pinned:true/artifacts/content/maven
|
kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_CompilerAllPlugins),number:1.3.20-dev-1048,tag:kotlin-native,pinned:true/artifacts/content/maven
|
||||||
kotlinVersion=1.3.20-dev-863
|
kotlinVersion=1.3.20-dev-1048
|
||||||
testKotlinVersion=1.3.20-dev-1002
|
testKotlinVersion=1.3.20-dev-1048
|
||||||
konanVersion=1.1.0
|
konanVersion=1.1.0
|
||||||
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
|
||||||
org.gradle.workers.max=4
|
org.gradle.workers.max=4
|
||||||
|
|||||||
Reference in New Issue
Block a user