Commit Graph

717 Commits

Author SHA1 Message Date
Igor Yakovlev b0df70dbfe [ULC] Fix delegate field type resolve
Fixed #KT-46519
2021-05-19 20:49:55 +03:00
Jinseong Jeon 225e3a747c LC: introduce light class interface for facade
so that FIR-based light class for facade can work well in LC utils
2021-05-05 14:11:48 +02:00
Jinseong Jeon efba90c6f1 LC: rename KtLightClassForFacade to ...Impl
before introducing a common interface for light class for facade

This is a mechanical refactoring.
2021-05-05 14:11:48 +02:00
Nikolay Krasko 66683d2952 Unwrap both parts of light element in KtLightElementBase.isEquivalentTo
Even if origins are same, wrapped light elements are not equivalent.

Revealed by running bunch of JavaAgainstKotlinBinariesCheckerTestGenerated
tests.

com.intellij.testFramework.LoggedErrorProcessor$TestLoggerAssertionError: Non-idempotent computation:
it returns different results when invoked multiple times or on different threads:

  KtLightMethodForDecompiledDeclaration of KtLightClassForDecompiledDeclaration of PsiFile:A.class != KtLightMethodForDecompiledDeclaration of KtLightClassForDecompiledDeclaration of PsiFile:A.class
2021-04-29 18:20:38 +03:00
Igor Yakovlev e4870740e1 [LC] Fixed light classes nullability for Kotlin 1.5
Fixed #KT-44472
2021-04-20 15:21:12 +02:00
Igor Yakovlev 63160293fb [LC] Fix invalid nullability for properties
Fixed #KT-46097 and #KT-41671
2021-04-20 15:21:12 +02:00
Matthew Gharrity 5ce746f1ec ULC field has null nameIdentifier
KtUltraLightFieldForSourceDeclaration implements PsiField, for which
getNameIdentifier() is marked @NonNull, so some clients expect a
non-null return value.

#KT-45629 Fixed
2021-04-12 21:41:54 +03:00
Vyacheslav Gerasimov f2a892a972 Cleanup 201 and as41 bunch files 2021-03-30 14:23:43 +03:00
Vladimir Dolzhenko 88058ca2c8 Fix non-default constructors for service and extension class violation 2021-03-25 12:57:07 +01:00
Mikhail Zarechenskiy 111e54c8c1 Do not generate DefaultImpls for light classes if not needed
#KT-41130 In Progress
2021-03-18 16:38:52 +03:00
Igor Yakovlev 023b7fbb8f [ULC] Fix invalid primitive type annotating
Fixed #KT-45417
2021-03-12 10:35:37 +01:00
Igor Yakovlev b744f41c0d [ULC] Fix annotations invalid parents
Fixed #KT-45287
2021-03-05 14:33:10 +01:00
Igor Yakovlev 179cf303da [ULC] Fix annotations with no site for ctor
Fixed #KT-45291
2021-03-05 14:33:10 +01:00
Mikhael Bogdanov 373d0ac660 Fix ultra light class generation for private suspend methods 2021-03-01 16:20:20 +01:00
Igor Yakovlev 5d4606daaa [FIR IDE] Remove LightClassProvider 2021-02-01 21:21:02 +03:00
Alexander Udalov adfa8c788c Light classes: use JVM target from the module
Using "JVM_1_8" always resulted in incorrect mapping of Kotlin
annotation targets to Java element types.

