Georgy Bronnikov
ea57b4cccb
IR: add and unmute tests
2020-08-10 10:16:24 +03:00
Georgy Bronnikov
85ba170217
JVM_IR: use IrBasedDescriptors across codegen
2020-08-10 10:16:23 +03:00
Georgy Bronnikov
0b4c43083d
IR: add IrBasedDescriptors
2020-08-10 10:16:23 +03:00
Georgy Bronnikov
dafcdc527d
IR: propagate original declaration info via attributeOwnerId
...
For IrProperty, IrSimpleFunction we need to pass information about
original declaration to JVM_IR codegen. Instead of descriptors, use
the attributeOwnerId field.
2020-08-10 10:16:23 +03:00
Georgy Bronnikov
04d93dfbce
IR: move containerSource from descriptor to IrFunction, IrProperty
2020-08-10 10:16:23 +03:00
Nick
4669e019d1
[FIR] Add diagnostic CONFLICTING_OVERLOADS & REDECLARATION
2020-08-10 10:09:37 +03:00
kvirolainen
36984009e9
Add samples for flatten, unzip functions
2020-08-10 03:40:13 +03:00
Elijah Verdoorn
41d5615608
Add samples for mapNotNull, find, getOrNull functions
2020-08-10 03:39:49 +03:00
Ilya Kirillov
62df2b3195
FIR IDE: run SUPER_TYPES & BODY_RESOLVE phases under global lock
2020-08-09 12:05:20 +03:00
Ilya Kirillov
7fb408ecd7
FIR IDE: enable new project wizard to FIR IDE
2020-08-09 12:05:13 +03:00
Ilya Kirillov
db7119f04d
FIR IDE: fix ability to create new Kotlin files
2020-08-09 12:05:11 +03:00
Ilya Kirillov
054d196ec5
FIR IDE: temporary ignore failing tests
2020-08-09 12:05:02 +03:00
Ilya Kirillov
683ec2beff
FIR IDE: make KtScopeProvider thread local
2020-08-09 12:04:53 +03:00
Ilya Kirillov
f62204fff1
FIR: move getCallableNames/getClassifierNames from scope to FirContainingNamesAwareScope
2020-08-09 12:04:52 +03:00
Ilya Kirillov
36a161080f
FIR IDE: introduce KtType rendering
2020-08-09 12:04:44 +03:00
Ilya Kirillov
9f33d0147c
FIR IDE: add info about nullability to KtType
2020-08-09 12:04:43 +03:00
Ilya Kirillov
16d22ae7e3
FIR IDE: correctly build FIR for qualified expressions
2020-08-09 12:04:43 +03:00
Ilya Kirillov
66f6fe18d6
FIR IDE: replace javax threadsafe annotations with custom ones
...
javax.annotation.concurrent may not be present for some JDKs
2020-08-09 12:04:35 +03:00
Ilya Kirillov
4595ee2cc0
FIR IDE: create read only copy of symbol builder only for completion
2020-08-09 12:04:34 +03:00
Ilya Kirillov
ccf232eaab
FIR IDE: forbid analysis session to be stored in a variable
2020-08-09 12:04:34 +03:00
Ilya Kirillov
b41a5f9f34
FIR: make TypeRegistry thread safe
2020-08-09 12:04:26 +03:00
Ilya Kirillov
5f424ed1ec
FIR IDE: rewrite low level API
...
- Cache ModuleResolveState for module till the world changes
- Resolve every file under a lock
- All creation of raw fir files and resolve of them happens in FirFileBuilder
- Lazy resolve of fir elements happens in FirElementBuilder
Caching works like the following:
- FirModuleResolveState holds PsiToFirCache & DiagnosticsCollector & FileCacheForModuleProvider
- FileCacheForModuleProvider holds a mapping from ModuleInfo to ModuleFileCache
- ModuleFileCache caches
- KtFile -> FirFile mapping
- ClassId -> FirClassLikeDeclaration, CallableId -> FirCallableSymbol
which used in corresponding FirProvider
- mapping from declaration to it's file
which used in corresponding FirProvider
- locks for fir file resolving
- PsiToFirCache provides mapping from KtElement to FirElement
- DiagnosticsCollector collects diagnostics for file and caches them
2020-08-09 12:04:11 +03:00
Ilya Kirillov
1957be8757
FIR IDE: fix testdata of tests which now pass
2020-08-09 12:04:03 +03:00
Ilya Kirillov
34aa848b15
FIR: do not allow getting PSI text in RawFirBuilder in stub mode
2020-08-09 12:04:03 +03:00
Ilya Kirillov
cfc46b0cc8
FIR IDE: introduce FirIdeAllSourceDependenciesSymbolProvider
...
Co-authored-by: Simon Ogorodnik <simon.ogorodnik@jetbrains.com >
2020-08-09 12:03:56 +03:00
Ilya Kirillov
7d8ef5c7a2
FIR IDE: introduce KtFirConstructorDelegationReference
2020-08-09 12:03:54 +03:00
Ilya Kirillov
0870ded054
FIR IDE: introduce KtFirArrayAccessReference
2020-08-09 12:03:47 +03:00
Ilya Kirillov
22054c8507
FIR IDE: use non-fake override fir elements when finding psi for fir
2020-08-09 12:03:40 +03:00
Ilya Kirillov
d10e3f91fa
FIR IDE: store FirScope strong references only in KtFirAnalysisSession
2020-08-09 12:03:33 +03:00
Ilya Kirillov
7033be588c
FIR IDE: regenerate member scope test
2020-08-09 12:03:27 +03:00
Ilya Kirillov
ea3b2d8310
KT IDE: fix fully-qualified type resolving
2020-08-09 12:03:26 +03:00
Ilya Kirillov
50951fdfc3
KT IDE: use proper package symbol PSI to fix invalidated access exception
2020-08-09 12:03:14 +03:00
Ilya Kirillov
9f9ce6ba61
Fix compilation of KtFirDelegatingScope
2020-08-09 12:03:07 +03:00
Ilya Kirillov
1c195ea2bb
FIR IDE: add kdoc for KtAnalysisSession
2020-08-09 12:03:07 +03:00
Ilya Kirillov
b8caefa0c4
FIR IDE: always recreate analysis session in tests to avoid breaking its contract
2020-08-09 12:03:06 +03:00
Ilya Kirillov
19efd19c6c
FIR IDE: fix AbstractSymbolByFqNameTest after rebase
2020-08-09 12:03:01 +03:00
Ilya Kirillov
94b62e2ac6
FIR IDE: make context-dependent analysis session to use original cache on read-only mode
2020-08-09 12:03:00 +03:00
Ilya Kirillov
c0f5c90231
FIR IDE: separate ValidityOwner to ValidityTokenOwner & ValidityToken
2020-08-09 12:02:49 +03:00
Ilya Kirillov
6a6580dd97
FIR IDE: introduce KtConstructorSymbol.ownerClassId
...
Will be needed for completion
2020-08-09 12:02:48 +03:00
Ilya Kirillov
4653cdf794
FIR IDE: make KtFirDelegatingScope caching a thread safe
2020-08-09 12:02:42 +03:00
Roman Golyshev
ebf20c9706
Add multi-file tests for primitive completion
...
- This is required to test/debug correct completion from imports
2020-08-09 12:02:40 +03:00
Roman Golyshev
1b3a1a662f
Add simple completion of class-like symbols
2020-08-09 12:02:34 +03:00
Roman Golyshev
20c627ea47
Implement collecting class-like names in KtFirStarImportingScope
2020-08-09 12:02:28 +03:00
Roman Golyshev
29ee233bb9
Remove repeating scopes collected by buildCompletionContextForFunction
...
- This is certainly a bug, we would have to fix it later
2020-08-09 12:02:27 +03:00
Roman Golyshev
e3778d62e3
Simplify canBeCalledWith function
2020-08-09 12:02:21 +03:00
Roman Golyshev
b90503decb
Move PackageIndexHelper to KtFirStarImportingScope.kt
2020-08-09 12:02:16 +03:00
Roman Golyshev
d2fbd8e338
Remove KotlinFirCompletionProvider
...
- We should strive to use only high-level API for completion from now on
2020-08-09 12:02:16 +03:00
Ilya Kirillov
dee58e1d86
FIR IDE: handle importing scopes in completion in HL API
...
Co-authored-by: Roman Golyshev <roman.golyshev@jetbrains.com >
2020-08-09 12:02:11 +03:00
Ilya Kirillov
7aa26944d7
FIR IDE: rename utils.kt to psiUtils.kt
...
Co-authored-by: Roman Golyshev <roman.golyshev@jetbrains.com >
2020-08-09 12:02:00 +03:00
Ilya Kirillov
902b42ae1d
FIR IDE: fix typo in completion testdata
...
Co-authored-by: Roman Golyshev <roman.golyshev@jetbrains.com >
2020-08-09 12:01:59 +03:00