Commit Graph

929 Commits

Author SHA1 Message Date
Vladimir Sukharev e958e57c42 [K/N][Tests] Migrate test forwardDeclarationsCast.kt
^KT-61259
2024-01-22 12:29:57 +00:00
Vladimir Sukharev 2f3705f0eb [K/N][Tests] Move funptr.kt to standalone tests due to OUTPUT_DATA_FILE directive
^KT-61259
2024-01-22 12:29:57 +00:00
Vladimir Sukharev c286b0efd7 [K/N][Tests] Migrate tests forwardDeclarationsTwoLibs.kt
^KT-61259
2024-01-22 12:29:57 +00:00
Vladimir Sukharev bd688b3ef7 [K/N][Tests] Migrate tests kt49034*.kt
^KT-61259
2024-01-22 12:29:57 +00:00
Vladimir Sukharev 39e2187d31 [K/N][Tests] Split filecheck part from test direct.kt
^KT-61259
2024-01-19 18:31:25 +01:00
Vladimir Sukharev 833e125450 [K/N][Tests] Polish test sharing_with_weak.kt
^KT-61259
2024-01-19 18:22:22 +01:00
Vladimir Sukharev 4aa8774c6e [K/N][Tests] Migrate test direct.kt
^KT-61259
2024-01-19 18:22:22 +01:00
Vladimir Sukharev e59a80bd69 [K/N][Tests] Migrate test overridabilityCondition.kt
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev 2d0009ff99 [K/N][Tests] Migrate test illegal_sharing_with_weak.kt
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev 647a907204 [K/N][Tests] Migrate kt48816 tests
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev 447c0fb618 [K/N][Tests] Migrate kt56048 test
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev cc13888dd0 [K/N][Tests] Migrate second ObjC test with framework
^KT-61259
2024-01-19 18:22:21 +01:00
Vladimir Sukharev 1b18f4ed1e [K/N][Tests] Migrate first ObjC test with framework
^KT-61259
2024-01-19 18:22:20 +01:00
Vladimir Sukharev 6e2df0e086 [K/N][Tests] Migrate first Apple-specific test
^KT-61259
2024-01-19 18:22:20 +01:00
Sergej Jaskiewicz bc5810ee67 [FIR2IR] Don't use descriptor manglers in FIR2IR
They don't do anything, only complicate the initial configuration.

KT-64990
2024-01-19 13:36:00 +00:00
Alexander Udalov b2c30921e4 JVM: support JVM-specific primitive/wrapper type overridability check
#KT-62045 Fixed
2024-01-19 12:30:48 +00:00
Ilya Kirillov 3a90cb00c7 [LL FIR] reuse the same function for registering K/N FIR session components as in the compiler
So, if a new component is registered in the compiler, it's not forgotten for the LL FIR

This registers `FirDelegatedMembersFilter` for K/N modules and fixes KT-64528

^KT-64528 fixed
2024-01-18 15:43:52 +00:00
Ivan Kylchik 86e6912447 [FIR2IR] Don't generate excess IR block from FirSingleExpressionBlock
This is needed to unify K1 and K2 behavior.

#KT-65064
#KT-63781 Fixed
2024-01-18 10:59:01 +00:00
Vladimir Sukharev 48df87f635 [K/N][Tests] Migrate two more cinterop tests
^KT-61259
2024-01-17 08:33:41 +00:00
Vladimir Sukharev 80cf88c9b9 [K/N][Tests] Move threadStates tests to common codegen/box folder
^KT-61259
2024-01-16 20:15:25 +00:00
Vladimir Sukharev be9805ea5e [K2/N][Tests] Add test to demonstrate compiler behavior for ObjC properties intersection overrides
^KT-57640
2024-01-16 13:40:51 +00:00
Vladimir Sukharev 5f51f5e1fc [K/N] Migrate more cinterop tests
^KT-61259
2024-01-16 11:58:31 +00:00
Dmitriy Novozhilov f9ea353b60 [Native] Don't group K2 MPP tests in Native codegen tests
K2 in MPP compilation expects that it receives module structure
  with exactly one platform leaf module. This invariant may be broken
  during grouping tests, so MPP tests should be run in standalone mode
2024-01-16 09:01:32 +00:00
Pavel Kunyavskiy 882dc18e0e [IrActualizer] Don't copy attributeOwnerId in actualizer
In before, actualizer was copying attributeOwnerId to new
nodes. This leads to attributeOwnerId linked to non-actualized
node. It's unclear what it leads to, so we just stop doing that.

In particular, if attributeOwnerId references another node,
this information would be lost.

