Commit Graph

214 Commits

Author SHA1 Message Date
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
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 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
Jinseong Jeon 7ff468d9e3 FIR LC: populate only const property on multi-file facade 2022-01-11 21:30:54 +03:00
Jinseong Jeon 62fb8446dc FIR LC: remove unnecessary type parameter shift for inner class
U/LC don't do anything like that, and it rather skips necessary type
paraemters to render.
2022-01-10 12:00:10 +03:00
Jinseong Jeon a153a1fefb FIR LC: create inline methods
unless the functions (or accessors) have reified type parameters
or inline-only annotations
2021-12-30 10:47:32 +03:00
Ilya Kirillov 62c9a7888b Analysis: remove // FIR_COMPARISON form LC testdata as LC tests are moved from IJ 2021-12-27 16:23:21 +03:00
Ilya Kirillov 02f9f116b2 Analysis: ignore failing LC test 2021-12-27 16:23:20 +03:00
Ilya Kirillov db31e0292c Analysis: add LC testdata with current behaviour 2021-12-27 16:23:20 +03:00
Ilya Kirillov 0b3a0fd799 Analysis: fix LC test environment 2021-12-27 16:23:19 +03:00
Ivan Kylchik c7435ba760 Replace all occurrences of WITH_RUNTIME with WITH_STDLIB
We are going to deprecate `WITH_RUNTIME` directive. The main reason
behind this change is that `WITH_STDLIB` directive better describes
its meaning, specifically it will add kotlin stdlib to test's classpath.
2021-11-17 15:26:38 +03:00
Jinseong Jeon 0da9ef873a FIR LC: use optimal type mapping mode for return type 2021-11-08 20:12:17 +01:00
Stanislav Erokhin c9e7c5d156 [LC] Mute Light tests about repeatable annotation
It isn't supported in Light classes, so we should mute it.
Quite similar change was done in 724194dec0
2021-11-01 10:38:09 +00:00
Stanislav Erokhin c591601274 [LC] IDE LightClasses testdata update
Unfortunately, the same testdata is used in IDE, so we should change
testdata in compiler repo and this will affect IDE repo.
This commit is the cherry-pick of commits from IDE repo:
- 4310d730795a53a Fix UltraLightClassLoadingTestGenerated.testEnums():
       check by Java file as ULC produces a different but better result
       Yan Zhulanow 3/17/21, 8:57 AM
- fbe3c8ba0841f2d4 Disable comparison test for
       UltraLightClassSanityTestGenerated.
       testAnnotatedPropertyWithSites() Yan Zhulanow 3/18/21, 1:33 PM
- 8fc53027343b5b53 Ignore known (for ages) broken behaviour
       of LC Vladimir Dolzhenko 3/19/21, 11:17 PM
2021-11-01 10:38:09 +00:00
Stanislav Erokhin f455141ade [ULC] Fix rendering for Foo.class in annotation value
Previously it was Foo::class, but it isn't correct because in java it
is Foo.class

P.s. Array<Foo> cannot be passed as annotation parameter
2021-11-01 10:38:09 +00: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 907d2e9ed4 FIR LC: populate delegates to interface methods 2021-10-27 17:06:31 +02:00
Ilya Kirillov 7045e3ee45 Unmute passing FIR LC test 2021-09-28 14:19:15 +02:00
Jinseong Jeon 150f066254 FIR LC: use property modifiers for backing field if lateinit 2021-09-23 00:11:25 +02:00
Jinseong Jeon c2964f688e FIR LC: don't include annotations w/o use-site targets to property accessors 2021-09-09 16:07:09 +02:00