Commit Graph

881 Commits

Author SHA1 Message Date
Dmitry Gridin 91fa6af556 Revert "[light classes] drop old light classes and backend: iteration #8"
This reverts commit 0df6ac688a.
2022-06-28 13:52:08 +02:00
Dmitry Gridin 38c623bc3a Revert "[light classes] drop old light classes and backend: iteration #9"
This reverts commit 38378309b1.
2022-06-28 13:52:07 +02:00
Dmitry Gridin 38378309b1 [light classes] drop old light classes and backend: iteration #9
drop KotlinExtraDiagnosticsProvider

^KT-48773
2022-06-28 11:44:44 +00:00
Dmitry Gridin 0df6ac688a [light classes] drop old light classes and backend: iteration #8
reduce usages of KotlinTypeMapper

^KT-48773
2022-06-28 11:44:43 +00:00
Dmitry Gridin 8aeda37d2e [light classes] drop old light classes and backend: iteration #6
move light class builder to cli and drop MemberIndex

^KT-48773
2022-06-28 11:44:42 +00:00
Dmitry Gridin fa77c618bd [light classes] drop old light classes and backend: iteration #5
drop LightClassDataHolder from LightClassGenerationSupport

^KT-48773
2022-06-28 11:44:41 +00:00
Dmitry Gridin 9d1fe58f9d [light classes] drop old light classes and backend: iteration #4
move LightClassDataProvider to cli

^KT-48773
2022-06-28 11:44:41 +00:00
Dmitry Gridin 3c711d42b3 [light classes] drop old light classes and backend: iteration #3
introduce KotlinExtraDiagnosticsProvider

^KT-48773
2022-06-28 11:44:40 +00:00
Dmitry Gridin 97ce502cbe [light classes] drop old light classes and backend: iteration #2
drop javaFileStub and fix tests

^KT-48773
2022-06-28 11:44:39 +00:00
Dmitry Gridin 3cb2df9360 [light classes] drop old light classes and backend: iteration #1
drop clsDelegate and related

^KT-48773
2022-06-28 11:44:38 +00:00
Dmitry Gridin d42c9d833f [light classes] FakeFileForLightClass: advance language level to 1.8
^KT-48773
2022-06-28 11:44:38 +00:00
Jinseong Jeon b18999be82 FIR/LC: filter out scripts for facade creation
^KTIJ-22016 Fixed
2022-06-20 17:38:50 +02:00
Jinseong Jeon cd80bddfcd U/LC: use error(...), not error { }
Otherwise, the message would be: () -> String

Also, add more information to the error message

^KT-47777 Fixed
2022-06-20 17:38:50 +02:00
Dmitry Gridin bfe09de95f [light classes] LightClassBuilder: cleanup code
^KT-48773
2022-06-14 17:18:10 +00:00
Dmitry Gridin 8a75aef8f5 [light classes] add registry key to forbid access to backend
^KT-48773
2022-06-14 17:18:10 +00:00
Dmitry Gridin f42528e354 [light classes] support DefaultImpls in ulc
^KT-48773
2022-06-14 17:18:09 +00:00
Tianyu Geng a7c37286a3 [Analysis API] Move SyntheticPropertyAccessorReferenceDescriptorImpl
Also move some utilities from IDE to kotlin repo
2022-05-27 15:37:35 +02:00
Nicolay Mitropolsky ccb6331e10 LC: better facade detection to fix KTIJ-21223
Merge-request: KT-MR-6130
Merged-by: Nicolay Mitropolsky <nicolay.mitropolsky@jetbrains.com>
2022-04-21 10:52:29 +00:00
Jinseong Jeon 6a9ed82fdc FIR/LC: restructure light identifiers
* introduced KtLightIdentifierBase so that both FIR LC and ULC share
  basic implementations

* detach PsiCompiledElement as per KTIJ-21412,
  while introducing KtLightIdentifierWithOrigin so that
  UastLightIdentifier can still inherit origin computation logic

^KTIJ-21412 In Progress
2022-04-13 13:43:21 +02:00
Jinseong Jeon ef94582059 LC: use lazyPub to initialize identifier of parameter 2022-04-13 13:43:19 +02:00
Jinseong Jeon e72dc7d0c9 ULC: use special name for default setter parameter
to match the name appeared at LVT in compiler-generated JVM bytecode
2022-04-12 22:05:24 +02:00
Ilya Chernikov 2044754628 Backend: remove psi files from generation state
pass them explicitly to all destinations. This is a step in attempt to
abstract dependencies on PSI in the GenerationState and related places.
2022-03-30 08:33:59 +00:00
Yan Zhulanow c334a44e02 Preserve synthetic enum methods in stub-based 'ClsClassImpl'
'ClsClassImpl' instances created by the platform contain synthetic
enum methods (added by 'ClassInnerStuffCache.calcMethods()'). Such
convention is common in IntelliJ (see KT-36095 and
'9a8b345adaded83fe13980a28db5d9f9acc7450d' in the IntelliJ repository).

This commit makes Kotlin's stub-based classes consistent with the
convention. Instead, a filter is added in place of 'ClsClassImpl' usage.

See also the following commits:
- 7c86911f44
- 43468c6d55
2022-03-14 17:53:55 +09:00
Yan Zhulanow fa4dadf9b7 Update KotlinClassInnerStuffCache implementation
'KotlinClassInnerStuffCache' was copy-pasted from the platform's
'ClassInnerStuffCache' several years ago. After J2K and other changes,
it became quite dirty.

