Ilya Chernikov
e5ee364419
IC: Implement expect/actual tracking
...
fixes NewMultiplatformIT.testIncrementalCompilation
also #KT-61590 fixed
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh
fc2041e5b9
LV 2.0: allow unstable dependencies in kotlin-native/build-tools
...
Without this commit, build of this module fails during bootstrap
with FIR_COMPILED_CLASS
2023-09-19 15:46:29 +00:00
Konstantin Tskhovrebov
4ad5be35f4
KT-56369: [cinterop] Throw an error for an unexpected module imports
...
Module imports require explicit '-fmodules' compiler flag.
If the indexer meets a module import but there is no the flag
then it throws an error.
2023-09-19 15:23:52 +00:00
Pavel Kunyavskiy
71128e232e
[K/N] Avoid creating fake overrides before setting class parent
...
This fixes a tests crash introduced in #KT-61366 fix.
2023-09-19 12:04:05 +00:00
Pavel Kunyavskiy
aef5290210
[K/N] Change test to make aggregate green.
...
The test is using error suppressing, so breaking it is fine.
^KT-62015
2023-09-18 20:02:36 +00:00
Igor Chevdar
2b8bcfda94
[K/N][codegen] Build trampolines for abstract fake overrides
...
#KT-61924 Fixed
2023-09-15 09:26:54 +00:00
Vladimir Sukharev
f5bd7cee05
[K/N] Adjust filecheck tests for atomic intrinsics to -opt mode
...
^KT-60514 Fixed
Merge-request: KT-MR-12179
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-13 17:46:22 +00:00
Alexander Shabalin
c637a228eb
[K/N] Fix filecheck kt53621 tests on linux arm64.
...
For aarch64-unknown-linux-gnu clang generates i1 to represent bool.
On our other targets it generates as zeroext i1 instead.
2023-09-13 16:55:09 +00:00
Sergej Jaskiewicz
9eba17d631
[K/N] Move Native-specific mangle constants to more suitable places
...
They shouldn't be mixed with target-independent constants.
2023-09-13 14:25:12 +00:00
Sergej Jaskiewicz
ddfd94b3b2
[K/N] Move KonanMangler to a new common module
...
^KT-61248 Fixed
2023-09-13 14:25:10 +00:00
Sergej Jaskiewicz
d1127f1a31
[K/N] Move IR-related ObjC interop helpers to a new common module
...
This is a step towards KT-61248. We need those helpers to be available
in non-Native-specific code.
2023-09-13 14:25:09 +00:00
Sergej Jaskiewicz
5cb252fe49
[descriptors] Move DeclarationDescriptor#findPackage helper to core
...
There is nothing serialization-specific about this function
2023-09-13 14:25:09 +00:00
Sergej Jaskiewicz
dff2d2ed60
[descriptors] Move some annotation-related utilities to the core module
...
- AnnotationDescriptor#argumentValue is not frontend-specific
- AnnotationDescriptor#getAnnotationStringValue is not Native-specific
We are going to need these functions in the IR code, so it makes
sense to factor them out to the core module.
2023-09-13 14:25:08 +00:00
Sergej Jaskiewicz
56cb0bf071
[utils] Move atMostOne to core/util.runtime
...
There is nothing backend-specific about this helper function.
2023-09-13 14:25:08 +00:00
Alexander Udalov
fd68b9f49c
CLI: add -Xuse-ir-fake-override-builder
...
To be able to test IR fake override builder (KT-61514) outside of
compiler tests.
2023-09-13 15:01:52 +02:00
Alexander Shabalin
503c1a2eb6
[K/N] Fix kt53261_noinline_NonNullNativePtr.kt with K2
2023-09-13 12:15:57 +00:00
Timofey Solonin
9e7d9f3b53
Use llbuild.framework bundled with the internal toolchain
...
^KT-61369
2023-09-13 10:12:51 +00:00
Igor Chevdar
9d2d75313b
[K/N][tests] Added a test for anonymous object in a top level inline fun
2023-09-13 09:18:26 +03:00
Igor Chevdar
b66a6fcc08
[K/N][IR] Moved local declarations names invention down the pipeline
2023-09-13 09:18:26 +03:00
Igor Chevdar
ac760cbbfb
[K/N][tests] Refactored a bit test
...
arguments of assertEquals are (expected, actual), not vice versa
2023-09-13 09:18:26 +03:00
Vladimir Sukharev
e0e2a57e3d
[K/N] Add filecheck tests for atomic intrinsics
...
https://youtrack.jetbrains.com/issue/KT-60514/Add-llvm-filecheck-tests-for-atomic-intrinsics
Merge-request: KT-MR-12067
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com >
2023-09-11 21:28:34 +00:00
Igor Chevdar
1ff7841ac7
[K/N][IR] Renamed PreInlineLowering to TypeOfLowering
2023-09-11 18:16:25 +00:00
Igor Chevdar
8f3b9694f7
[K/N] Extracted asserts removal to a separate lowering
2023-09-11 18:16:25 +00:00
Igor Chevdar
e8ca45378b
[K/N] Moved couple of phases down the pipeline
2023-09-11 16:31:22 +00:00
Svyatoslav Scherbina
0cd91d9286
Native: fix filecheck_signext_zeroext_objc_export and enable it back
...
Previously filecheck_signext_zeroext_objc_export test was disabled
after making one-stage compilation mode implemented through two-stage
mode (KT-59245).
That change made the compiler sort the methods, and filecheck patterns
didn't match that order after that.
This commit fixes the test by adding sorted prefixes to method names,
so sorting alphabetically them doesn't really change the order.
2023-09-11 13:49:36 +00:00
Svyatoslav Scherbina
f77f83e741
Native: fix support for cross-target filecheck tests
...
There was a minor mistake in the build script configuration, leading to
a missing task dependency when running the tests with
`-Pkotlin.native.home=`.
More specifically, the build script was checking if the cross-dist for
the main tests target (`-PtestTarget=`) is in place, but instead it
should have checked if the cross-dist for the test cross-target
(`test.targetName`) is in place.
This commit fixes the check, and thus adds the missing task dependency.
2023-09-11 13:49:35 +00:00
Ivan Kylchik
5d88a1f1c3
[Native] Rename Lowerings to NativeLoweringPhases
...
This is done to unify the way how we name file
that contains lowerings in different backends.
2023-09-11 10:04:50 +00:00
Aleksei.Glushko
6405a174e2
[K/N] Do not CAS when marking newly allocated object
...
Merge-request: KT-MR-12038
Merged-by: Alexey Glushko <aleksei.glushko@jetbrains.com >
2023-09-09 12:42:54 +00:00
Alexander Shabalin
2f22b0a6b0
[K/N] Migrate runtime/atomics tests to new testing infra ^KT-61259
2023-09-09 07:25:35 +00:00
Alexander Shabalin
eb0a301a8f
[K/N] Update CallsChecker list
2023-09-08 17:13:00 +00:00
Alexander Shabalin
a8cec11772
[K/N] Protect filecheck tests for KT-53261 from DCE.
2023-09-07 15:35:57 +00:00
Alexander Shabalin
49814ecb8a
[K/N] Remove std_support allocation code ^KT-59008
2023-09-07 09:32:00 +00:00
Johan Bay
1e66f25546
[K/N] Link small bitcode modules together first
...
Repeatedly linking many smaller bitcode modules into one large is very
slow. We are seeing a 10x improvement by instead linking all the small
modules together first and link the result into the larger main module.
This commit implements this optimization in the
LinkBitcodeDependenciesPhase phase.
^KT-61604 Fixed
Co-authored-by: Johan Bay <jobay@google.com >
2023-09-07 07:44:31 +00:00
Alexander.Likhachev
357d12fc8e
[Build] Move JUnit dependencies into the version catalog
...
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander Shabalin
798e832943
[K/N] Remove fast paths phase checks in parallel mark ^KT-61741
2023-09-06 16:41:14 +00:00
Alexander Shabalin
f47a09e55e
[K/N] Move allocator-specific data into allocators. ^KT-60928
2023-09-06 14:18:08 +00:00
Alexander Udalov
1d5ade1166
K2: minor, remove misleading FirMemberDeclaration.containerSource
...
"Container source" means "the source of the container". So, if you
called this extension on a class (`FirClassLikeDeclaration`), it was
reasonable to assume that you would get the source of its _containing
class_, whereas the function actually returned the source of the class
itself.
Instead of inventing another name for this function, I've decided to
inline and remove it because it has only one usage.
2023-09-06 08:05:34 +00:00
Alexander Shabalin
f4289e1287
[K/N] Enable concurrent weak processing ^KT-61093
2023-09-05 13:53:35 +00:00
Ivan Kylchik
40c9f831e2
[Native] Drop IrUtils2 file
2023-09-05 11:21:51 +00:00
Ivan Kylchik
8142ae2579
[Native] Drop irCatch from IrUtils2
2023-09-05 11:21:51 +00:00
Ivan Kylchik
c2076a0227
[Native] Move hasNonConstInitializer from IrUtils2
...
This function could be useful for other backends.
2023-09-05 11:21:51 +00:00
Ivan Kylchik
ddde95bd78
[Native] Move irByte from IrUtils2
...
We already have similar functions in `ExpressionHelpers`. Makes
sense to keep them together.
2023-09-05 11:21:51 +00:00
Ivan Kylchik
d62323cdf1
[Native] Move addTopLevelInitializer from IrUtils2
...
This function is actually used only in `InteropLowering` and it
is too specific to be included into utils.
2023-09-05 11:21:51 +00:00
Ivan Kylchik
5cd96831dc
[Native] Move isRestrictedSuspendFunction from IrUtils2
...
This function is also helpful for JVM backend.
2023-09-05 11:21:50 +00:00
Ivan Kylchik
2657adc6dc
[Native] Move addFile from IrUtils2
...
This function is actually used only in `BackendPhases` and it is
too specific to be included into utils.
2023-09-05 11:21:50 +00:00
Ivan Kylchik
4fb29a5e12
[Native] Drop addArguments from IrUtils2
...
We can simplify single usage of this function
2023-09-05 11:21:50 +00:00
Ivan Kylchik
20165dd699
[Native] Drop defaultOrNullableType from IrUtils2
...
We can simplify most usages of `defaultOrNullableType`
2023-09-05 11:21:50 +00:00
Ivan Kylchik
583a5496d5
[Native] Drop irCall from IrUtils2
...
We can reuse the same function from common `ExpressionHelpers`
2023-09-05 11:21:50 +00:00
Ivan Kylchik
5c68ea2b64
[Native] Simplify irCatch from IrUtils2
2023-09-05 11:21:50 +00:00
Ivan Kylchik
8cc4db39d2
[Native] Drop copy from IrUtils2
...
It is not used anywhere
2023-09-05 11:21:50 +00:00