Commit Graph

1503 Commits

Author SHA1 Message Date
Dmitriy Dolovov c9f4a1a841 IR: Avoid overwriting of property signature descriptions
^KT-64085
^KT-64082
2023-12-07 15:02:24 +00:00
Yan Zhulanow 1726a94c87 [Pill] Update module structure 2023-12-07 08:53:35 +00:00
Troels Bjerre Lund 4f77434ea5 [K/N] Remove LLVM coverage
The -Xcoverage feature has not worked and has been disabled for a while.
This fix removes it, and all of its uses.


Co-authored-by: Troels Lund <troels@google.com>


Merge-request: KOTLIN-MR-821
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-12-06 14:07:16 +00:00
Timofey Solonin c8b77fe18c Run lldb tests only on arm64 macOS and only in debug mode
^KT-63598
2023-12-06 08:39:06 +00:00
Mikhail Glukhikh 4b649cbbe9 [tests] Drop a BI codegen test for should-be-red issue KT-63648 2023-12-05 18:15:53 +00:00
Stanislav Ruban da0c3090a9 [tests] Regenerate test configurations 2023-12-05 18:15:53 +00:00
Sebastian Sellmair 0713866c1e [K/N] Modularise :kotlin-native:native.backend to extract objc header generation (2/2)
^KT-63905 Fixed
2023-12-04 18:52:08 +00:00
Sebastian Sellmair ae9f3d66c2 [K/N] Modularise :kotlin-native:native.backend to extract objc header generation (1/2)
^KT-63905
2023-12-04 18:52:08 +00:00
Timofey Solonin 04dec2769b Step through the <compiler-generated> functions via a stop hook in konan_lldb.py
^KT-63598
2023-12-04 10:20:54 +00:00
Vladimir Sukharev c5248fc5f4 [K/N] Migrate some cinterop tests to new test infra 2023-12-04 08:43:28 +00:00
Stanislav Ruban 3a77f39199 [tests] Regenerate test configurations 2023-12-01 19:20:28 +00:00
Alexander Shabalin 340103098f [K/N][tests] Migrate entry point runtime tests to new testing infra ^KT-61259 2023-12-01 12:07:25 +00:00
Alexander Shabalin 0ab0607bbf [K/N][tests] Allow specifying program args in new test infra ^KT-61259 2023-12-01 12:07:25 +00:00
Ivan Kylchik 2b6845c032 [JVM_IR] Optimize properties delegated to const val
We can omit `get` call to delegated property and inline
constant value directly. If we are not going to
do that, we can get a runtime exception because
all usages of const property will be inlined and the property
itself will be dropped.

#KT-63567 Fixed
#KT-63580 Fixed
2023-11-30 14:27:36 +00:00
Alexander Udalov fc7de5ab97 IR: check type parameter bounds equality in overrides
The code is exactly the same as in K1's
`OverridingUtil.areTypeParametersEquivalent`.

 #KT-63442 Fixed
2023-11-30 11:04:02 +00:00
Kirill Rakhman 934253878b [Tests] Add regression test for KT-63564
#KT-63564 Fixed
2023-11-30 08:39:05 +00:00
Dmitriy Dolovov 16d1e85932 IR text tests: Stable blank lines between declarations in class
Rework rendering of kt-like dump and signatures dump in order to avoid
unstable blank line between declarations of the same level:
1. No blank line for the first declaration inside the member scope of
the class.
2. Always a single blank line between each two subsequent declarations
inside the member scope of the class.
2023-11-30 08:32:35 +00:00
Dmitriy Dolovov e0e50e183e IR text tests: Add test with the implementation of a private interface 2023-11-30 08:32:35 +00:00
Dmitriy Dolovov 02604060ae IR text tests: Don't dump signatures for local declarations
1. Local declarations don't participate in IR-linkage, because they
can be referenced only inside the same body -> can be dropped
from IR text tests.

2. Mangled names for private declarations computed by descriptors/fir
are actually not used anywhere (they are recomputed by IR
immediately before serialization of IR). But sometimes such
mangled names diverge between K1 and K2 -> don't check them, but
always check mangled names computed by IR even for private
declarations.

3. Also: Drop DUMP_LOCAL_DECLARATION_SIGNATURES test directive.

^KT-57428 Obsolete
^KT-57430 Obsolete
^KT-57434 Obsolete
^KT-57778 Obsolete
^KT-57775 Obsolete
2023-11-30 08:32:35 +00:00
Stanislav Ruban 514ae0c813 [tests] builder inference test-set: regenerate diagnostic & codegen tests 2023-11-30 06:27:00 +00:00
Alexander Shabalin 6ca8f546fe [K/N][tests] Migrate console runtime tests to new testing infra ^KT-61259 2023-11-29 16:22:28 +00:00
Alexander Shabalin 2abf9bccba [K/N][tests] Close stdin after piping all the data ^KT-61259 2023-11-29 16:22:28 +00:00
Alexander Shabalin 97a86e0ee3 [K/N][tests] Add global TEST_KIND override ^KT-61259 2023-11-29 16:22:28 +00:00
Sergey Bogolepov fea73ae64a [Swift Export] Minor tests fixes and adjustments 2023-11-29 14:04:00 +00:00
Sergey Bogolepov 5eeb82bb6f [Swift Export] Update sir-compiler-bridge to use SIR
Now that SIR has finally landed in the repository, we can remove
unnecessary entities from the bridge generator.
2023-11-29 14:03:59 +00:00
Artem Olkov a040954f68 rrn/rd/KT-63270-swift-printer
KT-63270: add swift printing capabilities to SIR

Co-authored-by: Artem Olkov <artem.olkov@jetbrains.com>
Co-authored-by: Sergej Jaskiewicz <jaskiewiczs@icloud.com>


