Commit Graph

393 Commits

Author SHA1 Message Date
Sergej Jaskiewicz aa1b18b0c8 [IR] Prevent infinite recursion when rendering bound symbol references
Refactor the renderer, make BoundSymbolReferenceRenderer a static class
to prevent calling RenderIrElementVisitor's methods from it to avoid
infinite recursion in the future.

^KT-52677 Fixed
2022-11-28 16:43:53 +00:00
Vladislav Grechko cd6e865fb3 Improve support of 'lateinit' modifier
- Allow 'lateinit' for inline classes which underlying type
is suitable for 'lateinit'

- K2: report all problems related to 'lateinit' modifier

^KT-55052: Fixed
2022-11-24 19:47:21 +00:00
vladislav.grechko e0c13e5276 Fix addAll & putAll invocations on inline mutable collections
^KT-54950: Fixed
2022-11-24 19:27:42 +00:00
Ilya Chernikov 4e4511bba2 FIR2IR: convert enums with non-primary default ctor correctly
see added test for example
2022-11-12 16:28:24 +01:00
Pavel Mikhailovskii 252e97663b KT-54784 Fix function inlining in init sections 2022-11-09 17:15:37 +00:00
Alexander Udalov d7a58a7c6c Keep track of array types in OptimizationBasicInterpreter
Merging array types with different element types, for example
`[Lj/l/String;` and `[Lj/l/Object;`, now produces `[Lj/l/Object;`
(instead of `Lj/l/Object;`), which allows for more precise tracking of
null values because we assume that AALOAD on a non-array typed value is
possible only if that value is null.

 #KT-54802 Fixed
2022-11-07 17:22:38 +01:00
mvicsokolova 95506ff56e Fix initialization args for AbstractNativeKlibBinaryCompatibilityTest 2022-11-04 10:10:51 +00:00
Dmitriy Dolovov fbfb564b41 [Native][tests] Don't compile given KLIB libraries 2022-11-04 10:10:51 +00:00
Dmitriy Dolovov a8b0f8a145 [Native][tests] Minor: Add check to ensure all custom KLIBs are valid 2022-11-04 10:10:50 +00:00
mvicsokolova 775db55539 [Native][tests] Support passing custom (external) KLIBs as -l dependencies to Kotlin/Native compiler invocation 2022-11-04 10:10:50 +00:00
Dmitriy Dolovov f98a5020cd [Native][tests] Don't patch FQNs inside of kotlinx.* package 2022-11-04 10:10:49 +00:00
mvicsokolova 2f85b4928e Moved nativeTest constructor to buildSrc 2022-11-04 10:10:48 +00:00
Pavel Punegov 762f014c5f [K/N][test] Don't mark objects with ThreadLocal annotation for new MM
Merge-request: KT-MR-7569
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-03 11:23:36 +00:00
Alexander Udalov 54ab66cd4e Add regression test for KT-54707 2022-11-01 11:24:03 +01:00
Ilya Goncharov 05fd437d42 [JS IR] Regenerate tests 2022-10-31 16:08:26 +00:00
Ilya Goncharov 372a512c91 [JS IR] Add case with bridge for method with default parameters 2022-10-31 16:08:24 +00:00
Sergej Jaskiewicz b429e2f34f Remove a test that doesn't make sense anymore 2022-10-27 11:28:01 +00:00
Nikolay Lunyak 7e323f8ac6 [FIR] KT-54692: Fix compiler crash on UInt.shl
Merge-request: KT-MR-7513
Merged-by: Nikolay Lunyak <Nikolay.Lunyak@jetbrains.com>
2022-10-27 10:40:06 +00:00
Ilya Goncharov fd5fba6f09 [JS IR] Fix case with bridge with nested classes
^KT-54686 fixed
2022-10-26 12:56:03 +00:00
Pavel Punegov d2c58cdd27 [K/N][build] Dependencies fixes: trove4j and kotlin-compiler
* Depend on kotlin-compiler project instead of its runtimeElements only
* trove4j fixes: add as a dependency and use common version
* Strip dependencies in different projects: remove unnecessary
2022-10-21 10:33:40 +00:00
Dmitriy Dolovov 181809e2af [IR][tests] Support friend-dependencies in KLIB ABI compatibility tests 2022-10-20 10:18:56 +02:00
Dmitriy Dolovov 500e4f5e24 [IR][tests] Add test to check absence of false positively-detected unimplemented callables
^KT-53663
2022-10-20 10:18:56 +02:00
Dmitriy Dolovov 296c1cbd0f [Native][tests] Add partial linkage tests (muted) for replacement-of-return-type case
^KT-51707
2022-10-20 10:18:54 +02:00
Dmitriy Dolovov 3569ec7666 [IR][tests] New test: change of visibility for callables 2022-10-20 10:18:53 +02:00
Dmitriy Dolovov 8374b2da85 [IR][tests] New test: non-abstract callable member in abstract class becomes abstract
^KT-53663
2022-10-20 10:18:53 +02:00
Dmitriy Dolovov 94f9963230 [Native][tests] Update test warnings filter to reflect changes in partial linkage warnings 2022-10-20 10:18:52 +02:00
Dmitriy Dolovov f048e3ddf7 [IR][tests] Refactoring: Get rid of AbstractKlibABITestCase 2022-10-19 13:46:24 +00:00
Dmitriy Dolovov b5655dfaac [IR][tests] Ignore muted ABI compatibility tests 2022-10-19 13:46:23 +00:00
vladislav.grechko aeccc2e787 Fix equality comparison of inline classes with primitive underlying type
^KT-54455 Fixed
2022-10-14 23:25:48 +00:00
Svyatoslav Scherbina 3e1eddcf54 Get rid of unsafe cast function usages in :native:native.tests 2022-10-11 15:11:03 +00:00
vladislav.grechko e0c8142106 Support of custom 'equals' and 'hashCode' in inline classes
'equals' from any made available for overriding in inline classes
'typed' equals made available for definition in inline classes
'typed' equals definition made compulsory if 'untyped' is overridden
'operator' keyword is allowed in 'typed' equals definition

