Igor Chevdar
67b65ec56a
[K/N] Reformat
2023-05-11 09:30:18 +00:00
Igor Chevdar
96c142569d
[K/N] Slight devirtualization improvement
...
Make devirtualization not by an actual receiver type but rather
by an actual virtual method implementation (which sometimes can be better)
2023-05-11 09:30:18 +00:00
Vsevolod Tolstopyatov
5b474bc5d3
Stabilize EnumEntries stdlib signature
...
* Also, mention implementation details of EnumEntries to enable safe uses of a 'EnumEntries' as a set
* Fix testdata for opt-in marker in enum entries
^KT-58548 fixed
Merge-request: KT-MR-10037
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com >
2023-05-11 09:18:44 +00:00
Ilmir Usmanov
aec78ab2d8
Minor. Add regression test for KT-42696
...
#KT-42696 Fixed
2023-05-11 11:15:06 +02:00
Mikhail Glukhikh
9011af1008
K2: perform IOT approximation in completion properly #KT-58520 Fixed
2023-05-11 09:12:26 +00:00
Mikhail Glukhikh
8bc72cb2e5
K2: reproduce KT-58520 in FIR2IR (K2 fails with exception)
2023-05-11 09:12:26 +00:00
Ivan Kylchik
d83f6a40fb
[K2] Revert commit Pass FirFile to metadata serialization
...
We will ignore this for now. It is quite painful to bring `FirFile`
in all necessary places.
#KT-57812
2023-05-11 08:22:14 +00:00
Ivan Kylchik
0a5883d867
[IR] Add explicit error in IR type transformer for member access expr
...
We must generate transform method for `IrMemberAccessExpression` by
hand because of specifics of working with `typeArguments`. But we
also must consider the case that in future we can add new fields in
this element. If it happens, we will see error message.
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
961d8a4905
[IR] Rewrite transformer generator to write explicit return type
...
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
d75d182b26
[K2] Slightly reformat code
2023-05-11 08:22:13 +00:00
Ivan Kylchik
951e30b683
[K2] Pass FirFile to metadata serialization
...
This is needed to extract correct const value from `ConstValueProvider`.
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
d26e3871ba
[K2] Support interpretation of values in type annotations
...
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
846ad95c9e
[K2] Return from toConstantValue only if expected type match
...
There was a bug with early return from `toConstantValue`
method when we found any const value in `ConstValueProvider`.
Actually we should return only if expected type match. This error can
occur if annotation and constant inside it are fakes and
have the same offset.
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
01749a910b
[IR] Add new visitor IrTypeVisitorVoid that can traverse IR types
...
#KT-57812
2023-05-11 08:22:13 +00:00
Ivan Kylchik
55cac9caa6
[IR] Separate IrConstTransformer into two distinct classes
...
The first one `IrConstExpressionTransformer` is responsible for
transforming ordinary expressions and the second one
`IrConstAnnotationTransformer` is responsible for annotations.
#KT-57812
2023-05-11 08:22:13 +00:00
Yahor Berdnikau
ccbca7a019
[Gradle] Move pm20 interfaces from plugin/api into plugin codebase
...
^KT-58619 Fixed
2023-05-10 23:27:14 +02:00
Yahor Berdnikau
ac2d00916c
Fix toolchain does not configure project level jvm target convention
...
Now JDK toolchain configures project level compiler options jvm target
convention and does not override convention for task.
For use case when toolchain is configured via task DSL jvm target
convention overrides project level convention.
^KT-57393 Fixed
2023-05-10 20:54:03 +00:00
Dmitrii Gridin
aa5261395e
[LL FIR] allow parallel resolve for non-jumping phases
...
^KT-56550 Fixed
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
7f778eafa5
[LL FIR] add missing declarations transformations for COMPILER_REQUIRED_ANNOTATIONS phase
...
The transformed does nothing previously
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
231c59bd2c
[LL FIR] drop redundant lazy annotations calculation from ANNOTATIONS_ARGUMENTS_MAPPING phase
...
They must be calculated on the previous ARGUMENTS_OF_ANNOTATIONS phase
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
a429367890
[LL FIR] unify annotation transformers
...
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
5ebba92a6e
[LL FIR] FirLazyBodiesCalculator: do not calculate annotations during body calculation
...
All annotations must be calculated on the corresponding phases
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
6b8b5c256d
[LL FIR] FirLazyBodiesCalculator: cleanup naming
...
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
64c2ba1a2a
[LL FIR] calculate lazy annotations only for target declaration
...
To avoid visiting not locked declarations
^KT-56550
^KT-58495 Fixed
^KT-58500 Fixed
^KT-58493 Fixed
^KT-58496 Fixed
^KT-58497 Fixed
^KT-58499 Fixed
^KT-58491 Fixed
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
5c8045f3d0
[LL FIR] add test on nested declarations and annotations
...
To see the effect of subsequent changes
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
990f23a11b
[LL FIR] FirLazyBodiesCalculator: covert non-public api to private functions
...
^KT-56550
2023-05-10 17:17:46 +00:00
Dmitrii Gridin
a7692ba2c5
[LL FIR] do not calculate lazy body recursively by default
...
To avoid visiting not locked declarations
^KT-56550
2023-05-10 17:17:45 +00:00
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