Commit Graph

1448 Commits

Author SHA1 Message Date
Mikhail Glukhikh 4b1368409d K2: add a black box test to confirm KT-55705 now works properly 2023-11-15 09:33:05 +00:00
Mikhail Glukhikh f2ef41dbbd K2: add a black box test for KT-58874 to confirm work also in runtime 2023-11-15 09:33:03 +00:00
Vladimir Sukharev 1b1df9f0db [K/N] Create test model for building/executing C-Interop tests
^KT-63287 Fixed
2023-11-14 19:35:52 +00:00
Svyatoslav Scherbina 8d20d5b16c Native: support objcExportReportNameCollisions=true binary option
This binary option makes the compiler emit a warning whenever it mangles
a name emitted by ObjCExport.

^KT-63153 Fixed
2023-11-14 19:24:43 +00:00
Mikhail Glukhikh 4abce54748 K2: reproduce KT-60312 2023-11-13 16:23:26 +00:00
Dmitriy Dolovov 4892a81178 [Native] Simplify *.isNativeStdlib() checks as much as possible
...still preserving their reliability.
2023-11-11 13:33:06 +00:00
Alexander Shabalin fa9c620261 [K/N] Migrate some runtime/basic tests to new testing infra ^KT-61259 2023-11-10 15:51:05 +00:00
Dmitriy Novozhilov 8578a0bf6a [FIR2IR] Properly insert casts for smartcasts in argument position
Previously cast inserter didn't consider expected type for arguments
  of function calls

^KT-63257 Fixed
2023-11-10 07:50:01 +00:00
Ilya Kirillov b6fdd7cacc [FIR, Native] extract test initialization code to functions from AbstractDiagnosticsNativeTest for further reuse in LL FIR tests
^KT-62910
2023-11-10 06:41:03 +00:00
Kirill Rakhman 7da271bab8 [FIR] Serialize context receivers using the correct local serializer
This leads to type ref referring to generic type variables being
serialized correctly.
When the type variable is declared on the member itself, it's written to
typeParameterName,
otherwise it's written to typeParameter. This is required for
deserialization to work correctly.

#KT-63227 Fixed
2023-11-08 10:26:34 +00:00
Vladimir Sukharev 4d4ad6c0d8 [K/N] Fix K2 ObjC interop: Fields are not supported for Companion of subclass of ObjC type
^KT-63048
2023-11-07 18:51:10 +00:00
Vladimir Sukharev 3ea4a6a937 [K/N] Add test for KT-63048, K1greenK2red
^KT-63048
2023-11-07 18:51:10 +00:00
Dmitriy Novozhilov d08567c2c7 [FIR2IR] Approximate extension receiver type after type argument substitution
Frontend may leak captured types into type arguments, so they should be
  approximated before using them in fir2ir cast inserter to determine
 a specific type from smartcast

^KT-62863 Fixed
2023-11-07 12:37:19 +00:00
Johan Bay 3aeca1956e [K/N] Consolidate toolchain paths between platforms
The compiler had some code that looked for the same tools and files
in toolchains at different relative paths depending on the platform.

This commit improves that code by including `usr/` into the path to
the toolchain on macOS, which allows to unify the relative paths
inside the toolchains.

Co-authored-by: Johan Bay <jobay@google.com>
2023-11-07 12:10:14 +00:00
Alexander Shabalin 4c36538646 [K/N] Add signposts to safepoints ^KT-62689
Disabled by default.

Merge-request: KT-MR-12679
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-11-06 23:10:08 +00:00
Dmitriy Dolovov 0de04f934e [Commonizer] Switch from trove4j to fastutil
^KT-63159
2023-11-06 19:56:17 +00:00
Dmitriy Dolovov 7658b818ac [Commonizer] Add a performance test (muted by default)
This test can be used to make small performance measurements of
the core commonizer on occasional basis. This test is not intended
for regular execution, e.g. at the CI server.

^KT-63159
2023-11-06 19:56:17 +00:00
Dmitrii Krasnov aad19ab844 [Gradle, Native] Override equals and hashCode in KonanTarget
"data objects" is only available since language version 1.9. But we should not use LV 1.9, because it is used in the Gradle build classpath and would be incompatible with Gradle Kotlin runtime.
Then only manually override equals/toString/ works here.

#KT-61657 Fixed