Besides cleaning things up, enum synthetic method handling have
significantly improved. Before, such methods were handled only in
'processDeclarationsInEnum', and 'getMethods()' didn't return them.
This led to inconsistent behavior and was reason for providing special
ad-hoc support in '1b6ded600518176b21cc308ed3e032ef8d04cc90'.
2022-03-14 17:53:55 +09:00
Yan Zhulanow 955d0841bd Remove unused modification tracker in KotlinClassInnerStuffCache
'dropCaches()' is not used anywhere both in the compiler and in the IDE.
2022-03-14 17:53:55 +09:00
Yan Zhulanow f237631f05 Revert "FIR/LC: create synthetic members of enum class"
This reverts commit 1b6ded60
2022-03-14 17:53:55 +09:00
Jinseong Jeon 1b6ded6005 FIR/LC: create synthetic members of enum class
^KTIJ-17414 In Progress
^KTIJ-17444 In Progress
2022-02-24 17:51:50 +01:00
Dmitry Gridin 261cac7514 [light classes] avoid resolve in equals
^KTIJ-21209
2022-02-23 11:13:44 +07:00
Dmitry Gridin dc210fa6ef [light classes] KtUltraLightParameterForSetterParameter: simplify equals
^KTIJ-21151
2022-02-18 17:41:05 +07:00
Dmitry Gridin 30b7c4689b [light classes] KtUltraLightParameterForDescriptor: fix descriptor leak
^KTIJ-21151
2022-02-18 17:41:05 +07:00
Dmitry Gridin 47f0a84c7a [light classes] fix equals for parameters
UltraLightClassLoadingTestGenerated.testConstructors
SafeDeleteTestGenerated$KotlinValueParameterWithJava

^KTIJ-21151
2022-02-18 16:29:24 +07:00
Dmitry Gridin 85d949a04a [light classes] simplify hashCode functions
^KTIJ-21151
2022-02-17 10:31:48 +00:00
vmishenev 7820b268fb KT-50111 Add a new analysis flag eagerResolveOfLightClasses 2022-01-11 17:33:47 +03:00
Vyacheslav Gerasimov f7a9065b75 Build: Use intellij maven repo instead of downloaded IDEA
#KTI-82
2021-12-16 21:48:23 +03:00
Jinseong Jeon e36cc87b19 LC: introduce KotlinLightTypeParameterBuilder (w/ origin) 2021-12-15 10:41:50 +03:00
Jinseong Jeon 20408dc176 LC: use callable name as suffix of receiver parameter name 2021-12-14 21:01:50 +03:00
Ilya Kirillov 673459580c Analysis API: introduce annotation value for KClass 2021-12-02 20:09:16 +01:00
Jinseong Jeon 5880d80d26 FIR LC: add support for inline class 2021-11-01 19:17:26 +01:00
Jinseong Jeon 95a3e81098 LC: remove unnecessary referential equality check and semicolon in inline class 2021-11-01 19:17:25 +01:00
Stanislav Erokhin 65abc94411 [ULC] Unify modifiers for RepeatableAnnotationContainer
All the other annotation classes has abstract modifier.
All nested interfaces has static modifiers.

This commit is not so important for compiler, but it is matter for IDE,
because when we load classes in IDE via
KtLightClassForDecompiledDeclaration -- there are Abstract and Static
on the Container class
2021-11-01 10:38:08 +00:00
Jinseong Jeon 71e7cfb036 LC: use JvmAbi.DELEGATED_PROPERTY_NAME_SUFFIX 2021-10-27 17:06:31 +02:00
Ilya Kirillov e95313acbb ULC: do not use synchronized lazy as safe publication lazy is enough for LC 2021-10-01 16:48:35 +02:00
Ilya Kirillov f90fc8a46e ULC: do not break laziness contract when computing declaration qualified name
^KTIJ-19780 fixed
2021-10-01 16:48:35 +02:00
Jinseong Jeon aad02c1259 FIR LC: introduce modifier list for members
to simulate `default` modifier of methods in interface
2021-09-29 22:02:48 +02:00
Victor Petukhov a264cbfe7d Move CallUtil.kt under the resolve.util package 2021-09-27 16:12:01 +03:00
Vyacheslav Gerasimov ab146bd6d4 Build: Fix deprecated Gradle configurations usages
for migration to Gradle 7+ #KTI-559
2021-09-26 18:28:44 +03:00
Jinseong Jeon fe41c4513f LC: weaken condition to lookup nested annotation
FIR LC has a different abstraction, so using the specific class name is
literally too specific to FE 1.0 LC.

We could introduce a common interface for those, but checking
`kotlinOrigin` is good enough, and thus type-checking their common
ancestor is good enough too.
2021-09-23 00:11:25 +02:00
Dmitry Gridin 5d56bd545e [light classes] methods: fix PluginException: Incorrect CachedValue use
^KTIJ-6085 Fixed
2021-09-21 02:42:41 +00:00
Dmitry Gridin 9ceb477523 [light classes] fix cache value creation
Cause: we are implicitly wrapping `jvmDefaultMode` that leads to
incorrect result

^KTIJ-19042 Fixed
^EA-357501 Fixed
2021-09-17 03:49:38 +00:00
Dmitry Gridin 72752473bf [light classes] KtLightClassForSourceDeclaration: update equals and hashCode to fix PluginException
^KTIJ-19042 Fixed
^EA-357501 Fixed
2021-09-13 11:43:22 +00:00