Commit Graph

121 Commits

Author SHA1 Message Date
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
Dmitriy Novozhilov 5769d42248 [FIR] Fix all usages of annotations due to new FirAnnotation hierarchy 2021-09-13 13:53:12 +03:00
Dmitriy Novozhilov 2e7564a21e [FIR] Properly create FirAnnotation and FirAnnotationCall in all places 2021-09-13 13:53:12 +03:00
Dmitriy Novozhilov 4b662a42a1 [FIR] Rename FirAnnotationCall to FirAnnotation 2021-09-13 13:53:09 +03:00
Ivan Kochurkin ee37768808 [FIR] Rename getClassLikeSymbolFqName to getClassLikeSymbolByClassId 2021-09-10 00:49:10 +03:00
Nikolay Lunyak 4f2eb8b955 [FIR] Make toAnnotationLookupTag() return null for generic annotations 2021-09-09 20:18:50 +03:00
Mikhail Glukhikh 9c8b8f053e FIR: handle named argument properly during annotation serialization 2021-09-02 11:12:48 +03:00
Dmitriy Novozhilov f85c137360 [FIR] Don't fail on serialization of annotations which are not lays on classpath 2021-09-01 10:01:37 +03:00
Ivan Kochurkin 8d764fa50e [FIR] Add FirPropertyAccessExpression that inherits FirQualifiedAccessExpression 2021-08-13 20:05:43 +03:00
Tianyu Geng 684ef871ee FIR: unify common special names scattered around the code base 2021-08-06 22:57:17 +03:00
Dmitriy Novozhilov f3116cb64a Fix NON_EXHAUSTIVE_WHEN_STATEMENT warnings in project code 2021-07-20 13:33:46 +03:00
Dmitriy Novozhilov 51fc2e453f [FIR] Unity FirCallableDeclaration and FirCallableMemberDeclaration
After removal of all diamonds in FirDeclaration hierarchy
  FirCallableMemberDeclaration was only one inheritor of
  FirCallableDeclaration, so there is no need to keep them both
2021-07-13 10:31:20 +03:00
Denis.Zharkov 44113f8501 FIR: Get rid of hacks related to previous structure of FirDelegatedScope
^KT-47413 Fixed
2021-07-01 17:49:36 +03:00
Dmitriy Novozhilov 5816d7ae9f [FIR] Rename FirStatusOwner back to FirMemberDeclaration 2021-06-29 21:03:30 +03:00
Dmitriy Novozhilov f400477c70 [FIR] Remove generic parameter from FirDeclaration 2021-06-29 21:03:30 +03:00
Dmitriy Novozhilov eca77324e0 [FIR] Move declaration comparators to separate package 2021-06-29 21:03:29 +03:00
Dmitriy Novozhilov 725be466f0 [FIR] Move declaration utils to separate package 2021-06-29 21:03:29 +03:00
Dmitriy Novozhilov 1324e9223f [FIR] Make FirDeclaration an abstract class 2021-06-29 21:03:28 +03:00
Dmitriy Novozhilov b3e5c6e079 [FIR] Add symbol to all declarations. Get rid of FirSymbolOwner 2021-06-29 21:03:28 +03:00