Merge-request: KT-MR-12759
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-11-06 18:55:40 +00:00
Dmitrii Krasnov f8507d5220 [Gradle, Native] Switched downloading k/n to from Maven Central in KGP
#KT-62907 Fixed
2023-11-06 16:50:43 +00:00
Dmitriy Novozhilov 420fbad73d [FIR2IR] Properly insert implicit casts to extension receiver in case of intersection smartcast type
^KT-62863 Fixed
2023-11-06 06:50:35 +00:00
Mikhail Glukhikh 50106c740c K2: reproduce situation from KT-62863 2023-11-06 06:50:35 +00:00
Mikhail Glukhikh 1ef0f9e944 K2: reproduce strange "smartcast aside" behavior related to KT-62544 fix 2023-11-06 06:50:35 +00:00
Dmitriy Dolovov a3bfe58415 [KLIB tool] Fix failing test on dumping c-interop signatures 2023-11-02 18:44:14 +00:00
Vladimir Sukharev 9e7bb90e44 [K/N] Don't pass language version to the second stage. 2023-11-01 01:51:12 +00:00
Dmitriy Dolovov e18a2d0a2e [KLIB tool] Add tests for dumping metadata signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 88a297b022 [KLIB tool] Run tests for 'dump-metadata' with & without signatures 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov aa9b901926 [KLIB tool] Migrate 'dump-metadata' tests to K/N test infra 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 57e004e2b0 [KLIB tool] Respect '-signature-version' in 'dump-metadata' and 'dump-ir' commands 2023-10-27 09:28:00 +00:00
Dmitriy Dolovov 93506bcb95 [KLIB tool] Add tests for dumping IR signatures
^KT-62341
2023-10-27 09:27:59 +00:00
Dmitriy Dolovov a49723e35c [KLIB tool] Minor. Rename ir() to dumpIr() 2023-10-27 09:27:59 +00:00
Dmitriy Dolovov 02f52371c1 [KLIB tool] Rename "contents" to "dump-metadata"
To make KLIB tool command names more uniform.
2023-10-27 09:27:59 +00:00
Dmitriy Dolovov 447b0eddac [KLIB tool] Drop useless arg: -target 2023-10-27 09:27:59 +00:00
Vladimir Sukharev aebbdeaf92 [K/N] Fix OS file handles leak in DependencyProcessor
Merge-request: KT-MR-12705
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-26 20:03:34 +00:00
Alexander Shabalin b3e13fb2c2 [K/N] Migrate runtime/collections tests to new testing infra ^KT-61259 2023-10-24 09:27:46 +00:00
Johan Bay fb1d2278a0 [klibs] header klibs should keep private interfaces
^KT-62213 Fixed
2023-10-23 11:48:05 +00:00
Vladimir Sukharev e43b634122 [K/N] Migrate most simple filecheck tests to new infra
^KT-62157


Merge-request: KT-MR-12376
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-23 10:07:28 +00:00
Ivan Kylchik 8c7c44f9f5 [FIR] Fix evaluation of Java properties for Char and String types
#KT-57802
2023-10-20 16:33:20 +00:00
Dmitriy Novozhilov 940567978d [FIR2IR] Treat delegated functions as fake-overrides
Delegated callables in FIR are session-dependant (as fake-overrides),
  so it's incorrect to use their FIR as a key for declaration storage.
  Pair of original function and owner lookup tag should be used instead

^KT-62671 Fixed
2023-10-19 13:15:48 +00:00
Dmitriy Novozhilov 7ff2fc9dbe Add workaround for KT-62702 2023-10-19 12:13:46 +00:00
Pavel Kunyavskiy da488f513f [IR] Fix file modules after actualization
When files from different IrModules are merged in IrActualizer
their IrModule link was not updated. This led to assuming them
as different modules, and incorrect internal visibility handling.

^KT-62623
2023-10-19 10:16:45 +00:00
Dmitriy Novozhilov 3d6ec0ec75 [FIR2IR] Automatically store IR declaration in its parent upon creation
Previously, creating a declaration with Fir2IrCallableDeclarationsGenerator/
  Fir2IrClassifiersGenerator didn't guarantee that this declaration will
  be actually added to the list of parent class/file declarations, which
  lead to situations when FIR2IR created some declarations in the air
  (mostly fake-overrides)
2023-10-17 12:46:27 +00:00
Alexander Shabalin 27c85a059f [K/N] Move memmem from Porting.h to KString.cpp ^KT-59008 2023-10-17 09:37:34 +00:00
Vladimir Sukharev 5acdc865b6 Properly handle multi-line diagnostics test directives 2023-10-13 10:14:21 +00:00
Igor Chevdar c6470a684d [box-tests] Added a reproducer for #KT-62313 2023-10-12 13:34:13 +00:00
Igor Chevdar 1b30f76a78 [K/N][tests] Added a test on stepping through inline arguments 2023-10-11 06:27:02 +00:00
Pavel Kunyavskiy 4175a0d258 [K/N] Enable test muted because of wrong test infra setup
^KT-61773
2023-10-09 16:52:15 +00:00
Pavel Punegov a72eafc92b [K/N][test] Fix cache mode selection for test targets without cache
Execution of tests without cache support should be restricted. Such runs
should use default cache mode (without).
2023-10-04 19:21:51 +00:00
Vladimir Sukharev cd4c241fa3 [K/N] Run irText tests for K2/Native
^KT-58240
2023-10-04 18:20:05 +00:00
Vladimir Sukharev 03442e1cee [FIR] Implement FirGenericArrayClassLiteralSupport platform feature
^KT-59931 Fixed
2023-10-04 14:45:23 +00:00
Timofey Solonin 8dc9307f9e Add iconv void * overloads for backwards compatibility
Since Xcode 15 the iconv APIs operate on an opaque type __tag_iconv_t* instead of
void*. This causes a runtime exception in older Ktor versions which
depended on iconv.

^KT-62286
2023-10-04 08:04:37 +02:00