Merge-request: KT-MR-13191
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-11-29 14:03:59 +00:00
Sergey Bogolepov ec82d54ef7 [Swift Export] Fix test infrastructure according to the review 2023-11-28 18:00:43 +00:00
Gleb Lukianets c3725ec8c8 rrn/rd/KT-63266/sir-gen
Swift Export: generated sir snapshot

Merge-request: KT-MR-13128
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-11-28 18:00:43 +00:00
Artem Olkov 1f4099833a KT-63269: add dependency on dist for sir-analysis-api tests, as they are dependent on JVM dist
Merge-request: KT-MR-13142
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2023-11-28 18:00:43 +00:00
Sergey Bogolepov 58bef34b9c [Swift Export] Rename tests generation tool
Now it generates test-cases for sir-compiler-bridges as well,
so it makes sense to move away from Analysis API in its name.
2023-11-28 18:00:43 +00:00
Sergey Bogolepov fe9ab0a1fc [Swift Export] KT-63516
Add a sir-compiler-bridge module that adds Kotlin and C bridges
for SIR. As SIR is still WIP, the module accepts `BridgeRequest`
instances instead of SIR elements.
2023-11-28 18:00:43 +00:00
Artem Olkov 7c15e3f229 KT-63269: implementation for SIRGenerator with top-level functions
KT-63269: add test generator

Merge-request: KT-MR-12945
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2023-11-28 18:00:43 +00:00
Sergey Bogolepov cc14f11e2a [Swift Export] initial infrastructure for Swift IR
New modules 'sir', 'sir-passes', and 'sir-analysis-api' were added under
'native:swift' for creating and manipulating Swift IR elements.

* `sir` contains the implementation of Swift IR.
* `sir-analysis-api` contains translation from Analysis API to SIR.
* `sir-passses` contains transformation passes.

This groundwork will allow to progress with the Swift IR.
2023-11-28 18:00:43 +00:00
Stanislav Ruban 269b60b420 [tests] Add a test case for KT-61978
^KT-61978 Obsolete
2023-11-27 15:50:46 +00:00
Dmitriy Novozhilov 06af6adf4f [Test] Unify all fir2ir facades for non-jvm platforms
Setup of fir2ir for JS, Native and Wasm is very similar, so it makes
  sense to extract all common parts of it into common base facade
2023-11-27 10:17:54 +00:00
Dmitriy Novozhilov e38b25c278 [FIR2IR] Make convertAndActualize method the only entrypoint to fir2ir
Fir2Ir conversion consists of multiple steps with complex logic (like
  conversion of each module, actualization, plugins application, constant
  evaluation), and to ensure that they all are executed correctly it's
  convenient to have the single entry point for all this machinery
2023-11-27 10:17:54 +00:00
Dmitriy Novozhilov 075010b14e [Test] Get rid of some properties in IrBackendInput
`fir2IrComponents`, `irActualizerResult` and `dependentIrModuleFragments`
  were used in `IrActualizerAndPluginsFacade`, which was removed in the
  previous commit
2023-11-27 10:17:54 +00:00
Ivan Kochurkin 115d685d91 [FIR] Fix ambiguity of Throws and other std annotations importing
Including `SharedImmutable` and `ThreadLocal`

Simplify code, remove `DefaultImportPriority.KOTLIN_THROWS`

Introduce `FirNativeClassMapper`
2023-11-23 23:51:23 +00:00
Vladimir Sukharev 5ea59f57d6 [K/N] Verbose possible cinterop tool exceptions
^KT-59288
2023-11-23 18:36:00 +00:00
Kirill Rakhman 11ab90ecbd [Tests] Add regression test for #KT-63732 2023-11-23 14:24:47 +00:00
Stanislav Ruban ec995fc847 [tests] Regenerate configurations for box-tests 2023-11-23 09:34:15 +00:00
Brian Norman c1f6fe1e76 [FIR] Do not include transitive friend dependencies in symbol provider
When flattening a dependency FirSymbolProvider, make sure transitive
dependency FirSymbolProviders are not included. This requires checking
that nested symbol provider sessions match the composite symbol provider
session when they are both source sessions.

^KT-60614 Fixed
2023-11-22 19:43:24 +00:00
Vladimir Sukharev 6cff71e7d1 [K/N] Add objc-related clang options to cinterop executable tests
^KT-63287
2023-11-22 11:18:09 +00:00
Ivan Kylchik 8715bd6189 [IR] Don't evaluate expressions in inner class of an annotation 2023-11-21 09:48:58 +00:00
Ivan Kylchik 3fa82c7bb1 [K2] Properly evaluate complex boolean constants
Some boolean expressions could be transformed into `IrWhen`
node. To understand that this node is actually
a boolean expression, we need to analyze its origin.

#KT-62683
2023-11-21 09:48:57 +00:00
Dmitrii Gridin b3b184f00d [FIR] add more tests diagnostic tests on data and delegated classes
^KT-63522
^KT-63512
^KT-63042
2023-11-21 08:11:20 +00:00
Mikhail Glukhikh a139965231 K2: reproduce KT-63164 2023-11-17 20:29:58 +00:00
Artem Kobzar e64068cf82 [K/JS, K/Wasm, K/Native] Process anonymous initializers inside classes as a part of their primary constructors ^KT-61929 Fixed 2023-11-17 13:04:34 +00:00
Alexander Shabalin 9ad7b00613 [K/N] Migrate some runtime/workers tests to new testing infra ^KT-61259 2023-11-17 07:42:28 +00:00
Stanislav Ruban 6edc742934 [tests] builder inference test-set: regenerate diagnostic & codegen tests 2023-11-17 07:02:15 +00:00