Commit Graph

12 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 8ccbbedbd5 [Test] Update debugger testdata because of KT-62521 2023-10-17 12:46:28 +00:00
Yan Zhulanow 715f7d1a35 [LL API] Analyze code fragment in a separate 'FirSession'
Before, `KtCodeFragment`/`FirCodeFragment` was analyzed as a part of
its context `KtModule`. This has the following complications:

- In non-source sessions, diagnostic reporting is globally disabled.
  For code fragments, however, checking the code before passing it to
  the backend is essential.

- Special treatment for call ambiguities in libraries
  (`LLLibraryScopeAwareCallConflictResolverFactory`) becomes complicated
  as the conflict resolver has to be applied to a library module.

- `KtCodeFragment`s usually have a shorter lifetime than their own
  context. Caching may potentially be implemented differently for them.

^KT-61783 Fixed
2023-09-22 12:20:05 +00:00
Yan Zhulanow 11096325c8 [LL API] Fix 'this' capturing inside property accessors
^KTIJ-26726 Fixed
2023-09-12 08:47:28 +00:00
Yan Zhulanow 5559a0754d [LL API] Handle smart casts correctly on 'FirCodeFragment' analysis 2023-09-04 15:47:56 +00:00
Yan Zhulanow 4b80c2197f [Analysis API] Run code fragment compilation tests against libraries 2023-08-30 06:38:44 +00:00
Yan Zhulanow 705a97e9d4 [Analysis API] Fix test data for context receivers
Currently, the test files are only analyzed as source code, and present
errors do not affect code fragment analysis. In the following commits,
however, the test files will be compiled to test code fragment
analysis against library sources.
2023-08-30 06:38:43 +00:00
Alexey Merkulov 3d92d0d05f [LL API] Fix value capturing for multiple receivers
There were problem when 'this' bound symbol was used twice for a call

KT-61144
2023-08-14 15:22:43 +00:00
Alexey Merkulov 35eca56d32 [fir2ir] Fix field-receiver extracting for evaluator
KT-61144
2023-08-14 15:22:43 +00:00
Alexey Merkulov e4ae15b3f0 [FIR] Allow resolve to private members from debugger evaluator
KT-60714
2023-08-10 13:40:52 +00:00
Yan Zhulanow 5a67b0d7dc [LL API] Correct used IR symbols in code fragments
As 'FirCodeFragments' are converted to IR independently of its context,
in some cases duplicate (and not quite correct) symbols for local
classes and functions are created.

Until properly fixed in fir2ir, here we replace such duplicates with
original symbols.
2023-08-08 17:26:39 +00:00
Yan Zhulanow ee7e6b0fce [LL API] Ignore local functions in 'CodeFragmentDeclarationCollector'
In the old JVM backend, local functions were compiled as JVM classes,
so there were an instance to pass around. Today, they are compiled to
static functions in the containing class/facade, and calls to them
compile natively.
2023-08-08 17:26:38 +00:00
Yan Zhulanow e1db3c88cf [LL API] Support code fragment compilation 2023-08-07 16:22:01 +00:00