Commit Graph

9 Commits

Author SHA1 Message Date
Dmitrii Gridin 83d0dbe436 [LL FIR] FileStructure: reanalyze declarations without name as well
^KT-60132 Fixed
^KT-59687
2023-07-05 20:29:01 +02:00
Dmitrii Gridin 9e88da2e66 [LL FIR] FileStructure: add tests for re-analyzable elements without names
^KT-60132
^KT-59687
2023-07-05 20:29:01 +02:00
Dmitrii Gridin e354b2a900 [LL FIR] rewrote in-block modifications logic
Now we will invalidate bodies for FIR declarations
immediately after in-block modifications in these declarations
We assume that such in-block modifications can happen
only under write action,
so it should be safe to make changes for FirFile

^KT-59687 Fixed
^KT-59199 Fixed
^KTIJ-26066 Fixed
2023-07-05 20:29:00 +02:00
Dmitrii Gridin 99e2a14b9c [LL FIR] do not reanalyze non-top level properties with initializer
Treat changes inside non-top level property initializer as OOB
It is OOB because CFG for a class depends on a property initializer,
so we must rebuild CFG for the class

Also, this commit makes the API more understandable

^KT-59687
2023-07-05 20:28:28 +02:00
Dmitrii Gridin 26f8147a8c [LL FIR] FileStructure: process super class calls correctly
^KT-56543
^KT-57793
2023-04-19 20:12:39 +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
Anna Kozlova 15b1e429d7 [compiler] introduce dedicated Fir declaration for dangling modifier lists (KTIJ-23008)
ensure fir annotations are included in FirDanglingModifierList and resolved,
dedicated DanglingTopLevelModifierListStructureElement exists for top
level lists only, class level lists are processed by containing structure
element
2022-12-21 20:58:46 +00:00
Ilya Kirillov 7a0d1ce0d1 LL API: consider enum entries as structure elements 2022-01-21 16:46:30 +01:00
Ilya Kirillov 989f3248e4 FIR IDE: move low level api testdata sources to the analysis directory 2021-09-15 11:32:28 +02:00