Vsevolod Tolstopyatov
14b13a2f17
[kotlin.reflect] Introduce ClassValue-based cache for KClassImpl
...
* Replace pcollections with ClassValue/ConcurrentHashMap-based caches
* Do not store weak references, instead cache strong references and count on ClassValue to unload the corresponding classloader if necessary
* ConcurrentHashMap does not rely on WeakReference as it's only selected on Android where classloader leaks don't exist
* Update reflect/scripting JDK requirement to Java 8 in order to proceed
#KT-53454
#KT-50705
Merge-request: KT-MR-6788
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com >
2022-08-05 15:35:34 +00:00
Ilya Gorbunov
f91ea4b4d9
Add more tests for 'contains' in ranges #KT-52933
...
- ranges produced by 'rangeUntil' operator
- ranges of unsigned values
- more elements in ranges produced by `downTo`
2022-08-03 22:18:14 +00:00
Ilya Gorbunov
a044555299
Do not run rangeUntil operator tests in old JVM BE #KT-52933
2022-08-03 22:18:12 +00:00
Steven Schäfer
03aee58585
JVM IR: Avoid IrComposite in ReturnableBlockLowering (KT-53202)
2022-08-03 00:19:31 +02:00
Mikhael Bogdanov
90f8f8e14e
Support inner classes in -Xjdk-release
...
#KT-52823 Fixed
2022-08-02 04:56:20 +00:00
Svyatoslav Scherbina
09c131afd2
[Native][tests] Add standalone test for KClass package names
...
To ensure that after introducing `ReflectionPackageName` annotation,
we still have tests that check KClass package names without it.
2022-08-01 15:24:15 +02:00
Svyatoslav Scherbina
c1853a0218
[Native][tests] Introduce NATIVE_STANDALONE directive
...
This directive makes the test standalone, i.e. disables grouping it with
other tests into a single compilation, and in particular disables
package renaming for the test.
Also, remove the old hard-coded way to mark tests standalone.
2022-08-01 15:24:10 +02:00
Mads Ager
59c2bde10a
[K/N] Unmute passing tests.
2022-08-01 08:57:16 +00:00
Mads Ager
efde7c53d2
Remove reference to System.out.println from test.
...
This makes the test usable for non-jvm targets as well.
2022-07-29 09:34:53 +00: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
Steven Schäfer
6f0ff6aeb0
IR: Fix scope transparency in ReturnableBlockLowering
...
An IrReturnableBlock introduces a new variable scope and shouldn't be
replaced with a transparent IrComposite block.
2022-07-29 01:06:44 +02:00
Igor Chevdar
8981eb85de
[box-tests] Added a couple of reproducers for KT-52795
2022-07-28 16:01:17 +00:00
Mikhail Glukhikh
32a73968de
Stop tower resolve in K2 in more similar manner with K1
2022-07-27 15:29:41 +00:00
Ilya Gorbunov
1addc23b23
Add range iteration tests for rangeUntil
...
#KT-52932
2022-07-26 23:52:10 +00:00
Denis.Zharkov
7f7e5c5975
FIR: Fix candidate receivers orders when choosing a context receiver
...
^KT-53257 Fixed
2022-07-25 15:11:29 +00:00
Alexander Udalov
584b70719e
JVM IR: disable SAM conversion in case type has 'in' projection
...
... and the corresponding type parameter has a non-trivial (i.e.
non-`Any?`) upper bound.
The best solution here would be to get rid of
`removeExternalProjections` completely, and just use the type of the
argument at the call site, but see KT-52428.
#KT-51868 Fixed
2022-07-23 01:10:53 +02:00
Mikhail Glukhikh
3ae75a5094
FIR2IR: generate annotations on fake override parameters #KT-53208 Fixed
2022-07-22 16:39:52 +00:00
Mikhail Glukhikh
5445f4043a
K2: expand types during smartcasting to prevent redundant intersections
...
#KT-53184 Fixed
2022-07-22 16:39:52 +00:00
Mikhail Glukhikh
9add6f3d55
K2: add more accurate & more automatic control of diagnostic suppression
...
#KT-51363 Fixed
2022-07-22 11:35:26 +00:00
Svyatoslav Kuzmich
11c8c01a50
[Wasm] Update v8 shell to v10.5.207
2022-07-19 18:46:52 +02:00
Pavel Mikhailovskii
846537b367
KT-45375 Lightweight lambdas; KT-52817 introduce @JvmSerializableLambda
2022-07-18 17:10:07 +02:00
Pavel Mikhailovskii
fd5800e8b5
KT-53090 Support -Xlambdas=indy for anonymous functions
2022-07-18 08:18:05 +00: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
Steven Schäfer
8014712569
JVM IR: Check that we generate callable references in tests
2022-07-14 23:24:18 +02:00
Steven Schäfer
2acfb3a41f
JVM IR: Avoid direct lambda invokes in inline tests
2022-07-14 23:24:18 +02:00
Steven Schäfer
f0760e0550
JVM IR: Move direct invoke optimization into a separate pass
...
This also changes the transformation to inline the body of a directly
invoked lambda rather than producing a call to an anonymous local
function. The latter is unsupported in inline functions and problematic
from an ABI perspective, since it results in functions whose name
depends on the entire source code up to this point.
2022-07-14 23:24:18 +02:00
Steven Schäfer
7d59c7689c
JVM IR: Avoid direct invokes in callable reference tests
...
Due to the direct invoke optimization, most callable reference tests
were not generating callable references/lambdas.
2022-07-14 23:24:18 +02:00
Pavel Mikhailovskii
b26155dd9e
KT-53007 Fix accessibility checks when calling a protected member via super@Outer
2022-07-14 13:09:42 +02:00
Mikhail Glukhikh
70e15b281c
K2: fix exception in deserializer for external setter #KT-53031 Fixed
2022-07-13 17:06:14 +00:00
Pavel Kunyavskiy
5cdda48487
[K/N] Extract const val initializers to place of usage
...
This would make behaviour more consistent with jvm. There is still
a difference in behaviour about point where side effects happen.
^KT-52970
2022-07-13 08:49:40 +00:00
Igor Chevdar
e36bd5fe90
[box-tests] Added a multi-module box test
2022-07-13 08:01:51 +00:00
Vladimir Sukharev
a9789203ac
Run test genericFunctionReferenceSignature.kt only for JVM and native
...
Merge-request: KT-MR-6636
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-07-12 13:07:14 +00:00
Mikhail Glukhikh
c92d685415
FIR: postpone callable reference candidate in default argument case
...
#KT-53019 Fixed
2022-07-12 12:22:34 +00:00
Vladimir Sukharev
fd52f475cb
Devirtualization fails to eliminate boxing in function reference context
...
^KT-49847 Fixed
Merge-request: KT-MR-6460
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2022-07-12 08:26:27 +00:00
pyos
5a2ec4a0d5
FIR CFG: merge data flow if called-in-place lambda may not be called
2022-07-11 18:11:30 +03:00
Victor Petukhov
7d945d9bdc
[FIR] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:08 +00:00
Victor Petukhov
cb2dbca0c3
[FE 1.0] Support loading rxjava3 nullability annotations on bounded wildcards
...
^KT-53041 Fixed
2022-07-11 12:44:07 +00:00
Victor Petukhov
2057deb91b
[FE 1.0] Create DONT_CARE type only for callable references with no expected type
...
Otherwise, it can be resolved safety
^KT-52270 Fixed
2022-07-11 12:44:06 +00:00
Igor Chevdar
a61d05971e
[box-tests] Added a couple of multi-module box tests
2022-07-10 17:56:36 +00:00
Nikita Nazarov
939a720686
Add android ignore directives for debug mode tests
2022-07-07 14:51:24 +03:00
Nikita Nazarov
7287be6879
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-07 14:51:24 +03:00
Nikolay Krasko
d080297c20
Revert "Add tests on variable spilling with debug mode enabled"
...
This reverts commit 65bb6abae4 .
2022-07-05 11:04:50 +00:00
Nikolay Krasko
c1137d9986
Revert "Set android ignore directives for debug mode tests"
...
This reverts commit 12e40e7b92 .
2022-07-05 11:04:49 +00:00
Pavel Kunyavskiy
c1ec1d9d4c
[K/N] Handle Unit? and Nothing? correctly in finally transformation
...
^KT-52985
2022-07-05 06:54:29 +00:00
Nikita Nazarov
12e40e7b92
Set android ignore directives for debug mode tests
2022-07-05 09:31:12 +03:00
Nikita Nazarov
65bb6abae4
Add tests on variable spilling with debug mode enabled
...
#KT-48678 Fixed
2022-07-02 18:29:18 +03:00
Pavel Mikhailovskii
8a402bcacd
KT-52875 Fix extension function literal creation with -Xlambdas=indy
2022-06-30 14:13:05 +00:00
Ilmir Usmanov
a5084c2f69
JVM IR: Make receiver type of IrGetField not null
...
otherwise, it will be mapped to inline class type if underlying type
is primitive of nullable.
#KT-52913 Fixed
2022-06-30 01:28:09 +00:00
Ilya Chernikov
bb996c1b27
Switch kotlin version to 1.8
...
with appropriate fixes in testdata, tests and other
places.
2022-06-29 10:20:30 +02:00