Commit Graph

101619 Commits

Author SHA1 Message Date
Dmitrii Gridin d1f3ba0286 [LL FIR] cleanup LLFirBodyTargetResolver
Avoid redundant withRegularClass call

^KT-56550
2023-05-10 17:17:45 +00:00
Dmitrii Gridin b51a416682 [LL FIR] ignore constructors on implicit body phase
^KT-56551
2023-05-10 17:17:45 +00:00
Bogdan Mukvich 303f7493cc Do not publish SBOM artifact by default
* In case we generate several artifacts like in kotlin-compiler
there are separate jar and zip modules which differ in content
2023-05-10 16:03:01 +00:00
Bogdan Mukvich bbe5418a85 Add SBOM to dist compiler task 2023-05-10 16:03:01 +00:00
Yahor Berdnikau 04b39ba2e1 Don't add explicitApi mode for test sources
^KT-58571 Fixed
2023-05-10 15:41:14 +00:00
Dmitriy Novozhilov 40b8b682f9 [FIR] Don't save DFA implications for unstable local vars
^KT-57502 Fixed
2023-05-10 14:19:25 +00:00
Ivan Kochurkin 31424e38ac [FIR] Consider the isExpect value of the receiver class for intersection overrides
It's critical for signature calculation in FIR2IR because `isExpect` is a part of signature
2023-05-10 14:17:53 +00:00
Artem Kobzar c7853c61b6 [K/JS] Make TS tests generating faster 2023-05-10 13:27:46 +00:00
Igor Chevdar 1ef81c005e [K/N][tests] Fixed a test for KT-55938
Used in the test cache directory should be prepared before the test
2023-05-10 13:12:09 +00:00
Alexander.Likhachev d9927214e1 [Gradle, MPP] Register the kotlin source set convention only for Gradle <= 8.1
#KT-52976 Fixed
2023-05-10 12:21:06 +00:00
Alexander.Likhachev 4ec48cfb82 [Gradle] Add Gradle 8.1+ plugin variant 2023-05-10 12:21:06 +00:00
Alexander.Likhachev 6c5061a19f [Gradle, MPP] Remove the fromPreset convention
#KT-52976 In Progress
2023-05-10 12:21:06 +00:00
Sergej Jaskiewicz 93d1932ccb [IR] Make IrReturnTargetSymbol a sealed interface 2023-05-10 11:51:26 +00:00
Sergej Jaskiewicz 6c211f3a39 [IR] Make IrFunctionSymbol a sealed interface 2023-05-10 11:51:26 +00:00
Sergej Jaskiewicz d0ca89f0a0 [IR] Make IrValueSymbol a sealed interface 2023-05-10 11:51:25 +00:00
Sergej Jaskiewicz 916d965b0b [IR] Make IrPackageFragmentSymbol a sealed interface 2023-05-10 11:51:25 +00:00
Sergej Jaskiewicz 1a371350ea [IR] Make IrClassifierSymbol a sealed interface 2023-05-10 11:51:25 +00:00
Egor Kulikov 6f20ac4f38 [FIR] Enable asserts for not building AST tree in lazy mode
Make interface delegate expressions lazy
2023-05-10 11:49:42 +00:00
Kirill Rakhman b2fa104081 [FIR] Keep all failed resolution candidates and fully resolve them
Previously, when a candidate was found with an applicability that is
better than the current best applicability, all previous candidates were
thrown away. Now we keep them, unless the new applicability is
successful. If no successful candidates are found, we fully resolve all
the unsuccessful ones and select the ones with the least bad
applicability. This improves diagnostics for unresolved calls.

#KT-57844 Fixed
2023-05-10 11:48:58 +00:00
Vladimir Dolzhenko 451daaa7c5 Do not publish non fully initialized descriptors
Leaking of a reference (via publishing to binding trace) of not fully
initialized object could lead to unpredicted and unexpected NPEs
iff some exception (like PCE or InvalidPsiAccess) happens between
the publishing and initialization.

#KT-57514
#KT-56388
#KT-56364

Merge-request: KT-MR-10052
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com>
2023-05-10 11:40:44 +00:00
Anna Kozlova e6b8a09375 [AA] assert that shortener is not called on compiled code
KTIJ-25188


Co-authored-by: Roman Golyshev <anstreth@gmail.com>

Merge-request: KT-MR-10064
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com>
2023-05-10 11:12:05 +00:00
Igor Chevdar f5478bda3d Handle recently added property to K2NativeCompilerArguments 2023-05-10 11:05:06 +00:00
Simon Ogorodnik 4d1ea06c17 FIR. Document current builder inference algorithm 2023-05-10 10:40:04 +00:00
Alexander Udalov 987e8c25dc K2: do not generate line numbers for delegated members
Psi2ir does not generate them, see
https://github.com/JetBrains/kotlin/blob/1.8.20/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt#L319.

Besides influencing debugger and coverage behavior, it also affects how
conflicting JVM signature diagnostics are reported because they
use offsets to determine which element to report the error on. So after
this change, K1 and K2 behavior is the same in that regard as well.

 #KT-58215 Fixed
