[K2] Document KMP implementation in the K2 Compiler

Add comprehensive documentation explaining the implementation and
functions of the Kotlin multiplatform (KMP) support in the K2 Compiler.
This commit is contained in:
Simon Ogorodnik
2023-09-15 17:34:01 +02:00
committed by Space Team
parent 04c0cc5a5c
commit 024e94a479
12 changed files with 661 additions and 0 deletions
@@ -9,6 +9,16 @@ import org.jetbrains.kotlin.name.ClassId
import org.jetbrains.kotlin.name.Name
import org.jetbrains.kotlin.types.model.TypeConstructorMarker
/**
* The main purpose of the lookup tag is to provide a reference to concrete classifier that
* allows obtaining FirClassifierSymbol within a given use-site session.
*
* During the deserialization we use lookup tags to avoid loading the entire class-type hierarchy.
*
* Use-site lookup of classifiers that are referenced by lookup tags allows type refinement that is needed for the expect/actual support.
*
* See `/docs/fir/k2_kmp.md`
*/
abstract class ConeClassifierLookupTag : TypeConstructorMarker {
abstract val name: Name
@@ -17,6 +27,9 @@ abstract class ConeClassifierLookupTag : TypeConstructorMarker {
}
}
/**
* @see ConeClassifierLookupTag
*/
abstract class ConeClassLikeLookupTag : ConeClassifierLookupTag() {
abstract val classId: ClassId