Commit Graph

276 Commits

Author SHA1 Message Date
Ilya Chernikov 00a28f9f49 K2 Scripting: compiler extension for script configuration 2022-12-21 14:34:20 +00:00
Ilya Kirillov 7bac119f20 [FIR] add lazy resolution contract checks in resolve 2022-12-12 16:21:06 +00:00
Sergej Jaskiewicz 1539d7ef1a [klib] Bring package names in sync with the directory layout
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.

NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
Nikolay Lunyak 2e9f9f987b [FIR] KT-44698: Print file:line:offset on K2 crash
^KT-44698 Fixed
2022-11-29 22:35:51 +00:00
Egor Kulikov 067036c162 RawFirBuilder refactoring
Second step for KT-52615
Get rid of PsiHandlingMode
Get rid of source in FirLazyBlock
Refactor lazy creation

Merge-request: KT-MR-7753
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
2022-11-22 14:43:53 +00:00
Ilya Chernikov 92ec8e6a3e FIR JS: Convert KLib symbol provider for handling multiple libs 2022-11-12 16:28:25 +01:00
Ilya Chernikov 4e8fed09b4 FIR JS: fix klib matching in fir dependencies
use file paths for more reliable matching, since klib-based libs
do strange things with libraryName
2022-11-12 16:28:24 +01:00
Ilya Chernikov 1f11a2865f FIR: refactor session factory to better support JS scenarios 2022-11-12 16:28:23 +01:00
Ilya Chernikov 8feb2a9505 FIR: component for deserialized class configuration
do not add Serializable JVM interface to non-JVM classes
2022-11-12 16:28:23 +01:00
Ilya Chernikov 8f18ab19f7 FIR: use serialization extension protocol correctly
otherwise the deserialization breaks on KLibs
2022-11-12 14:34:08 +01:00
Ilya Chernikov 302ccf12d0 FIR: deserialize classes lazily from KLib to avoid cycles
the cycle appears e.g. on the Target annotation
2022-11-12 14:34:08 +01:00
Ilya Chernikov fa0cda6236 FIR JS: enable full JS box tests with FIR 2022-11-12 14:34:07 +01:00
Ilya Chernikov 30df65c321 FIR2IR: pass external builtins to module descriptor
to support scenario when builtins are deserialized from KLib
2022-11-12 14:34:07 +01:00
Ilya Chernikov c0cf8e508a FIR JS: prepare session factory for JS/KLib usage 2022-11-12 14:34:07 +01:00
Denis.Zharkov 52eb535a7d FIR: Use platform specific overridability rules for platform members
^KT-54570 Fixed
2022-10-31 14:28:55 +00:00
Nikolay Lunyak dd861515ad [FIR] KT-52157: Fix missing type parameter annotations 2022-10-20 13:08:11 +00:00
Ivan Kochurkin fe670d98a9 [FIR] Rename FirSessionFactory to FirJvmSessionFactory 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 40a01180ff [FIR] Move createSessionWithDependencies and createEmptySession into FirSessionFactoryHelper 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 281c79e21e [FIR] Inline createModuleDataForBuiltins method since it doesn't look useful 2022-10-13 18:11:48 +00:00
Ivan Kochurkin 4d89eddbe8 [FIR] Don't create FirDependenciesSymbolProvider without need 2022-10-13 18:11:47 +00:00
Dmitriy Novozhilov 6623456d2a [FIR] Properly support @JvmRecord
^KT-53867 Fixed
2022-10-03 15:48:17 +03:00
Mikhail Glukhikh 036f9affd8 K2: link via signatures if -Xlink-via-signatures is set
Related to KT-53505
2022-09-14 10:15:22 +00:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Dmitriy Novozhilov bb38690273 [FIR] Introduce FirAssignExpressionAltererExtension
This extension can be used to override resolution of assign statements
  with custom statement
2022-08-19 07:44:09 +00:00
Vsevolod Tolstopyatov 2fcef7af89 [FIR] Fix IrInlineBodiesHandler
Validate that inline function actually is present in at least on of the
modules, not in all of them. That enables support of MODULE directive
in boxInline tests for FIR.