2023-05-10 10:32:07 +00:00
Dmitrii Gridin b3aa2dd60f [LL FIR] calculate designation path by FirFile where it is possible
This will fix problems with declaration clash.
Otherwise, a designation path to the constructor of the second class
from the snippet
```
class A
class A
```
Will contain the first class instead of the second

Also, this is more performed than trying to find a segment of
a path by providers

^KT-58546 Fixed
2023-05-10 09:59:15 +00:00
Dmitrii Gridin ae88726fae [FIR] treat constructors of local classes as local declarations
The main problem: we are trying to lazily resolve local declaration

^KT-58546
^KT-58490
2023-05-10 09:59:15 +00:00
Troels Bjerre Lund 388634e47d [K/N] custom-alloc: Encode consecutive free blocks ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-662
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-10 09:45:14 +00:00
Dmitriy Novozhilov 7585a406e4 Advance bootstrap to 1.9.20-dev-1095 2023-05-10 09:32:30 +00:00
Kirill Rakhman e7bad26a4c [FIR] Unmute test for #KT-58080 2023-05-10 09:01:21 +00:00
Kirill Rakhman 8dad097841 [Tests] Fix reporting when FirLoadCompiledKotlinTest can be unmuted 2023-05-10 09:01:21 +00:00
Igor Chevdar c129e91bd6 [K/N][gradle] Supported IC for caches 2023-05-10 08:37:32 +00:00
Igor Chevdar 9fcb4ece64 [K/N][tests] Added a bunch of tests on incremental compilation 2023-05-10 08:37:32 +00:00
Igor Chevdar e4f30589a4 [K/N] Incremental compilation of per-file caches 2023-05-10 08:37:32 +00:00
Igor Chevdar 74864ba1d0 [K/N][codegen] Trampoline to call virtual functions to reduce dependencies coupling 2023-05-10 08:37:32 +00:00
Igor Chevdar 281296fc2a [K/N] Rely on file fqName & path instead of unstable index 2023-05-10 08:37:32 +00:00
Igor Chevdar f90db20512 [K/N][caches] Added klib hash computing and storing 2023-05-10 08:37:32 +00:00
Dmitriy Novozhilov 1936658e40 [FIR] Consider stability of receiver for DFA variables
^KT-57425 Fixed
2023-05-10 07:50:31 +00:00
Dmitriy Novozhilov d579798169 [Serialization] Ensure that KT-57770 is fixed
^KT-57770 Fixed
2023-05-10 07:30:29 +00:00
Igor Chevdar a8135c60ce [K/N] Turn on optimistic escape analysis
For new MM (with tracing GC), it is safe to turn it on
2023-05-10 05:51:52 +00:00
Ivan Kochurkin b22e89e91d [Tests] Consider dependent fragments in IR handlers 2023-05-09 20:50:01 +00:00
Ivan Kochurkin 988927154e [Tests] Extract common dependentIrModuleFragments and diagnosticReporter for IrBackendInput 2023-05-09 20:50:01 +00:00
Dmitrii Gridin 2c294cba64 [FIR] SupertypeComputationSession: fix false positive invisible reference for local object
The problem is that FirAnonymousObject was ignored during getResolvedSuperTypeRefsForOutOfSessionDeclaration from SupertypeSupplier

^KT-58583 Fixed
2023-05-09 17:23:45 +00:00
Vladimir Sukharev c6d9821ef0 [K2/N] Rework testStdlibFramework to avoid compiler crash due to KT-58459
^KT-58459

Merge-request: KT-MR-10043
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-09 16:52:04 +00:00
Troels Bjerre Lund 918a247bcc [K/N] custom_alloc: sweep extraobjects outside stw ^KT-55364
Co-authored-by: Troels Lund <troels@google.com>

Merge-request: KOTLIN-MR-677
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-05-09 16:37:58 +00:00
Aleksei.Glushko 57707180c6 [K/N] Cooperative intrusive list (in preparations for parallel mark)
Merge-request: KOTLIN-MR-670
Merged-by: Aleksej Glushko <aleksei.glushko@jetbrains.com>
2023-05-09 15:08:32 +00:00
Kirill Rakhman f0a8d7c86f [FIR] Add TODO for ConeDestructuringDeclarationsOnTopLevel
#KT-58563
2023-05-09 13:36:34 +00:00
Kirill Rakhman 24d7c3761d [FIR, Tests] Don't filter out syntax errors in tests
#KT-58469
2023-05-09 13:36:33 +00:00
Kirill Rakhman 9187bbb710 [FIR] Fix typo 2023-05-09 13:36:33 +00:00
Kirill Rakhman 93ee4d7ce7 [FIR] Refactor DiagnosticKind.Syntax into ConeSyntaxDiagnostic
#KT-58469
2023-05-09 13:36:33 +00:00
Roman Golyshev 7a9021aa6b [AA FIR] KT-58503 Do not use resolvedStatus for visibility yet
It's done to avoid lazy resolve contract violation errors. See KT-58572
2023-05-09 13:20:17 +00:00