JetBrains/kotlin
Glossary
Project-specific terms used throughout the codebase and this wiki.
| Term | Definition |
|---|---|
| K1 / FE 1.0 | The original Kotlin frontend. Source in compiler/frontend/, compiler/frontend.common/, compiler/resolution/. Uses PSI, BindingContext, and core/descriptors. |
| K2 | The new Kotlin compiler frontend, default since Kotlin 2.0. Built around FIR. |
| FIR | Frontend Intermediate Representation. The internal tree representation used by K2. Source in compiler/fir/. Each Fir* element advances through resolution phases (FirResolvePhase). See docs/fir/fir-basics.md. |
| IR | (Backend) Intermediate Representation. The platform-agnostic tree shared by all backends. Defined in compiler/ir/ir.tree/. Lowered and code-generated in the per-target backend.* modules. |
| PSI | Program Structure Interface. The IntelliJ-style AST. Sources in compiler/psi/. Every Kotlin file is first parsed into a KtFile (PSI) before either K1 or the raw FIR builder consumes it. |
| psi2ir | The translator that turns a K1-resolved PSI tree into backend IR. Lives in compiler/ir/ir.psi2ir/. |
| fir2ir | The translator that turns FIR (post-resolve) into backend IR. Lives in compiler/fir/fir2ir/. |
| Lowering | A transformation pass over IR that rewrites high-level constructs into target-friendly forms (e.g., desugaring when for the JVM, inlining suspend functions, generating bridges). Implementations are in backend.common, backend.jvm, backend.js, backend.wasm, and kotlin-native/backend.native. |
| klib | Kotlin Library. Portable, target-agnostic compiled library format containing serialized IR + metadata. Used for multiplatform consumption and as the cross-module exchange format for Kotlin/Native, JS, and Wasm. Spec under docs/klibs/, code under compiler/util-klib* and compiler/ir/serialization.common. |
| klib ABI | The application binary interface of a klib — the surface across which other klibs link. Tooling under compiler/util-klib-abi/ and libraries/tools/abi-validation/. |
| Descriptor | A K1-era model of a declaration (class, function, property). Lives in core/descriptors/. Replaced by FIR symbols in K2 but still used by the legacy frontend and by some tooling. |
| Symbol | The K2/FIR analogue of a descriptor. A FirSymbol (and KaSymbol in the Analysis API) refers to a declaration. |
| CLI | Command-line interface — the kotlinc, kotlinc-jvm, kotlinc-js, kotlinc-native entry points and shared argument parsing. Lives in compiler/cli/. Argument definitions live in compiler/arguments/. |
| Daemon | The Kotlin Compile Daemon — a long-running JVM that hosts the compiler in-process so that successive compiles don't pay JVM warm-up. Lives in compiler/daemon/. |
| KGP | The Kotlin Gradle Plugin. The user-facing Gradle integration in libraries/tools/kotlin-gradle-plugin/, with API in libraries/tools/kotlin-gradle-plugin-api/ and IDE-import surface in libraries/tools/kotlin-gradle-plugin-idea/. |
| JPS | JetBrains Project System. The build system used by IntelliJ IDEA for incremental in-IDE builds. JPS integration lives in jps/ and compiler/incremental-compilation-impl/. |
| KMP | Kotlin Multiplatform. Sharing a single Kotlin codebase across JVM, JS, Native, and Wasm targets. Implemented in KGP and the standard library's common/commonMain source sets. |
| Build Tools API (BTAPI) | A stable, in-process API for invoking the Kotlin compiler from build tools. Lives in compiler/build-tools/kotlin-build-tools-api/. |
| Analysis API | A stable query API over the K2 frontend for IDE tooling. Sources under analysis/analysis-api*/. Public types are prefixed Ka (e.g., KaSession, KaSymbol). |
| Low-level API for FIR | A lower-tier IDE-facing API that drives on-demand FIR resolution. Lives in analysis/low-level-api-fir/. Types are typically prefixed LL. |
| Light classes | Synthetic Java-style class views over Kotlin declarations, used by Java-based tooling (e.g., the Java IDE plugin). Source in compiler/light-classes/ and analysis/symbol-light-classes/. |
| Commonizer | Tool that produces a "common" Kotlin/Native interop library by merging platform-specific klibs. Lives in native/commonizer/. |
| kapt | Kotlin Annotation Processing Tool. Allows running Java annotation processors against Kotlin sources by emitting Java stubs. Plugin in plugins/kapt/. |
| Compose plugin | Compiler plugin that transforms @Composable functions for Jetpack Compose / Compose Multiplatform. Lives in plugins/compose/. |
| Parcelize | Android Parcelable generation plugin. Lives in plugins/parcelize/. |
| Power-assert | Plugin that rewrites assertion calls to produce richer failure diagnoses. Lives in plugins/power-assert/. |
| bootstrap | The pre-existing Kotlin compiler used to compile this repository. Configured in gradle.properties and the dependencies/ directory. |
| YouTrack / KT-XXXXX | JetBrains' issue tracker. Issues are referenced in commit messages as KT-XXXXX. URL: https://youtrack.jetbrains.com/issue/KT-XXXXX. |
| Space CODEOWNERS | The project's CODEOWNERS file uses JetBrains Space syntax (a superset of GitHub CODEOWNERS). Lives at .space/CODEOWNERS. |
| Diagnostic | A compile-time error or warning. K1 diagnostics are in compiler/frontend/.../diagnostics; K2 diagnostics are in compiler/fir/checkers/ (rendered via FirErrors* and FirErrorsDefaultMessages.kt). Generated tables in analysis/analysis-api-fir/gen/.../KaFirDiagnostics*. |
| Bootstrap snapshot / -dev version | A pre-release Kotlin compiler published to https://redirector.kotlinlang.org/maven/bootstrap. |
| TeamCity | JetBrains' CI server hosting Kotlin's official builds: https://teamcity.jetbrains.com/project.html?projectId=Kotlin. |
| Stdlib k1 / k2 expect-actual | Multiplatform stdlib uses expect/actual declarations to share APIs with platform-specific implementations under libraries/stdlib/{common,jvm,js,native-wasm,wasm}. |
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.