Commit Graph

234 Commits

Author SHA1 Message Date
Roman Efremov 25f65aff3a Replace getEntries with hardcoded PsiMethod in LC decompiled declaration
This adds NotNull annotation.

^KTIJ-23530 Fixed
2022-12-27 14:41:53 +00:00
Roman Efremov cbb20ce2b8 Don't generate getEntries method in light classes when feature disabled
^KTIJ-23530 Fixed
2022-12-27 14:41:53 +00: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 c77401d823 [SLC] drop redundant 'final' modifier from synthetic enum members
^KT-55502 Fixed
2022-12-20 19:52:14 +00:00
Dmitrii Gridin bb51d62e0a [SLC] support static properties (e.g. Enum.entries)
^KT-55496
^KTIJ-23530
2022-12-20 19:52:13 +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 c28e9d5253 [LC] add tests for enum classes
^KT-55496
^KTIJ-23530
2022-12-20 19:52:11 +00:00
Dmitrii Gridin f3c7972d20 [SLC] implement java annotations for annotation classes
^KT-55481 Fixed
2022-12-20 19:52:10 +00:00
Dmitrii Gridin 1e1525bae5 [SLC] implement light class for RepeatableContainer
^KT-55470 Fixed
2022-12-20 19:52:10 +00:00
Steven Schäfer 6af616d3c3 FIR: make declarations marked with 'override' implicitly open
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Yan Zhulanow c8e9cfde0b [FE] Read Java static field initializer lazily (KTIJ-23043) 2022-12-08 10:46:43 +00:00
Dmitrii Gridin 7bfa900ce6 [SLC] fix modality for methods and property accessors
^KTIJ-23783
2022-12-06 13:40:46 +00:00
Dmitrii Gridin 35ca45a608 [SLC] fix IDE test 2022-12-02 11:59:29 +01:00
Dmitrii Gridin 37729c0353 [SLC] migrate SymbolLightParameterForReceiver to KtReceiverParameterSymbol
^KT-54051
2022-11-29 13:33:43 +00:00
Dmitrii Gridin a7fae5fd99 [SLC] SymbolLightClassForEnumEntry: improve implementation
^KT-54051
^KT-50241
2022-11-29 13:33:35 +00:00
Jinseong Jeon f2bc25c71d SLC: fix visibility/static modifer of property in companion 2022-11-21 15:55:13 +01:00
Yan Zhulanow e21226d02a [SLC] Ignore callables with invalid or absent names (KTIJ-23584) 2022-11-15 16:13:59 +00:00
Jinseong Jeon 8d8d0d9922 SLC: add marker interface for collection inheritor 2022-10-27 14:41:24 +02:00
Jinseong Jeon fc1eb02590 SLC: implement PsiVariable#computeConstantValue for light field 2022-10-02 13:41:12 +02:00
Ilya Gorbunov e51d25fb60 Fix test data: use also stdlib where stdlib-jdk8 was required
#KT-51907
2022-09-15 15:38:32 +00:00
Dmitriy Novozhilov 06f3c0567b [LC Test] Fix IDE testdata 2022-09-15 17:27:23 +03:00
Dmitriy Novozhilov c5916e1d1f [AA LC] Fix computation of const initializers of fields 2022-09-15 17:27:23 +03:00
Dmitriy Novozhilov 573b292cbc [AA LC] Make top-level functions static final 2022-09-15 17:27:23 +03:00
Dmitriy Novozhilov 7e24ddeb40 [AA LC] Properly compute retention for @java.lang.annotation.Retention 2022-09-15 17:27:22 +03:00
Dmitriy Novozhilov 77546e5e06 [AA LC] Compute nullability annotation for parameter for extension receiver 2022-09-15 17:27:22 +03:00
Dmitriy Novozhilov c67ded2d3b [AA LC] Properly set type mapping mode for bounds of type parameters 2022-09-15 17:27:22 +03:00
Dmitriy Novozhilov e6092e2dff [AA LC] Generate nullability annotations for properties in enums 2022-09-15 17:27:22 +03:00
Dmitriy Novozhilov a88fdd5eb7 [AA LC] Implement default values for methods of annotations 2022-09-15 17:27:21 +03:00
Dmitriy Novozhilov ab2aa3117b [AA LC] Add @java.lang.Override on override functions 2022-09-15 17:27:21 +03:00
Dmitriy Novozhilov 258e3f9225 [AA LC] Fix visibility of fields for const vals 2022-09-15 17:27:20 +03:00
Dmitriy Novozhilov 1ff51356b9 [AA LC] Fix visibility of fields from companion objects
^KTIJ-22541
2022-09-15 17:27:20 +03:00
Dmitriy Novozhilov c34f952126 [Test] Render annotations on enum entries in PSI class renderer 2022-09-15 17:27:20 +03:00
Jinseong Jeon 4859524115 SLC: account for upperbounds when computing nullability of type parameter 2022-09-09 14:38:11 +02:00
Jinseong Jeon 56a5d883c0 AA FIR: handle (aliased)? annotation w/ vararg parameter 2022-08-10 17:34:48 +02:00
Steven Schäfer 7e472301b6 Re-enable "JVM IR: Move direct invoke optimization into a separate pass" 2022-07-29 01:06:44 +02:00
Alexander Udalov b50d2ff20a Revert "JVM IR: Move direct invoke optimization into a separate pass"
This reverts commit f0760e0550.

