Dmitriy Novozhilov
d856ae1f35
[FIR] Move common members in symbols up in the hierarchy
2023-01-31 07:53:11 +00:00
Artem Vasilev
ccc3f52acf
[FIR] Rename FirSyntheticPropertiesStorage, extract property creation
2023-01-30 20:05:51 +00:00
Artem Vasilev
075a80613b
[FIR] Introduce cache for not-yet-enhanced synthetic properties
...
The original synthetic properties from Java were not cached anywhere and
created anew for every session. However, the enhanced properties are
(along with their originals) saved inside the session's cache, causing
inconsistency with newly created symbols via referential equality.
2023-01-30 20:05:50 +00:00
Mikhail Glukhikh
938e1d5ce8
K2: copy explicit receiver to dispatch receiver for static member accesses
...
Related to KT-55116
2023-01-26 15:27:57 +00:00
Kirill Rakhman
f6c189be7b
FIR: Handle visibility of public setter of protected synthetic property like in K1
...
K1 allows writing access to a public setter of a protected synthetic
property only if the call is inside a subclass. K2 previously allowed
that unconditionally. This changes brings the behavior in line with K1.
^KT-56050 Fixed
2023-01-26 11:33:30 +00:00
Ivan Kochurkin
e22359cc10
[FIR] Add MetadataSymbolProvider
...
Extract common code from K1 to MetadataUtil
2023-01-24 15:27:12 +00:00
Denis.Zharkov
9c988fd8d8
K2: Introduce FirCachingCompositeSymbolProvider
...
The main idea is pre-computing the sets of names that might be
met there, that helps to decrease the sizes of the backing maps
(by avoiding irrelevant keys)
Totally, this branch with previous commits speeds up MT Full Kotlin
approximately on 3 seconds (~5%)
2023-01-19 10:57:43 +00:00
Denis.Zharkov
58c1b5dd1f
K2: Optimize AbstractFirDeserializedSymbolProvider
...
Avoid filling caches with keys that are definitely empty
(if it's cheap to compute that), to decrease the size of backing maps.
The strategy is pre-computing the sets of names that might be met.
NB: the size of the sets is way fewer than a size of all queried names.
2023-01-19 10:57:42 +00:00
Dmitriy Novozhilov
8bd3c9d019
[FIR] Don't transform nested classes during class update because of @JvmRecord annotation
...
^KT-55703 Fixed
2023-01-17 14:51:28 +00:00
Dmitrii Gridin
485fad1951
[FIR] FirJavaClass: make annotations and deprecationsProvider lazily enhanced
...
^KT-55387
2023-01-17 12:45:53 +00:00
Nikolay Lunyak
f671a8c8a7
[FIR] Rename FirAnnotation.coneClassLikeType to unexpanded
...
The same reason
2023-01-17 06:26:36 +00:00
Nikolay Lunyak
0c86294ca4
[FIR] Rename FirAnnotation.classId to unexpandedClassId
...
This makes the eye catch each such thing in the source.
OptIn isn't that catchy, plus it may be declared
for the whole file, so noticing may be harder
2023-01-17 06:26:36 +00:00
Mikhail Glukhikh
cbedbda527
Enhance API/messages around BinaryVersion / JvmMetadataVersion
2023-01-16 18:16:07 +01:00
Mikhail Glukhikh
0c4a0360ac
Deserialization/class reading: pass chosen JvmMetadataVersion whenever possible
2023-01-16 18:16:07 +01:00
Mikhail Glukhikh
52ab565cc6
Move LANGUAGE_TO_METADATA_VERSION to compiler:frontend.common.jvm
2023-01-16 18:14:52 +01:00
Mikhail Glukhikh
f20e5daa92
K2: fix property VS field resolve in anonymous class case
...
Related to KT-55017, KT-50082
2023-01-13 13:49:20 +00:00
Dmitriy Novozhilov
42db0b14f0
[FIR] Move all type construction utilities into one file
2023-01-12 17:45:40 +00:00
Mikhail Glukhikh
7904f23660
FE: add & fix test with intersection property shadowed by base field
2023-01-09 21:37:22 +00:00
Mikhail Glukhikh
59bafedd8a
K2 resolve: prefer derived class property to base class field
...
#KT-50082 Fixed
2023-01-09 21:37:21 +00:00
Ilya Kirillov
ae68f08856
[FIR] make FirJavaClass.superTypes to be lazily enhanced
...
This should solve the problem with deadlocks/performance in the K2 IDE
This is a temporary solution until the ^KT-55387 is properly fixed
^KT-55387
^KT-54890
2023-01-06 18:55:43 +00:00
Mikhail Glukhikh
0d50f71fb8
K2: expand type aliases in annotation position #KT-55615 Fixed
2023-01-04 10:06:39 +00:00
Mikhail Glukhikh
f33f87e3d4
K2: drop unused qualifier in FirJavaTypeRef
2022-12-20 11:04:27 +00:00
Mikhail Glukhikh
582b640bec
K2: use MutableOrEmptyList for annotations storage in FIR elements
2022-12-20 11:04:25 +00:00
Ilya Kirillov
68a17242b3
[FIR] fix NPE on missing java annotations qualifier
...
^KTIJ-23075 fixed
2022-12-14 09:58:07 +00:00
Dmitriy Novozhilov
d898e256ca
[FIR] Don't update explicit delegated constructor calls of classes with @JvmRecord
...
^KT-54573 Fixed
2022-12-09 12:02:08 +00:00
Egor Kulikov
dbfe33c00d
[FIR] Make default values for value parameters lazy in RawFirBuilder
...
Sixth step for ^KT-52615
Merge-request: KT-MR-7926
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-12-08 13:32:37 +00:00
Yan Zhulanow
c8e9cfde0b
[FE] Read Java static field initializer lazily (KTIJ-23043)
2022-12-08 10:46:43 +00:00
Egor Kulikov
fb2485f83c
[FIR] Make constructor delegate lazy in RawFirBuilder
...
Fifth step for ^KT-52615
Merge-request: KT-MR-7860
Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com >
2022-12-02 03:12:51 +00:00
Yan Zhulanow
fe69b21aed
[FE] Fix 'containingClassForStaticMemberAttr' for fake overrides (KTIJ-22808)
2022-11-30 04:12:26 +00:00
Dmitrii Gridin
3bc9299b3b
[FIR] SignatureEnhancement: drop redundant 'resolvePhase' for type parameter
...
^KT-54826
2022-11-24 18:32:45 +00:00
Dmitrii Gridin
ec613e57ef
[FIR] add Enhancement wrapping for type parameters
...
^KT-55095 Fixed
2022-11-24 18:32:43 +00:00
Ivan Kochurkin
8883de3f00
[FIR] Don't resolve Enum.declaringClass and Enum.getDeclaringClass
...
^KT-53946 Fixed
2022-11-23 18:29:29 +00:00
Ilya Kirillov
7781ad67d4
[FIR] introduce FirValueParameter.containingFunctionSymbol
...
^KT-55034 fixed
2022-11-22 18:25:30 +01:00
Artem Vasilev
02484baf07
[FIR] Set Java constructor source to Java class's when it's implicit
...
When there are no declared constructors in Java class, make
javaConstructor's source element point to the class declaration,
making it possible to navigate from constructor's invocation there.
^KTIJ-22360 Fixed
2022-11-17 13:18:30 +00:00
Dmitrii Gridin
86422d0944
[FIR] FirReceiverParameter: rename type to typeRef
...
^KT-54417
2022-11-17 09:50:17 +00:00
Dmitrii Gridin
22cfea5058
[FIR] introduce KtFakeSourceElementKind.ReceiverFromType
...
^KT-54417
2022-11-17 09:50:13 +00:00
Dmitrii Gridin
be7d282974
[FIR] introduce FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:09 +00:00
Ilya Kirillov
8dab560d6e
[LL FIR] fix status resolution of static enum members
...
Before, BODY_RESOLVE phase were used for them but status may be unresolved.
This caused CCE on accessing resolved status for such static enum members.
Now, those declarations are created with the status of owning enum as the status is taken from that class.
2022-11-16 19:44:18 +00:00
Ilya Chernikov
8f18ab19f7
FIR: use serialization extension protocol correctly
...
otherwise the deserialization breaks on KLibs
2022-11-12 14:34:08 +01:00
Mikhail Glukhikh
d4fc2248ff
FIR: make class member helper names more consistent
2022-11-11 13:30:32 +00:00
Yan Zhulanow
0a8b9c821c
[FE] Add missing 'ClassId' check in Kotlin class loading (KTIJ-23435)
...
'findKotlinClassOrContent()' does not really distinguish between
outer class names and package path components, so it might return
'foo/bar/Baz.Boo' for 'foo/bar/Baz/Boo'. Possibly because
'findKotlinClassOrContent()' potentially returns a raw byte array,
ClassId checking is supposed to be performed in
'extractClassMetadata()'. For Java, it happens inside
'FirJavaFacade.findClass()', yet for Kotlin the check was absent.
2022-11-11 11:28:37 +00:00
Ilya Kirillov
725ae1fc65
[Analysis API] separate non-class error types from class error types and add information about type qualifiers
...
it's needed for type printing in renderer
2022-11-11 11:59:55 +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
Denis.Zharkov
7b15b28ee2
FIR: Properly support raw types in type parameter upper bounds
...
^KT-49345 Fixed
2022-10-31 14:28:52 +00:00
Denis.Zharkov
73cffa315d
FIR: Do not re-initialize type parameter bounds for Java classes
2022-10-31 14:28:51 +00:00
Denis.Zharkov
e5d2f4712a
Minor. Reformat JavaTypeConversion.kt
2022-10-31 14:28:50 +00:00
Denis.Zharkov
5cc31114cd
FIR: Support special scope for raw types
...
^KT-46369 Fixed
^KT-41794 Fixed
^KT-49351 Fixed
2022-10-31 14:28:50 +00:00
pyos
6c6d653e85
FE: don't lose annotations on Java primitive arrays
...
but only use them to enhance for warnings for now.
^KT-48861 Fixed
2022-10-26 09:33:40 +02:00
Nikolay Lunyak
dd861515ad
[FIR] KT-52157: Fix missing type parameter annotations
2022-10-20 13:08:11 +00:00
Dmitriy Novozhilov
8fbb605034
[FIR] Rename containingClass function to containingClassLookupTag
...
Since this function returns lookup tag instead of FirClass or symbol
the old name may lead to misunderstanding
2022-10-19 11:09:34 +00:00