Commit Graph

1000 Commits

Author SHA1 Message Date
Sergey Bogolepov 64319477f0 [K/N] Test for cinterop hints 2022-12-21 13:28:17 +00:00
Sergey Bogolepov 233b01f341 [K/N] CInterop ExceptionPrettifier
Add a wrapper around cinterop invocation that tracks exceptions.
Wrapper has a set of handlers. Each handler checks exception for some
pattern and if it matches, throws another exception with a more
user-friendly message.
The first such case is compilation error due to missing -fmodules flag.
2022-12-21 13:28:17 +00:00
Pavel Kunyavskiy 4928e284f6 Make LateinitIntrinsicApplicabilityChecker warning for Native and JS
This checker was enabled only on JVM by mistake.
It's now fixed, but we don't want to make it an error in minor release.
So it will be an warning in 1.8.20 and an error in 1.9.0

^KT-27002
2022-12-20 20:06:52 +00:00
Igor Chevdar 0f2ebeea15 [tests] Added a test for KT-55494 2022-12-16 18:32:42 +00:00
Dmitriy Dolovov ab4603c9a3 [K/N] Mute LLDB tests if any other than DEBUG opt mode is used 2022-12-15 13:11:57 +00:00
Dmitriy Dolovov f07f7885c5 [K/N] Small clean-up in LLDB tests 2022-12-14 08:58:10 +00:00
Johan Bay 842a66c3de [K/N] Migrate LLDB test to blackboxtest
This change only introduces a single sample test together
with the necessary plumbing for basic LLDB testing.
Migrating the rest of the tests over and introducing more
complex interop setups will be tackled as a follow-up.
2022-12-14 08:58:10 +00:00
Sergej Jaskiewicz 9c6f92d697 [test] Add a test for KT-55318 2022-12-13 17:01:00 +00:00
Sebastian Sellmair bd229584e4 [Gradle] Implement sources.jar resolvers
^KT-55289 Verification Pending
2022-12-12 20:29:07 +00:00
Evgeniy.Zhelenskiy f09fb5ed09 [IR] Enable tests for inline classes secondary constructors with body for not JVM
Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>

#KT-55333
2022-12-11 22:06:47 +01:00
pyos 0d46dfc1ba FIR: fix substitution of type arguments in SAM type aliases
^KT-54730 Fixed
2022-12-07 22:09:20 +00:00
Sergej Jaskiewicz 1539d7ef1a [klib] Bring package names in sync with the directory layout
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.

NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
Vladimir Sukharev b883dc5434 [KT-39120] Add "-fmodules" argument support to Cinterop
Merge-request: KT-MR-6921
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2022-11-30 08:46:40 +00:00
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
Leonid Startsev 471882b743 Introduce @DeprecatedVisitor; mark up visitor-related declarations with it.
Provide convenient JVM writing API.

Get rid of ExperimentalUnsignedTypes.
2022-11-10 13:30:09 +00: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 dc36272354 Get rid of unsafe cast function usages in :native:frontend.native 2022-10-11 15:12:03 +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
Anton Lakotka c358df7033 [Gradle] Include WATCHOS_DEVICE_ARM64 to Commonize unix platform test
^KT-53107
2022-10-05 19:32:05 +00:00
Anton Lakotka 1b3cc0dfaa [Gradle] Register watchosDeviceArm64 in commonizer
^KT-53107
2022-10-05 19:32:03 +00:00
Sergey Bogolepov 289f540530 [Commonizer] workaround for CoreGraphics from Xcode 14 2022-10-05 09:59:10 +00:00