Simplify usages of IncrementalPackageFragment and related code

Since its scope is now empty, no descriptor now has a container that is an
instance of IncrementalPackageFragment -> a lot of code is not needed anymore
This commit is contained in:
Alexander Udalov
2016-10-03 18:45:23 +03:00
parent 7c6352a9f2
commit 53b584f48c
16 changed files with 64 additions and 128 deletions
@@ -75,7 +75,7 @@ class KotlinUClass(
override val internalName by lz {
val descriptor = resolveToDescriptor() ?: return@lz null
val typeMapper = KotlinTypeMapper(BindingContext.EMPTY, ClassBuilderMode.LIGHT_CLASSES, NoResolveFileClassesProvider, null,
val typeMapper = KotlinTypeMapper(BindingContext.EMPTY, ClassBuilderMode.LIGHT_CLASSES, NoResolveFileClassesProvider,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false)
typeMapper.mapClass(descriptor).internalName
}
@@ -130,4 +130,4 @@ class KotlinUClass(
val bindingContext = psi.analyze(BodyResolveMode.PARTIAL)
return bindingContext[BindingContext.DECLARATION_TO_DESCRIPTOR, psi] as? ClassDescriptor
}
}
}
@@ -66,7 +66,7 @@ abstract class KotlinAbstractUFunction : KotlinAbstractUElement(), UFunction, Ps
return@lz null
}
val typeMapper = KotlinTypeMapper(BindingContext.EMPTY, ClassBuilderMode.LIGHT_CLASSES, NoResolveFileClassesProvider, null,
val typeMapper = KotlinTypeMapper(BindingContext.EMPTY, ClassBuilderMode.LIGHT_CLASSES, NoResolveFileClassesProvider,
IncompatibleClassTracker.DoNothing, JvmAbi.DEFAULT_MODULE_NAME, false)
typeMapper.mapAsmMethod(descriptor).descriptor
}
@@ -260,4 +260,4 @@ open class KotlinObjectLiteralConstructorUFunction(
get() = parent.visibility
override fun getSuperFunctions(context: UastContext) = emptyList<UFunction>()
}
}