Commit Graph

61 Commits

Author SHA1 Message Date
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
Jinseong Jeon dbf0ba442a (U|S)LC: fix getText for modifier list / accessor 2022-10-19 14:17:36 +02:00
Jinseong Jeon f9e086a6e3 S/LC: avoid building light classes for decompiled built-ins 2022-09-17 16:43:11 +02:00
Dmitry Gridin 7013fa1864 [lc] decompiled: support stub search for top level callable
^KT-53934
2022-09-15 09:27:53 +00:00
Dmitry Gridin 7102be7720 [lc] KotlinAsJavaSupportBase: introduce LightClassCachedValue
to extract common logic with cached values

^KT-50241
2022-09-08 13:47:41 +00:00
Dmitry Gridin 2611be0436 [lc] KotlinAsJavaSupportBase: make ifValid inline
^KT-50241
2022-09-08 13:47:40 +00:00
Dmitry Gridin aa31ca67e2 [lc] KotlinAsJavaSupportBase: make librariesTracker abstract
^KT-50241
2022-09-08 13:47:40 +00:00
Dmitry Gridin e6bb97d490 [lc] KotlinAsJavaSupportBase: suppress visibility warnings
methods can be used from the plugin for tests

^KT-50241
2022-09-08 13:47:40 +00:00
Dmitry Gridin b618855e2c [lc] KotlinAsJavaSupportBase: add more lightweight checks for facades
^KT-50241
2022-09-08 13:47:39 +00:00
Dmitry Gridin ec1b6f4f3e [lc] KotlinAsJavaSupportBase: reduce number of findModule calls
^KT-50241
2022-09-08 13:47:39 +00:00
Dmitry Gridin e58b98bb5c [lc] KotlinAsJavaSupportBase: implement getLightClassForScript
^KT-50241
2022-09-08 13:47:39 +00:00
Dmitry Gridin 46548e5443 [lc] KotlinAsJavaSupportBase: implement getLightClass
add more caching

^KT-50241
2022-09-08 13:47:38 +00:00
Dmitry Gridin 4a6609e491 [lc] LightClassUtil: simplify facade class search
^KT-53543
2022-08-29 11:51:43 +00:00