Dmitrii Gridin
54aee57fec
[LC] preserve type annotations from wildcard bound
...
^KT-66603
2024-03-19 13:57:23 +00:00
Dmitrii Gridin
0ab105f265
[LC] KotlinAsJavaSupportBase: add checkCanceled
...
The jump from Kt into the Psi world is a good place to check
if we have been canceled
^KTIJ-28688
2024-03-11 21:42:39 +00:00
Alexander Udalov
2f056fe155
JVM: remove StubClassBuilder and its usage
...
After legacy light classes were removed, the only remaining usage was in
KotlinLightClassBuilderFactory where we ran JVM backend in the
LIGHT_CLASSES mode, and that was only used from diagnostic tests to
report JVM backend diagnostics.
We don't actually need to build stubs here, so we can just use ASM's
class writer, which means that StubClassBuilder and all its dependencies
can be removed.
2024-03-11 18:03:49 +00:00
Vladimir Dolzhenko
ca88e6e834
Try to acquire LC lock with a smaller time window with checkCancels
...
#KTIJ-28688
Merge-request: KT-MR-14735
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2024-03-04 16:57:32 +00:00
Vladimir Dolzhenko
ad119a707c
Fix equals/hashCode for LC fake files
...
#KTIJ-28770 Fixed
Merge-request: KT-MR-14341
Merged-by: Vladimir Dolzhenko <Vladimir.Dolzhenko@jetbrains.com >
2024-02-13 15:47:09 +00:00
Alexander.Likhachev
21b438f55d
Replace the trove4j collections usages with the fastutil ones
...
The trove4j library is licensed under LGPL, and that causes some troubles while working with it. The fastutil library provides the same functionality in the context of our needs, and is licensed under the Apache license.
^KTI-1135 In Progress
2024-01-10 11:29:25 +00:00
Dmitrii Gridin
c14c12479c
[SLC] fix multifile-classes in multiplatform case
...
Multifile-class can contain not only files from the same
module, but also files from the common part.
This commit also fixes KotlinByModulesResolutionScopeProvider as
it should provide all transitive dependencies
^KT-64714 Fixed
2024-01-05 15:07:55 +00:00
Jinseong Jeon
92d6aeb7a3
LC: lookup backing field of property in decompiled class/companion
...
^KTIJ-27684
2023-12-19 07:03:30 +00:00
Anna Kozlova
cf57b44a1e
[LC] avoid icon calculation in compiler
...
move calculation to the IDE icon provider
^KT-64282 fixed
2023-12-14 18:24:54 +00:00
Ilya Kirillov
364dcd30c8
[LC] optimize String allocations in org.jetbrains.kotlin.asJava.LightClassUtil.isMangled
...
^KT-63486 fixed
2023-11-17 07:19:14 +00:00
Dmitriy Novozhilov
704e2ef5c5
Suppress K2 specific warnings in the codebase
...
^KT-62472
2023-10-18 07:59:27 +00:00
Nikolay Lunyak
ec9cb8beb6
[FIR] Rename JvmNames -> JvmStandardClassIds
...
This is more consistent with the code of
the common compiler checkers.
It would be nice to refactor the contents
of this object further, but it's out
of scope of the current branch.
^KT-54596
2023-09-19 22:14:09 +00:00
Dmitrii Gridin
7fa7d8ea8d
[SLC] provide light classes only for platforms with jvm target
...
Light classes are not supposed to work on non-jvm platforms due to its
specific
^KT-60318 Fixed
2023-08-28 12:45:29 +00:00
Dmitrii Gridin
e05cb49671
[SLC] invalidate local class members cache on any file changes
...
We should track the containing file modifications to avoid PIEAE by
changes in members
^KTIJ-26661 Fixed
2023-08-16 10:22:13 +00:00
Anna Kozlova
190d49a1e0
[light classes] optimize accessors retrieval
...
Avoid expensive calls to `navigationElement` for methods
that cannot be getters/setters and would be filtered later.
Repeat partly naming generation strategy.
Merge-request: KT-MR-10689
Merged-by: Anna Kozlova <Anna.Kozlova@jetbrains.com >
2023-06-22 14:14:39 +00:00
Jinseong Jeon
b91a23be12
Reintroduce KtLightClassForScript as a common interface between (U|S)LC
...
...so that UAST's conversion to KotlinScriptUClass can work for both LCs
2023-06-21 11:14:15 +02:00
Jinseong Jeon
618d6526a7
Rename KtLightClassForScript to reuse it for common interface between LCs
2023-06-21 11:14:15 +02:00
Pavel Mikhailovskii
7ac5233a32
KT-54804 [SLC] Generate synthetic functions for annotations on properties in light classes
2023-05-12 09:39:37 +00:00
aleksandrina-streltsova
c956b4aeae
[Analysis API FIR] Use stable module name when mangling internal name
...
^KTIJ-25046
2023-04-27 12:36:20 +00:00
Jinseong Jeon
5298abf2d6
AA/LC: introduce an API to find script files
2023-04-25 14:49:03 +02:00
Jinseong Jeon
f9086daf4d
SLC: add support for .kts
...
^KTIJ-21108
^KT-50241
^KT-55626 Fixed
2023-04-25 14:49:03 +02:00
Roman Golyshev
d4cffb8a5a
[213] Switch to 213 platform
...
KTI-1114
2023-04-21 13:19:04 +00:00
Dmitrii Gridin
7d37bb1f78
[LC] FakeFileForLightClass: drop stub access from equals/hashCode
...
^KT-57857 Fixed
2023-04-11 09:19:39 +00:00
Jinseong Jeon
0ac3fae9ab
LC: commonize facade for multi-file class
2023-03-29 18:51:03 +02:00
Pavel Mikhailovskii
a6e1826bbc
Reimplement the fix for KtSuperTypeList.findEntry
2023-03-03 15:38:12 +00:00
Dmitrii Gridin
9129235079
[LC] add missing parent to implementsList and extendsList
...
^KT-56613
2023-03-01 10:43:03 +00:00
Dmitrii Gridin
58dc93da90
[LC] do not store name identifier as property
...
^KT-56613
2023-03-01 10:43:02 +00:00
Dmitrii Gridin
b565df65c4
[SLC] drop redundant properties to reduce memory consumption
...
^KT-56613
2023-03-01 10:42:58 +00:00
Jinseong Jeon
527fc68778
ULC: match value parameter name of enum's valueOf
2023-02-20 14:07:01 +01:00
Dmitrii Gridin
607b8f6b61
Revert "[SLC] Support generics and ignore whitespace in KtSuperTypeList.findEntry"
...
This reverts commit e77f5c7764 .
2023-02-13 17:28:35 +01:00
Dmitrii Gridin
761553ea75
[LC] reduce memory consumption from SLC and DLC
...
The main change is drop `LightClassesLazyCreator`
KtLightClassForDecompiledDeclaration:
* fixed a few captured fields
^KT-56561 Fixed
2023-02-13 16:08:17 +00:00
Dmitrii Gridin
a8e8fc1f11
[LC] add ClassInnerStuffCache
...
^KT-56561
2023-02-13 16:08:16 +00:00
Dmitrii Gridin
f501259cd4
[ULC] KtLightClassBase: do not override myInnersCache
...
^KT-56561
2023-02-13 16:08:16 +00:00
Pavel Mikhailovskii
e77f5c7764
[SLC] Support generics and ignore whitespace in KtSuperTypeList.findEntry
2023-02-13 14:47:45 +00:00
Jinseong Jeon
88b07f5287
SLC: keep annotations on type when converting to PsiType
...
^KT-55815 Fixed
2023-02-09 19:53:45 +01:00
Dmitrii Gridin
f9d5534689
[SLC] SymbolKotlinAsJavaSupport: implement getKotlinInternalClasses
...
^KTIJ-24067
2023-02-01 12:51:31 +00:00
Dmitrii Gridin
cfe8bc682c
[LC] fix compatibility
2023-01-04 14:08:16 +00:00
Vladimir Dolzhenko
4542b3947b
Clean up: rename Jet* to Kt*
2023-01-03 16:36:53 +01:00
Roman Efremov
e5d5cbc7a3
Generate Enum.getEntries method in ultra light classes
...
^KTIJ-23530 Fixed
2022-12-27 14:41:52 +00:00
Dmitrii Gridin
65426f6b40
[LC] KotlinClassInnerStuffCache: drop unused code
...
^KT-55497
2022-12-20 19:52:14 +00:00
Dmitrii Gridin
e39dc9b768
[LC] fix signature of 'Enum.valueOf()'
...
* drop @NotNull annotation from parameter
* add NullPointerException to throws
^KT-55497 Fixed
2022-12-20 19:52:12 +00:00
Dmitrii Gridin
7d0c093da7
[SLC] generate static enum methods from symbols
...
^KT-55496 Fixed
2022-12-20 19:52:11 +00:00
Dmitrii Gridin
34e4645385
[ULC] avoid resolve from KtUltraLightClassModifierList.hasModifierProperty in most cases
...
^KT-55445 Fixed
2022-12-13 18:18:00 +00:00
Dmitrii Gridin
cba70d70a7
[SLC] drop hack with setParent for annotations
...
^KTIJ-23783
2022-12-06 13:40:44 +00:00
Dmitrii Gridin
c0097dd97e
[SLC] merge KtLightIdentifierBase with KtLightIdentifier
...
^KT-54051
2022-11-29 13:33:44 +00:00
Dmitrii Gridin
577bc243d2
[LC] KtLightIdentifierBase: add missing copy
...
^KT-54051
2022-11-29 13:33:38 +00:00
Yan Zhulanow
6fe989b4b4
[LC] Provide proper parent element for private properties (KTIJ-23449)
...
Before, no parent element was returned for an object literal inside a
private property initializer, as only the getter was considered as a
potential parent.
Relevant tests are added on the IDE side (see 'LightClassBehaviorTest').
2022-11-15 16:13:59 +00:00
Yan Zhulanow
ea3f550b58
[FE] Support analyzable files throughout all 'KtPsiFactory' API
...
Before, the only way of getting analyzable elements was to create an
analyzable file by using 'createAnalyzableFile()'. So made all utilities
available in 'KtPsiFactory' useless as they delegate to 'createFile()'
that always set the 'doNotAnalyze' flag.
The new behavior is to pass the 'analysisContext' instead if it is
passed to the 'KtPsiFactory' constructor.
The newly appeared API is going to be used in the Kotlin's UAST
implementation.
2022-11-11 11:28:34 +00:00
Vladimir Dolzhenko
5dc2442872
Safe reporting PSI elements in KEWA
2022-11-03 17:27:11 +00:00
Jinseong Jeon
8d8d0d9922
SLC: add marker interface for collection inheritor
2022-10-27 14:41:24 +02:00