Abduqodiri Qurbonzoda
fd4d4f516f
Fix data class hashcode generation
...
It considers Boolean hashCode equal to 1/0 for true/false,
which is different from actual hashCode of the Boolean type.
2023-06-14 08:19:47 +00:00
Ilmir Usmanov
d7fd2471b8
JVM IR: Remove remains of 1.2 coroutines from tests
...
Remove CoroutineAdapter and LANGUAGE: +ReleaseContinuation,
which are meaninless now.
Update the tests accordingly.
2023-05-31 05:56:18 +00:00
Alexander Udalov
a4121fa8f3
Enable NoSourceCodeInNotNullAssertionExceptions since 1.9
...
#KT-57570 Fixed
2023-05-24 11:29:51 +00:00
Alexander Udalov
e4e1bcefbd
JVM: remove tests on JVM target 1.6
2023-05-19 13:23:59 +00:00
Alexander Udalov
987e8c25dc
K2: do not generate line numbers for delegated members
...
Psi2ir does not generate them, see
https://github.com/JetBrains/kotlin/blob/1.8.20/compiler/ir/ir.psi2ir/src/org/jetbrains/kotlin/psi2ir/generators/ClassGenerator.kt#L319 .
Besides influencing debugger and coverage behavior, it also affects how
conflicting JVM signature diagnostics are reported because they
use offsets to determine which element to report the error on. So after
this change, K1 and K2 behavior is the same in that regard as well.
#KT-58215 Fixed
2023-05-10 10:32:07 +00:00
Alexander Udalov
cd9209a7ee
JVM: enable -Xlambdas=class in some codegen tests
...
Most of these tests check the specific structure of lambdas when they
are generated as classes, and they start to fail once invokedynamic
lambdas are enabled by default.
2023-04-28 21:34:19 +00:00
Alexander Udalov
3120a35a88
JvmDefault: remove most tests on @JvmDefault
...
The tests are removed because JvmDefault is going to be deprecated with
error in KT-54746 and removed later in KT-57696.
Many of the removed tests already had existing counterparts with the new
modes `all` and `all-compatibility`. In this change, I've added such
tests where they were missing, and removed tests which were testing
behavior specific to the JvmDefault annotation, such as some
diagnostics.
#KT-54746
2023-04-25 14:33:00 +00:00
Alexander Udalov
f04d01cf21
JVM IR: fix behavior of Enum.entries for unlowered enums
...
#KT-57671 Fixed
2023-04-24 12:43:43 +00:00
Pavel Mikhailovskii
3bb66e8432
KT-57714 Fix remapping of signatures with reified type parameters
2023-04-19 07:20:51 +00:00
Ilya Gorbunov
b8da3e69ce
KT-55268 Make k.c.Volatile stable
2023-04-08 15:07:56 +00:00
Alexander Udalov
562b27db4e
JVM IR: initialize enum entries without invokedynamic
...
#KT-57316 Fixed
2023-03-24 13:38:32 +00:00
Evgeniy.Zhelenskiy
3b5ad0681f
[IR] Fix compiler bugs with MFVC to let KorGE run
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-13 13:09:56 +00:00
vladislav.grechko
17e6099b53
Initialize 'source' property of FirCatch objects properly
...
^KT-56923: Fixed
^KT-56755: Fixed
2023-03-08 12:03:35 +00:00
Evgeniy.Zhelenskiy
5b868becf4
[IR] Hide regular class constructor with MFVC parameters
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2023-03-07 21:44:41 +00:00
Nikolay Lunyak
72823657c9
[FIR] Assume SafeCallsAreAlwaysNullable is always on
2023-02-27 15:00:30 +00:00
Alexander Udalov
d73d3c46e2
K2 JVM IR: fix access to Java field shadowed by Kotlin property
...
#KT-56386 Fixed
Co-authored-by: Mikhail Glukhikh <Mikhail.Glukhikh@jetbrains.com >
2023-02-23 12:54:00 +01:00
Dmitriy Novozhilov
86ee855170
[Test] Mute test due to KT-56756
2023-02-20 08:40:31 +00:00
Mads Sig Ager
7c3cc1d5c1
[JVM_IR] Limit inner class attributes to types in class file ( #5081 )
...
* [JVM_IR] Limit inner class attributes to types in class file
Inner class attributes should only be recorded for types that
are materialized in the result class file. In particular, we
should not emit inner classes attributes for types that appear
only in fake overrides. We do map these types to track the
fake overrides for JVM signature clashes but they are not
materialized in the class file.
^KT-56104 Fixed
* [JVM_IR] Consistently pass around materialized boolean in mapType.
2023-01-30 14:11:07 +01:00
Dmitriy Novozhilov
83cbd322fd
[Test] Prohibit declaring dependency on the same module with different kinds in module structure
2023-01-17 14:51:27 +00:00
Ilya Gorbunov
916f733f73
Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
...
Leave it experimental since 1.8 for K/Native.
2023-01-04 17:28:46 +00:00
Alexander Udalov
28759a3ac3
Optimize rangeUntil operator in for-loops and contains
...
Newly added tests are basically copies of the existing tests on `until`.
Note that this operator is optimized for all backends, but the fact that
it's optimized is only checked for the JVM backend in bytecode text
tests.
#KT-53330 Fixed
2023-01-02 12:55:48 +00:00
Ilya Gorbunov
e2d96da396
Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
...
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Steven Schäfer
6af616d3c3
FIR: make declarations marked with 'override' implicitly open
...
#KT-52236 Fixed
2022-12-14 21:46:41 +00:00
Dmitriy Novozhilov
3cffb33ab7
[FE] Drop ApproximateIntegerLiteralTypesInReceiverPosition language feature
...
This feature is not needed because it is unconditionally disabled for K1
(because of not fully correct implementation) and unconditionally enabled
in K2 (K2 does not support old behavior)
^KT-38895
2022-12-09 15:10:02 +00:00
Evgeniy.Zhelenskiy
40f38c8adb
[IR] Eliminate redundant boxing/unboxing of MFVC after inlining
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-12-08 15:12:28 +00:00
Evgeniy.Zhelenskiy
fa4a4e56f3
[Tests] Remove unnecessary usages of OPTIONAL_JVM_INLINE_ANNOTATION
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:42 +00:00
Evgeniy.Zhelenskiy
68fb8aa2a1
[IR] Replace indexes with names for mfvc methods and fields
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:41 +00:00
Evgeniy.Zhelenskiy
b692748938
[IR] Always add getter methods to value classes even if not used
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:40 +00:00
Evgeniy.Zhelenskiy
3653c86f08
[IR] Rename static replacement of MFVC typed equals to "equals-impl0"
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:40 +00:00
Evgeniy.Zhelenskiy
adee33d3e5
[IR] Forbid MFVC primary constructors default arguments
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:38 +00:00
Evgeniy.Zhelenskiy
f2d98eac5e
[IR] Make use a temp variable for flattened non-local non-MFVC getters
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:37 +00:00
Evgeniy.Zhelenskiy
51f9f31a0a
[IR] Remove suffix from MFVC specialized equals function
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:36 +00:00
Evgeniy.Zhelenskiy
8c3fa6f09f
[IR] Escape removing extra boxes if no box was are in the function
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-11-30 18:55:35 +00:00
Mikhail Glukhikh
c698d060c6
FIR2IR: support static fake overrides for fields (related to KT-53441)
...
#KT-54921 Fixed
2022-11-28 17:27:50 +00:00
pyos
67a6785f63
FIR DFA: move eq/notEq null-to-type translation to LogicSystem
...
This makes the `returns() implies` checker slightly cleaner, and also
fixes the case that I've missed where in RHS of `x ?:` type of `x` was
not set to `Nothing?`.
2022-11-22 15:44:37 +00:00
vladislav.grechko
5ec2f1ad92
Get rid of redundant boxing when comparing inline class instances
...
^KT-33722: Fixed
2022-11-18 23:14:03 +00:00
Pavel Mikhailovskii
4436ce22b0
Generate meaningful bytecode names for extension receivers in INDY lambdas
2022-11-15 15:38:34 +00:00
Ilya Chernikov
5b3816cce5
Test infra: refactor IGNORE_BACKEND directive
...
treat it as a general one, introduce *_K1 and *_K2 variants for
more specific ignoring
2022-11-12 16:28:23 +01:00
Mikhail Glukhikh
c0789b5207
PSI/FIR->IR translators: return to 1.7.10 behavior for field references
...
In 1.7.20 we used the nearest Java-based receiver for such field
references in backend. Now we are using use-site receiver again,
it can lead to accidental usage of derived class property backing field.
This is effectively a revert of KT-49507 fix, see commits:
- fa914f20
- b0a6508d
#KT-54393 Fixed
#KT-49507 Planned
#KT-52338 Planned
2022-10-25 08:36:01 +00:00
vladislav.grechko
70c2f2b86f
Support specifying different bytecode listings for FIR and old frontend
2022-10-21 12:57:11 +00:00
Evgeniy.Zhelenskiy
6117cdc0c3
[IR] Remove unused MFVC getters
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-10-07 12:43:46 +00:00
Evgeniy.Zhelenskiy
9dd308dc01
[IR] Add context receivers test, fix a flattening fields bug
...
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com >
#KT-1179
2022-10-07 12:43:46 +00:00
Evgeniy.Zhelenskiy
e1f886936c
[IR] Support try for MFVC
...
#KT-1179
2022-10-07 12:43:45 +00:00
Evgeniy.Zhelenskiy
f8aa3612f8
[IR] Support if and when for MFVC, fix several bugs, refactor
...
#KT-1179
2022-10-07 12:43:44 +00:00
Evgeniy.Zhelenskiy
70293fab60
[IR] Rename MFVC tests + Add test for get-field optimization
...
#KT-1179
2022-10-07 12:43:43 +00:00
Evgeniy.Zhelenskiy
6f94af80ab
[IR] Correct work of the new MFVC lowering classes
...
#KT-1179
2022-10-07 12:43:42 +00:00
Evgeniy.Zhelenskiy
8ba20bee5b
[IR] Prepare MFVC-lowering for the new MFVC classes
...
#KT-1179
2022-10-07 12:43:41 +00:00
Evgeniy.Zhelenskiy
14b8e41967
[IR] Integrate MFVC with Inline classes
...
#KT-1179
2022-10-07 12:43:39 +00:00
Evgeniy.Zhelenskiy
765c212327
[IR] Add MFVC generation tests
...
#KT-1179
2022-10-07 12:43:38 +00:00
Evgeniy.Zhelenskiy
d4969e9b97
Revert "rra/zhelenskiy/flattening_impl"
...
This reverts commit b7f5c039a6 .
2022-10-07 12:43:36 +00:00