Remove CommonBackendContext.getInternalClass

Move to subclasses: getJvmInternalClass, getJsInternalClass and
getKonanInternalClass (in Kotlin/Native). The advantage of this is that
this API need not be shared between backends any longer, which makes
sense because implementation details differ across platforms
This commit is contained in:
Alexander Udalov
2019-03-12 16:11:47 +01:00
parent 4ab1916ebf
commit bd694105e9
5 changed files with 18 additions and 16 deletions
@@ -21,9 +21,6 @@ interface LoggingContext {
interface CommonBackendContext : BackendContext, LoggingContext {
override val ir: Ir<CommonBackendContext>
//TODO move to builtins
fun getInternalClass(name: String): ClassDescriptor
fun getClass(fqName: FqName): ClassDescriptor
//TODO move to builtins
@@ -64,6 +64,8 @@ abstract class Symbols<out T : CommonBackendContext>(val context: T, private val
abstract val stringBuilder: IrClassSymbol
abstract val defaultConstructorMarker: IrClassSymbol
val iterator = symbolTable.referenceClass(
builtInsPackage("kotlin", "collections").getContributedClassifier(
Name.identifier("Iterator"), NoLookupLocation.FROM_BACKEND
@@ -86,8 +88,6 @@ abstract class Symbols<out T : CommonBackendContext>(val context: T, private val
val progressionClasses = listOf(charProgression, intProgression, longProgression)
val progressionClassesTypes = progressionClasses.map { it.descriptor.defaultType }.toSet()
val defaultConstructorMarker = symbolTable.referenceClass(context.getInternalClass("DefaultConstructorMarker"))
val any = symbolTable.referenceClass(builtIns.any)
val unit = symbolTable.referenceClass(builtIns.unit)