^KT-64895
2024-01-15 14:10:35 +00:00
Sergey Bogolepov d3864c841a [Native][tests] Adapt to OutputDataFile constructor changes 2024-01-15 11:18:28 +00:00
Sergey Bogolepov b8c1da7d1f [Native][Tests] Disable static library tests of MinGW 2024-01-15 11:18:28 +00:00
Sergey Bogolepov 85490f9201 [Native][Tests]Update executable location in AbstractNativeCExportTest
Changed the code in AbstractNativeCExportTest to create the executable
in the same directory as the dynamic library.
This update is to accommodate the lack of rpath on Windows systems.
2024-01-15 11:18:28 +00:00
Sergey Bogolepov 8611851b2c [Native][Tests] Fix clang invocation on Linux and Windows
* Pass proper args from ClangArgs
* Call exe binary on Windows
2024-01-15 11:18:28 +00:00
Sergey Bogolepov 30c91e47a9 [Native][Tests] Always use -Xllvm-variant=dev
FileCheck tests force using dev LLVM distribution. It breaks
invocation of LLVM Clang which tries to look for executable in a wrong
directory. Let's keep things simple and always pass dev variant to our
tests.
2024-01-15 11:18:28 +00:00
Sergey Bogolepov 96e5b2be79 [Native][tests] Improve clang invocation
* Wrap it into a proper TestCompilationResult
* Pass additional flags in case of dynamic library test
2024-01-15 11:18:28 +00:00
Sergey Bogolepov 2ed84f6a11 [Native][Tests] Make it possible to run LLVM Clang
Not all K/N targets have Clang in their toolchain. Thus,
we need to run the one from LLVM in our tests.
2024-01-15 11:18:28 +00:00
Sergey Bogolepov c165171471 [Native][tests] Port KT-36639 test case to the new infra 2024-01-15 11:18:28 +00:00
Sergey Bogolepov 1c24f994db [Native][tests] Initial support for CExport in the new test infra
Very trivial implementation of CExport test infrastructure based on
work from LLDB tests and ObjCExport tests.
2024-01-15 11:18:28 +00:00
Sergey Bogolepov 13618fc03b [Native][tests] Extract Clang invocation to a separate function 2024-01-15 11:18:28 +00:00
Sergej Jaskiewicz eda30ff704 [klib] Implement diagnostics for clashing KLIB signatures
Now, we detect clashing signatures during serialization to KLIB and
report a compiler error if two or more declarations have the same
`IdSignature`

For example, for the following code:
```kotlin
@Deprecated("", level = DeprecationLevel.HIDDEN)
fun foo(): String = ""

fun foo(): Int = 0
```

the compiler will produce this diagnostic:
```
e: main.kt:1:1 Platform declaration clash: The following declarations
       have the same KLIB signature (/foo|foo(){}[0]):
    fun foo(): String defined in root package
    fun foo(): Int defined in root package
e: main.kt:4:1 Platform declaration clash: The following declarations
       have the same KLIB signature (/foo|foo(){}[0]):
    fun foo(): String defined in root package
    fun foo(): Int defined in root package
```

Note that we report this diagnostic during serialization and not earlier
(e.g., in fir2ir) for more robustness, so ensure that we check
exactly the signatures that will be written to a KLIB.
If we later introduce some annotation for customizing a declaration's
signature (e.g., for preserving binary compatibility), this
diagnostic will continue to work as expected.

^KT-63670 Fixed
2024-01-12 15:59:28 +00:00
Dmitriy Novozhilov 8300ad76d0 [FIR2IR] Remember overridden symbols if f/o contains error types
^KT-64837 Fixed
2024-01-12 15:32:25 +00:00
Dmitriy Novozhilov 50abaaff7e [Test] Reproduce KT-64466 2024-01-12 15:01:33 +00:00
Alexander Shabalin b7fbfb2fde [K/N][tests] Migrate first platform-dependent test to new testing infra
^KT-61259
2024-01-12 00:47:31 +01:00
Vladimir Sukharev 4786c945d9 [K/N][tests] Elaborate comment in CInteropPackagesTest.kt
^KT-61259
2024-01-11 23:30:07 +00:00
Vladimir Sukharev e7e825a6b9 [K/N][tests] Split test structAnonym.kt
^KT-61259
2024-01-11 23:30:07 +00:00
Vladimir Sukharev 9f2558f640 [K/N][Tests] Patch package names also for .def files
To separate interop modules to different packages,
.def files should be treated similarly to .kt files:
1) package directive should be prepended with test-specific synthetic package,
or, if, absent, package directive with synthetic package should be added.
2) in .kt files, import directives and fully-qualified import from interop modules
should be prepended with same test-specific synthetic package.
2024-01-11 23:30:07 +00:00
Vladimir Sukharev 55a78bf499 [K/N][Tests] Migrate testData of KT59030WorkaroundTest to new new test infra 2024-01-11 23:30:06 +00:00
Vladimir Sukharev bf01cb16b4 [K/N][Tests] Migrate some cinterop tests to new infra
^KT-61259
2024-01-11 23:30:06 +00:00
Denis.Zharkov 72b0372927 K2: Allow PCLA inference when a value parameter has a TV type
^KT-64877 Fixed
2024-01-11 10:32:12 +00:00
Vladimir Sukharev 3c8e7bdfb1 [K/N][Tests] Refactor to AssertionsMode.assertionsEnabledWith() 2024-01-10 23:31:00 +00:00
Vladimir Sukharev fee2a20a55 [K/N][Tests] Support test directive ASSERTIONS_MODE
^KT-64844 Fixed
2024-01-10 23:31:00 +00:00
Vladimir Sukharev 809d652bdf [K/N][Tests] Change assertions and runtime assertions modes to default, when optimizationMode=OPT
^KT-64844 Fixed
2024-01-10 23:31:00 +00:00
Denis.Zharkov 7e4d9d9f64 K2: Add new tests for PCLA implementation
Many of them have been found & minimized at FP tests/user projects

^KT-59791 Fixed
2024-01-10 14:56:31 +00:00
Pavel Kunyavskiy 9374cacdd6 [IrActualizer] Don't actualize expect types
This was never semantically correct, but was not important
before KT-63644, as they were immediately dropped after that anyway.

After KT-63644, they were used to compute fake overrides inside them,
which were later matched against actual class, which can
produce false-positive matching errors.

^KT-64835
2024-01-09 17:53:06 +00:00
Vladimir Sukharev 08bc0a6bd0 [K/N] Adjust moved special backend checks tests
^KT-61564
2024-01-09 14:17:47 +00:00