Also, hide a few minor style fixes in this commit
2022-08-12 09:35:26 +00:00
Vsevolod Tolstopyatov 8a181cf2bd [FIR] Create stub language settings for FIR-related test to keep relying on it
#KT-48872
2022-08-12 09:35:23 +00:00
Ilya Kirillov 0748f28efe [FIR] rename ensureResolve -> lazyResolveToPhase as it better describes function semantics 2022-08-10 22:49:18 +02:00
Ivan Kochurkin 502349c594 [FIR] Implement Native test infrastructure, add FirNativeSessionFactory 2022-07-25 23:30:09 +02:00
Ivan Kochurkin 2f56b29b3f [FIR] Extract FirSessionConfigurator and IncrementalCompilationContext to separated classes
With FirSessionFactory and FirJsSessionFactory
2022-07-25 23:30:09 +02:00
Ivan Kochurkin 94527e24e8 [FIR] Commonize code for creating common, JVM and JS session
Extract FirAbstractSessionFactory
2022-07-25 23:30:09 +02:00
Mikhail Glukhikh 9add6f3d55 K2: add more accurate & more automatic control of diagnostic suppression
#KT-51363 Fixed
2022-07-22 11:35:26 +00:00
Mikhail Glukhikh 7bbd8d3b95 FIR2IR entry points: don't create JvmDescriptorMangler if not needed 2022-07-13 13:11:49 +00:00
Mikhail Glukhikh 45eb9238b3 Fir2IrClassifierStorage: don't calculate signature in registerClass 2022-07-06 10:02:09 +00:00
Mikhail Glukhikh 730a5d1a88 FIR: introduce Java vs Kotlin class conflicts checker #KT-44441 Fixed 2022-07-04 13:28:58 +00:00
Dmitriy Novozhilov 22dae9bff4 [FIR] Fix registration of multiple compiler plugins 2022-06-29 11:59:59 +00:00
Dmitriy Novozhilov 8b42638afa [Plugins] Introduce new API for registering compiler plugins
Original `ComponentRegistrar` exposes Project to its registration method,
  so plugins should manually register extensions to it. To prepare for
  possible unbound compiler from Project API in future new  `K2ComponentRegistrar`
  introduced which provides registration method without Project at all
2022-06-29 11:59:58 +00:00
Dmitriy Novozhilov e54c6eeafc [FIR] Introduce extension for custom SAM conversions 2022-06-27 08:11:31 +00:00
Mikhael Bogdanov 41d6f0dca4 Remove ir.tree.impl from build 2022-06-20 11:42:52 +00:00
Dmitriy Novozhilov b948eaef4b [FIR] Add ability to register session components from FIR plugins 2022-06-07 14:12:17 +00:00
Dmitriy Novozhilov 3ee0d13119 [FIR] Add additional DSL methods to FirExtensionRegistrar 2022-06-07 14:12:12 +00:00
Nikolay Lunyak c2cecb2818 [FIR JS] Add the dynamic type unsupported checker 2022-06-02 13:47:33 +00:00
Nikolay Lunyak ac1fb07102 [FIR JS] Add checkers.js 2022-06-02 13:47:28 +00:00
Mikhail Glukhikh eaa77b5af6 [FIR JS] Generate dynamic FIRs via DynamicScope 2022-06-02 13:47:26 +00:00
Nikolay Lunyak 9a9beef25b [FIR JS] Prepare the infrastructure for FIR JS tests 2022-06-02 13:47:24 +00:00
Ivan Kochurkin 1b0af2cb0e [FIR] Make the lowest priority for OptionalAnnotationClassesProvider 2022-05-29 23:41:26 +03:00
Georgy Bronnikov ffe1615e9c Fir: simplify IrBuiltInsOverFir 2022-05-19 12:02:42 +02:00
Georgy Bronnikov 3c3c1be543 Fir2Ir: introduce Fir2IrExtensions
This allows us to remove DeclarationStubGenerator from Fir2IrConverter,
thus reducing dependency on descriptor-based code.
2022-05-19 12:02:41 +02:00
Aleksei.Cherepanov 3d8f140d6b [JPS] Fix incremental build after changing Java enum used in Kotlin when
EnumWhenTracker implemented for tracking changed java enum class items, that used in kotlin when expression.

#KT-47824 Fixed
2022-04-19 18:39:41 +00:00
Ivan Kochurkin 3b8183a736 [FIR] Support of importing optional annotation classes (JS/Native), ^KT-51757 Fixed 2022-04-18 15:36:21 +00:00
Ivan Kochurkin 46dd6520af Fix typo 2022-04-05 15:50:48 +00:00