The change in AbstractKotlinRenderLogTest is needed because while
CliTraceHolder.module is technically a descriptor leak, it was never
detected by this test accidentally, because of the depth cutoff equal to
10, which started to not be enough after the minor refactoring of
replacing `Delegates.notNull` with `lateinit`.
2021-02-01 11:54:05 +01:00
Alexander Udalov 64e97225b8 Light classes: map annotation targets depending on JVM target
Since the default JVM target (`JvmTarget.DEFAULT`) is now 1.8, the
changed test started to fail. This change fixes it.
2021-02-01 11:54:04 +01:00
Vladimir Dolzhenko 6331a135c8 Add LightClassUtil.getLightClassMethodsByName to avoid resolving all lightClassMethods and filtration later on 2021-01-18 11:13:16 +00:00
Alexander Udalov b3d85e656e Fix warnings after update to 202 platform
#KT-44069 Fixed
2021-01-13 19:17:22 +01:00
Denis.Zharkov 0e3aaceb16 Fix ultra light structure for @JvmRecord classes 2021-01-11 20:51:40 +03:00
Igor Yakovlev 2fa5ab6e31 [FIR IDE] LC Remove difficult caching from FirLightClassBase 2020-12-16 12:29:54 +03:00
Igor Yakovlev 010a290132 [LC] Fix for light classes equivalence 2020-12-15 01:51:23 +03:00
Igor Yakovlev 45112a3c11 [ULC] Fix invalid positive inheritor for self checking
Fixed #KT-43824
2020-12-14 20:34:42 +03:00
Igor Yakovlev 1ee0892f73 [ULC] Fix NPE on generating data class ctor parameters 2020-12-04 13:07:20 +03:00
Alexander Udalov 7d9eeb6847 Minor, add workaround for KT-42137 2020-11-30 12:44:42 +01:00
Mikhail Glukhikh 1795c4f3e5 Implement common Diagnostic(Factory/Renderer) in related FIR classes 2020-11-26 08:37:46 +03:00
Igor Yakovlev b742a475ff [FIR IDE] Initial FIR LightClass implementation 2020-11-11 21:02:18 +03:00
Vyacheslav Gerasimov 3feff16a77 Cleanup 193 compatibility fixes 2020-11-11 14:28:54 +03:00
Dmitriy Novozhilov 7380abac13 Split AsmUtils to descriptors dependent and independent parts 2020-09-24 16:51:05 +03:00
Dmitriy Novozhilov d215c413cc Move TypeMappingMode to :core:compiler.common.jvm 2020-09-24 16:51:05 +03:00
Igor Yakovlev e08763f3dd [ULC] Add annotations for PsiTypes in UltraLight classes
WIP on KT-41148, KT-41406, KT-41420
2020-09-11 12:49:05 +03:00
Igor Yakovlev b82d8cd4f4 [ULC] Fixed invalid access to lightclass infrastructure from UL 2020-09-11 12:49:05 +03:00
Igor Yakovlev 8fc94ddb8c [UCL] Minor fixes 2020-09-11 12:49:05 +03:00
Igor Yakovlev 97ac86273a [ULC] Add support of const fields to multifile facade 2020-09-11 12:49:05 +03:00
Igor Yakovlev c70383cc70 [ULC] Add compiler flag -Xdisable-ultra-light-classes to fallback to light implementation in CLI 2020-09-11 12:49:04 +03:00
Nicolay Mitropolsky e53db4c771 Uast: fixing WrappedUAnnotation identifiers 2020-09-11 12:49:04 +03:00
Igor Yakovlev 4b8f1bb362 [ULC] Add LanguageVersionSettings to CliLightClassGenerationSupport
+ refactoring
2020-09-11 12:49:04 +03:00
Igor Yakovlev 31b4a021a9 [ULC] Add JvmDeclarationOriginKind.DELEGATION to DeclarationOriginKindForOrigin of delegated methods 2020-09-11 12:49:03 +03:00
Igor Yakovlev b263e1c924 [ULC] Remove nullability annotation for UL backing fields of private props 2020-09-11 12:49:03 +03:00
Igor Yakovlev a36d53e086 [ULC] Skip nullability annotation for backing field of lateinit property 2020-09-11 12:49:03 +03:00
Igor Yakovlev cd32cf7828 [ULC] Add PsiElement overrides for UL elements with source 2020-09-11 12:49:03 +03:00
Igor Yakovlev 131c14626c [ULC] Fix invalid alias search for UL classes 2020-09-11 12:49:03 +03:00
Igor Yakovlev 2c16ae968d [ULC] Add support @receiver annotation site to UL classes 2020-09-11 12:49:02 +03:00
Igor Yakovlev dbb4337ac4 [ULC] Fix invalid annotation resolve for KtUltraLightParameterForSetterParameter 2020-09-11 12:49:02 +03:00
Igor Yakovlev db6aa9140d [ULC] Refactor for lightAnnotations classes 2020-09-11 12:49:02 +03:00
Igor Yakovlev c4cee35cca [ULC] Fixed invalid UL facade annotations
1) Hide annotations for MultiFile class
2) Remove nullability for private fields
2020-09-11 12:49:01 +03:00
Igor Yakovlev 6542ea9ba1 [ULC] Add constant evaluation to light classes service 2020-09-11 12:49:01 +03:00
Igor Yakovlev 55bb8f24e3 [ULC] Move UltraLightSupport to service provided bridge 2020-09-11 12:49:01 +03:00
Igor Yakovlev 7b0eb51f8d [ULC] Add annotation support for UL facades 2020-09-11 12:49:01 +03:00
Igor Yakovlev a5e304f520 [ULC] Better nullability annotations for light classes 2020-09-11 12:49:00 +03:00