Kirill Rakhman
314784f435
[FIR] Introduce FirDeclarationStatus.hasStableParameterNames
...
This flag is true by default but is set to false for
- Java methods and constructors
- interface delegation methods that delegate to Java
The NAMED_ARGUMENTS_NOT_ALLOWED logic is mostly refactored to use the
new flag though some custom logic remains for determining the correct
message and to work around a corner case with fake overrides.
The flag is (de)serialized from/to metadata. For backward compatibility
with K1, delegated methods to Java types are deserialized as stable.
^KT-40480 Fixed
2023-02-13 12:09:39 +00:00
Kirill Rakhman
d204d65174
[FIR] Reformat FirElementSerializer
2023-02-13 12:09:39 +00:00
Dmitriy Novozhilov
1248ee12d6
[FIR] Add ability to provide additional synthetic declarations to metadata from plugins
...
^KT-55885 Fixed
2023-02-08 08:44:49 +00:00
Dmitriy Novozhilov
8350226bad
[FIR] Collect constructors from scope instead of .declarations in metadata serialization
...
This is needed to save in metadata constructors, generated by plugins
with FirDeclarationGenerationExtension
2023-02-08 08:44:49 +00:00
Dmitriy Novozhilov
89c42e20c9
[FIR] Consistently use _function_ instead of _functional_ in names of classes and functions
2023-02-02 08:24:52 +00:00
Dmitriy Novozhilov
67aa80562d
[FE] Completely replace FunctionClassKind with FunctionalTypeKind
...
FunctionalTypeKind can be used in FE 1.0 too, so there is no need to
keep both classes. Also, removal of FunctionClassKind simplifies work
with FunctionalTypeKind in common code, like Analysis Api
2023-02-02 08:24:50 +00:00
Dmitriy Novozhilov
c86495dcae
[FIR] Introduce ConeFunctionalTypeKind as a replacement of FunctionClassKind
...
This is needed to provide an ability to extend different kinds of
functional types
Also, cleanup and rename utilities related to functional types to avoid
possible confusions
2023-02-02 08:24:49 +00:00
Dmitriy Novozhilov
125b773205
[FIR] Introduce utility for creating ConeClassLikeLookupTagImpl from ClassId
...
`classId.toLookupTag()` looks much cleaner than `ConeClassLikeLookupTagImpl(classId)`
2023-02-02 08:24:48 +00:00
Mikhail Glukhikh
9378da6f27
FirElementSerializer: drop no longer necessary code for accessor annotations
2023-01-31 13:16:13 +00:00
Vladimir Sukharev
1990883bdc
[K2/N] KT-55464, KT-56091 Fix various klib annotations, including critical ones
...
Merge-request: KT-MR-8457
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-26 11:15:15 +00:00
Roman Efremov
14b4cdc7c4
Write "hasEnumEntries" flag into metadata when feature enabled
...
^KT-53929 Fixed
2023-01-23 12:53:04 +01:00
Vladimir Sukharev
195ecbac2e
Serialize native klib extensions to pass most ObjCExport and CInterop tests.
...
Merge-request: KT-MR-8398
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-23 11:34:47 +00:00
Ilya Kirillov
1bbcae5ed2
[FIR] fix resolve contract violation from scopes
...
We cannot call lazy resolve to STATUS phase from scopes as scopes may be accessed on a STATUS phase or earlier
^KT-54890
^KTIJ-23587 fixed
2023-01-13 21:32:51 +00:00
Dmitriy Novozhilov
bc93556dbb
[FIR] Allow FirElementSerializer.packagePartProto accept multiple files
...
This is needed for cases when there are multiple files with same name
and `@JvmMultifileClass` annotation
2023-01-12 17:45:05 +00:00
Ivan Kochurkin
978f937fa9
[FIR Serialization] Fix serialization of generated nested classifiers
...
^KT-55759 Fixed
2023-01-11 16:07:02 +01:00
Vladimir Sukharev
924898afb7
[K/N] KFC-446: K2 platform: Native alpha
...
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-01-04 16:10:40 +00:00
Mikhail Glukhikh
0d50f71fb8
K2: expand type aliases in annotation position #KT-55615 Fixed
2023-01-04 10:06:39 +00:00
Ilya Kirillov
90436abb23
[FIR] add FirSession parameter to whileAnalysing
...
It will be needed in the following commits
2023-01-03 10:23:49 +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
Dmitriy Novozhilov
32f6b71525
[FE] Add ability to configure PublicDeclaration type approximation configuration
...
This configuration allows to choose what to do with local and anonymous types
2022-11-22 15:46:18 +00:00
Dmitrii Gridin
86422d0944
[FIR] FirReceiverParameter: rename type to typeRef
...
^KT-54417
2022-11-17 09:50:17 +00:00
Dmitrii Gridin
be7d282974
[FIR] introduce FirReceiverParameter
...
^KT-54417
2022-11-17 09:50:09 +00:00
Nikolay Lunyak
e34dd49872
[FIR] Get rid of the argumentMapping function.
...
It's just a duplicate of `resolvedArgumentMapping`. Plus there is a
member with the same name inside `FirAnnotationCall`.
2022-11-14 22:40:41 +02:00
Ilya Chernikov
fa0cda6236
FIR JS: enable full JS box tests with FIR
2022-11-12 14:34:07 +01:00
Ilya Chernikov
0fbc099d32
FIR JS: Refactor Klib serialization for FIR support
2022-11-12 14:34:07 +01:00
Mikhail Glukhikh
d4fc2248ff
FIR: make class member helper names more consistent
2022-11-11 13:30:32 +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
Dmitriy Novozhilov
be3f8e7eb0
[FIR] Remove redundant opt-ins to ExperimentalStdlibApi in FIR modules
2022-10-19 11:09:33 +00:00
pyos
1fcf099104
FIR: serialize both expanded and abbreviated type to metadata
2022-10-18 14:59:11 +00:00
Mikhail Glukhikh
a82baf87cb
FIR renderer: extract separate ConeTypeRenderer
2022-07-14 09:38:33 +00:00
Mikhail Glukhikh
70e15b281c
K2: fix exception in deserializer for external setter #KT-53031 Fixed
2022-07-13 17:06:14 +00:00
Denis.Zharkov
82b6fdf97e
FIR: Serialize type attributes for non-type-ref types, too
2022-04-06 16:05:41 +00:00
Denis.Zharkov
0ba5c528d0
FIR: Support (de)serialization of context receivers
2022-04-06 16:05:35 +00:00
Denis.Zharkov
550d24f8c6
FIR: Introduce ContextFunctionTypeParams type attribute
2022-04-06 16:05:26 +00:00
Denis.Zharkov
f3e28c3767
FIR: Prepare ConeAttribute infrastructure for non-singleton attrs
2022-04-06 16:05:25 +00:00
Evgeniy.Zhelenskiy
b6f2513dd2
[FIR] Introduce valueClassRepresentation to FIR
...
#KT-1179
2022-03-24 11:38:44 +00:00
Alexander Udalov
b443848ea0
Fix type table serialization in DescriptorSerializer
...
Always serialize type table (and version requirement table) after
everything else, to prevent bugs like KT-51446 where inline class
underlying type was added to the type table after it has already been
serialized.
#KT-51446 Fixed
2022-02-24 16:34:25 +01:00
Dmitriy Novozhilov
0bd3e8f418
[FIR] Rename ConeClassErrorType to ConeErrorType, drop ConeKotlinErrorType alias
2022-02-07 13:36:33 +03:00
Mikhail Glukhikh
11bbd79c4b
FIR: replace ConeKotlinType with more concrete type when possible
2022-02-03 19:12:18 +03:00
Vyacheslav Gerasimov
f7a9065b75
Build: Use intellij maven repo instead of downloaded IDEA
...
#KTI-82
2021-12-16 21:48:23 +03:00
Mads Ager
d89680b30d
[FIR] Serialize annotations for type parameters properly
2021-12-01 18:25:06 +03:00
Mikhail Glukhikh
7ccd1309e6
FirToConstantValueTransformer: extract lazy dispatchReceiverValue
2021-11-30 18:00:02 +03:00
Mads Ager
f220e4a5ed
[FIR] Fix a couple of issues in annotation serialization.
2021-11-30 18:00:00 +03:00
Dmitriy Novozhilov
75b6f7ca00
[FIR] Make FirRegularClass.companionObject companionObjectSymbol field
...
This is needed for two reasons:
1. Before this change companion object appeared in FirRegularClass
twice: in declarations list and in companionObject field. This may
trigger twice transform of it
2. It's very hard to implement generation of companion object by plugins
because if it is part of the tree then generated declaration must be
registered in FirProvider, which is inconsistent with other generated
declarations. Replacing FIR with symbol and removing custom logic of
visiting/transforming companion FIR allows us to just replace companionSymbol
in FirClass if plugin wants to generate it without any additional work
2021-11-23 15:01:05 +03:00
Dmitriy Novozhilov
bee44c6e0f
[FIR] Split :compiler:fir:resolve module into three different modules
...
Those modules are:
- :compiler:fir:providers, which contains Fir and Symbol providers,
scopes, and different utilities used by them
- :compiler:fir:semantics, which contains different abstractions and
entities which are used in resolution and in checkers
- :compiler:fir:resolve, which contains all stuff related to resolution
and inference
There are two pros of this change:
1. It may increase gradle build, because it allows to compile :fir:resolve
and :fir:checkers modules in parallel
2. Logic of working FIR (scopes, providers, DFA logic system, etc) is
now separated from logic of resolution phases, so for example checkers,
which are depend on scopes physically will not be able to run resolve
in any way
2021-10-18 11:10:47 +03:00
Dmitriy Novozhilov
eadb91f9b2
[FIR] Move accessors to main session components close to declarations of those components
2021-10-18 10:55:39 +03:00
Dmitriy Novozhilov
af6d6ec2b9
[FIR] Properly collect constructors from class in presence of plugins
2021-10-12 17:26:41 +03:00
Dmitriy Novozhilov
38877ba842
[FIR] Implement extension for providing additional type attributes
2021-10-12 17:26:32 +03:00
Dmitriy Novozhilov
7a347b11e3
[FIR] Use StandardClassIds instead of StandardNames everywhere it's possible
2021-09-15 17:11:30 +03:00
Alexander Udalov
e857966edb
JVM: remove support for disabling NoConstantValueAttributeForNonConstVals
...
This feature is enabled by default since 1.4, which is the earliest
language version supported by Kotlin at this moment.
2021-09-14 22:29:12 +02:00