^KT-24874: Fixed
2022-10-10 16:52:34 +00:00
pyos 8d33de4297 JVM: partially reify typeOf and signatures as soon as possible
E.g. when substituting T -> Array<T>, write the bytecode for the
Array<...> part for typeOf.

This fixes various issues where either Array nesting levels, nullability
information (for typeOf), or entire reification markers were missing,
causing incorrect outputs ranging from missing `?`s to missing `[]`s to
just reified types not really being reified.

^KT-53761 Fixed
2022-10-06 00:58:25 +02:00
Leonid Startsev ccdb6fc599 Fix .equals for instantiated annotations with unsigned array types.
#KT-53876 Fixed
2022-10-03 13:54:06 +00:00
Pavel Kunyavskiy 2d4c94a115 [K/N] Add test for inter-module suspend function override 2022-09-30 08:48:59 +00:00
Alexander Udalov 4baa74f396 Add regression tests for obsolete issues
#KT-50909
 #KT-50974
 #KT-51888
2022-09-28 23:18:59 +02:00
Marat Akhin f73897fcea [K/N][KLIB][Tests]: mark klib binary compatibility tests as klib-abi
This is to avoid the need to change all our TC configurations to include
another test task run
2022-09-27 10:03:07 +00:00
Marat Akhin aca390263e [K/N][KLIB][Tests]: regenerate klib binary compatibility tests 2022-09-27 10:03:06 +00:00
Marat Akhin d6230a2e7b [K/N][KLIB][Tests]: support for klib binary compatibility tests on K/N
The impl supports both regular and caching testing modes.
Also add Gradle target for klib binary compatibility tests.
2022-09-27 10:03:06 +00:00
pyos 2dd49e5fb4 JVM_IR: unwrap suspend views when generating SAM wrappers
If the super class is in a file that has already been lowered, the base
method has an extra continuation parameter which breaks things.

Also, SAM wrappers around functional objects are tail-call and do not
need continuations ever, so don't even try.

^KT-50950 Fixed
2022-09-23 21:55:00 +02:00
Nikolay Krasko 1630386712 Move to JDK_X_Y variables 2022-09-21 22:53:19 +00:00
pyos acce055fc4 FIR: fix incorrect handling of suspend function typealiases again
The previous attempt stopped this code from throwing an exception during
serialization, but the arity is still wrong so an exception is now throw
when reading the serialized type.

^KT-50997 Fixed
2022-09-12 17:45:40 +02:00
Vladimir Sukharev c8864369fd Use main class as test generator name
Merge-request: KT-MR-7031
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-09-09 12:51:18 +00:00
Pavel Mikhailovskii 0b453ee328 KT-41670 Check for default property accessors in SAM interfaces 2022-09-07 13:37:38 +00:00
Pavel Mikhailovskii a75d5ba4cf KT-53465, KT-53677 Get rid of unnecessary checkcasts to array of reified type 2022-09-06 18:33:38 +00:00
Alexander Korepanov 01507281a2 [Common IR] Forward the extension receiver in the reified wrapper
^KT-53672 Fixed
2022-09-05 07:40:30 +00:00
Dmitriy Dolovov 6b6bc7d6fe [Native][tests] Fix: Pass friend modules to compiler CLI when building static cache
^KT-53723
2022-08-30 07:56:17 +00:00
Pavel Kunyavskiy 895a8ff149 [K/N] Basic support of Enum.entries for Native
No forward compatibility yet, with old klib IR linker will fail.

^KT-53324
2022-08-25 12:40:30 +00:00
Steven Schäfer a90c4d5dd5 JVM IR: Optimize equality on class literals 2022-08-23 00:14:11 +02:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Igor Chevdar ccb4b5fd7d Revert "[Native][tests] Temporarily disable String codegen/box tests with "-opt" mode"
This reverts commit b210e24b43.
2022-08-22 06:05:53 +00:00