The reason is that it leads to KT-53202.
2022-07-15 18:29:07 +02:00
Alexander Udalov 3b613b3745 Fix some tests related to direct invoke optimization
- Fix test data of light class tests
  (SymbolLightClassesForLibraryTestGenerated).
- Revert the changes in kt8666.kt because they fail on JS IR, and it
  seems that this test is mostly needed for JS anyway.
- Use 'invoke(' as the pattern in bytecode text tests because plain
  'invoke' is used when these tests are run on JDK 11, where indy string
  concatenation is enabled by default and therefore we reference
  `java/lang/invoke/StringConcatFactory`.
2022-07-15 02:29:01 +02:00
Jaebaek Seo ef482bb126 FIR find usage: correctly set extendsList of FirLightInterfaceClassSymbol
The existing code does not set the list of bases that
FirLightInterfaceClassSymbol extends for "extendsList". It collects only
the set of interfaces for "extendsList" of FirLightInterfaceClassSymbol.
However, interfaces can "extend" other classes and/or interfaces, but
they cannot "implement" other interfaces. Therefore, we have to includes
all interfaces and classes that the child interface extends in
the "extendsList". Additionally, this commit adds `private fun
PsiClass.hasSuper(..): Boolean` to FirLightClassBase that returns
whether one of recursive super classes of the PsiClass is `baseClass`
or not. This commit lets `isInheritor()` method use
`PsiClass.hasSuper()`.
2022-07-08 10:36:55 +02:00
Dmitry Gridin dd824aacb6 Revert "Revert "[light classes] drop old light classes and backend: iteration #2""
This reverts commit 43b4df74bc.
2022-06-28 17:57:30 +02:00
Dmitry Gridin 43b4df74bc Revert "[light classes] drop old light classes and backend: iteration #2"
This reverts commit 97ce502cbe.
2022-06-28 13:52:10 +02: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 f42528e354 [light classes] support DefaultImpls in ulc
^KT-48773
2022-06-14 17:18:09 +00:00
Pavel Mikhailovskii ecb3cc193c KT-51883 Don't use "-" in generated unique lifted declaration names 2022-06-10 18:36:04 +00:00
Jinseong Jeon e446c988ee FIR LC: populate default retention policy of annotations 2022-05-24 20:32:56 +02:00
Jinseong Jeon 63fb00fa21 FIR LC: revisit when to add fields to companion and/or containing class 2022-05-24 20:32:55 +02:00
Jinseong Jeon 89d1a6bc0f FIR LC: populate fields from companion in interface 2022-05-24 20:32:55 +02:00
Jinseong Jeon 0212e9daae FIR LC: always run with STDLIB (to handle JVM annotations) 2022-05-24 20:32:55 +02:00
Alexander Udalov ef6d30dd51 Remove usages of JVM target 1.6 from compiler tests
#KT-45165
2022-04-19 22:54:40 +02:00
Ilya Kirillov ffdef50424 [symbol lc] actualize testdata for symbol LC tests 2022-04-13 12:53:30 +02:00