Commit Graph

14 Commits

Author SHA1 Message Date
Kirill Rakhman bed6cb7154 [FIR] Make FirFile.annotationsContainer nullable
Previously, when no file annotations were present, the FIR element
didn't have a source.
By making it nullable, it will only be created when appropriate and the
source will never be null.

#KT-55835
2023-07-20 07:29:18 +00:00
Dmitrii Gridin e464af00db [LL FIR] do not calculate constructors with classes during types phase
^KT-56551
2023-05-19 12:43:45 +00:00
Dmitrii Gridin 33140b7fcf [FIR] mark empty file annotation container as resolved
To avoid redundant lazy resolve

^KT-56551
2023-05-16 13:25:42 +00:00
Dmitrii Gridin 3394097f47 [LL FIR] run lazy resolve tests by caret
To test production resolveToFirSymbol entry point

^KT-57850
2023-04-21 17:21:36 +00:00
Dmitrii Gridin 72def186a3 [LL FIR] rework transformers, so transformers resolve only a specific set of declarations
The change is needed for the parallel resolution (^KT-55750), so we can resolve the declaration
under a lock that is specific to this declaration.
Previously, if LL FIR was resolving some FirClass, LL FIR  resolved all its children too, and it had no control over what parts of the FIR tree were modified.
The same applied to the designation path, sometimes the classes on the designation path
might be unexpectedly (and without lock) modified.

This commit introduces LLFirResolveTarget, which specifies which exact declarations should be resolved during the lazy resolution of the declaration.
All elements outside the declarations specified for resolve in LLFirResolveTarget, should not be modified.

The logic of lazy transformers is the following:
- Go to target declaration collecting all scopes from the file and containing classes
- Resolve only declarations that are specified by the LLFirResolveTarget, performing the resolve under a separate lock for each declaration

^KT-56543
^KT-57619 Fixed
2023-04-19 20:12:38 +00:00
Dmitrii Gridin 03eab387c0 [FIR] FirRenderer: render annotation resolve phase as well
^KT-56543
2023-04-06 08:09:41 +00:00
Dmitrii Gridin faeafbbe29 [FIR][tree] replace FirDeclaration.resolvePhase -> resolveState
Lazy resolve state represents the lazy resolve
state of the current declaration
It can be either resolved or be in a process of resolve

^KT-56543
2023-04-01 06:53:27 +00:00
Dmitrii Gridin 8c599a84af [FIR][renderer] add phase renderer for file and file annotations container
^KT-56543
2023-03-24 09:58:11 +00:00
Ivan Kochurkin d87619e06e [FIR & IR] Support of default values for arguments in expect functions
Add FirActualDeclarationChecker that checks expect/actual return types

^KT-56331 Fixed, ^KT-56334 Fixed
2023-03-01 22:10:07 +00:00
Ilya Kirillov cd83fec078 [LL FIR] fix lazy resolve of status for the members of the nested class
^KTIJ-23932 fixed
2022-12-13 13:16:32 +00:00
Yan Zhulanow bcf1389ae5 [LL API] Fix enum value lazy analysis (KTIJ-23833)
^KTIJ-23833 Fixed
2022-12-05 11:44:15 +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
Nikolay Lunyak 89f8821d0a [FIR] KT-53371, KT-53519: Fix annotations arguments mapping
See: compiler/testData/asJava/lightClasses/
AnnotatedParameterInInnerClassConstructor.kt

The muted tests don't work with the (KT-53371, KT-53519)-related
changes. During this test happens an attempt to access unresolved
annotations via CustomAnnotationTypeAttribute.
Discussion: KTIJ-23547
2022-11-14 22:40:41 +02:00
Roman Golyshev 16cb3064c8 [FIR] Resolve value class constructor to TYPES before using its params
Right now it is the easiest way to ensure that all the parameters are
resolved. After KT-53573 is fixed, we might use `resolvedReturnTypeRef`
on each parameter individually instead

Also, add `toString` implementation to `ValueClassRepresentation`
classes, so they are properly rendered in testdata

^KTIJ-22630 Fixed
2022-08-30 13:49:40 +00:00