Commit Graph

1131 Commits

Author SHA1 Message Date
Igor Chevdar 750bb5c8c4 [K/N][IR] Added proper parent 2023-02-14 07:30:44 +00:00
Pavel Punegov a9cae3fe87 [K/N][build] Cleanup obsolete build tasks
* Remove obsolete reporting
* Remove old build tasks: BuildPusher and CollisionDetector
* Gradle build file cleanup
* Remove old wrappers

Merge-request: KT-MR-8788
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-02-13 14:02:28 +00:00
Svyatoslav Scherbina f78ffcb300 [K2/N] Unignore three tests fixed by basic forward declarations support
These tests got fixed by b19058c.

^KT-56028
2023-02-13 10:01:12 +00:00
Svyatoslav Scherbina 1c5335302d [K2/N] Unignore mistakenly ignored testValuesGenericsFramework 2023-02-13 10:01:12 +00:00
Vladimir Sukharev 7bce6d21f0 Disable in K2 tests that fail for two-stage
Merge-request: KT-MR-8786
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-10 16:59:25 +00:00
Stanislav Erokhin bec9ad0f6b Minor. Rename FunctionClassDescriptor#functionKind -> functionTypeKind
This commit is needed for the following commit.
There we will restore the compatibility API with Android IDEA plugin
2023-02-10 16:01:04 +00:00
Igor Chevdar a14f3c8cc2 [K/N] Fixed wrong initializer call extraction for interop-visible functions
#KT-56521 Fixed
2023-02-10 15:45:11 +00:00
Igor Chevdar 2281d9700d [K/N] Added a test for #KT-56521 2023-02-10 15:45:10 +00:00
Pavel Kunyavskiy c400a75407 [K/N] Fix tests failing because of phase renaming 2023-02-10 12:58:22 +00:00
Vladimir Sukharev 6e434748d1 [K2/N] Run new stdlib tests also for K2.
Merge-request: KT-MR-8708
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-10 10:34:44 +00:00
Sergey Bogolepov f86d28449f [K/N] Make -Xprofile-phases print profile of LLVM passes 2023-02-10 10:20:30 +00:00
Pavel Kunyavskiy 120ca08740 [K/N] Rework LLVM pipeline
Compiler was running LTO pipeline without preliminary running normal
optimisation pipeline. In some cases this lead to unacceptably long
compilation.

Also, this allows disabling LTO pipeline part, having still quite
good performance, but much better compilation time.

Co-authored-by: Johan Bay <jobay@google.com>

^KT-55868
2023-02-09 14:30:39 +00:00
Sergey Bogolepov f7d3312ad5 [K/N] Finish refactoring TempFiles usages
1. Introduce CExportFiles class
This class aggregates all files that are created specifically for
C export. Adding more such classes for other output kinds should
help getting rid of OutputFiles class.

2. Remove NativeGenerationState.tempFiles
Making NativeGenerationState (and compiler phases in general)
unaware of files and their lifetime is necessary for making phases
simpler and easier to compose.
2023-02-09 08:20:34 +00:00
Sergey Bogolepov 4fbddf1786 [K/N] Pass NativeGenerationState components as parameters
tempFiles is finally moved to the driver.
2023-02-09 08:20:34 +00:00
Sergey Bogolepov b7b85177a7 [K/N] Refactor module splitting for backend
We want to extract tempFiles from NativeGenerationState.
To do so, we need to move creation of NativeGenerationState from
`splitIntoFragments` function and untie CacheLlvmModuleSpecification
from NativeGenerationState
2023-02-09 08:20:34 +00:00
Sergey Bogolepov eba1b4c388 [K/N] Untie DependenciesTracker from NativeGenerationState 2023-02-09 08:20:33 +00:00
Sergey Bogolepov 7402ef24bb [K/N] Remove obsolete TempFiles constructor parameter 2023-02-09 08:20:33 +00:00
Sergey Bogolepov 6a06be08cd [K/N] Extract pre-link from linker and a bit of refactoring
Finish extracting all usages of TempFiles to the driver.
2023-02-09 08:20:32 +00:00
Sergey Bogolepov e6081e5851 [K/N] Extract cache management in linker to a separate file
Also, more meaningful names.
2023-02-09 08:20:32 +00:00
Sergey Bogolepov 2f1e9844df [K/N] Move temp file from BitcodeCompiler to the driver
Continue extracting all temporary files to the driver, so we have
a better control over them. For example, this allows creating of a new
driver where pipeline split between multiple compiler invocations.
2023-02-09 08:20:31 +00:00
Sergey Bogolepov a11be433e2 [K/N] Get rid of predefined values in TempFiles
One step closer to getting rid of this class at all.
2023-02-09 08:20:31 +00:00
Sergey Bogolepov 1182903b20 [K/N] Move c++ adapter compilation to a separate phase
Besides purely architectural reasons or, rather, as a
direct effect of those, it allows moving tempFiles usages
to the driver.
2023-02-09 08:20:30 +00:00
Sergey Bogolepov bb1feabb79 [K/N] Untie C header generation from NativeGenerationState 2023-02-09 08:20:29 +00:00
Sergey Bogolepov 8516ae2b72 [K/N] Extract C header generation to a separate phase 2023-02-09 08:20:29 +00:00
Sergey Bogolepov 818b738921 [K/N] Fix context.log in NativeGenerationState phases 2023-02-09 08:19:47 +00:00
Dmitriy Dolovov 469a2315fc [Native] Move BuiltinOperatorLowering to a later stage of the lowerings pipeline
This would allow using unlowered operator symbols from IrBuiltIns in all lowerings before BuiltinOperatorLowering.
2023-02-09 08:07:15 +00:00
Sergey Bogolepov de444542d0 [K/N] Make target deprecation warning more visible
Two columns in Gradle output makes IDE display such
message in a separate view which makes it more discoverable.
2023-02-08 09:31:30 +00:00
Igor Chevdar 12d0b1e846 [K/N][codegen] Fixed wrong arguments evaluation order for IrSetField
#KT-56326 Fixed
2023-02-08 06:56:09 +00:00
Svyatoslav Scherbina d8bae5a6f8 [FIR] Implement support for MPP in Native
^KT-56071
2023-02-07 14:16:30 +00:00
Alexander.Likhachev 67c4dc3cce [Gradle, K/N] Stop using enableEndorsedLibs Gradle flag, make it Error
#KT-54098 Fixed
2023-02-06 19:24:05 +00:00
Pavel Kunyavskiy abbf11e8e1 [K/N] Mark immutable temp variables as immutable
This optimizes 5000 enum entries enum compilation time from "I can't wait" to around 1 minute.
2023-02-06 08:34:11 +00:00
Svyatoslav Scherbina 1828f7a374 Native: fix curl sample test 2023-02-03 15:30:56 +00:00
Igor Chevdar 32ce254001 [K/N] Added a filecheck test on suspend lambdas tail calls 2023-02-03 11:14:54 +00:00
Igor Chevdar c871ccc4dd [K/N][IR] Turned off partial tail call optimization
It is difficult to implement properly tail calls for a real coroutine (when there
are other non tail calls), because of continuation interception semantics. And the
benefits aren't clear at this point, so let's turn it off for now.
2023-02-03 11:14:53 +00:00
Igor Chevdar 716853dd00 [K/N][IR] Tail call optimization for suspend lambdas 2023-02-03 11:14:53 +00:00
Dmitriy Novozhilov 89c42e20c9 [FIR] Consistently use _function_ instead of _functional_ in names of classes and functions 2023-02-02 08:24:52 +00:00
Dmitriy Novozhilov 67aa80562d [FE] Completely replace FunctionClassKind with FunctionalTypeKind
FunctionalTypeKind can be used in FE 1.0 too, so there is no need to
  keep both classes. Also, removal of FunctionClassKind simplifies work
  with FunctionalTypeKind in common code, like Analysis Api
2023-02-02 08:24:50 +00:00
Sergey Bogolepov 6c449e29cd [K/N] Add a link for the target deprecation message 2023-02-02 08:24:02 +00:00
Sergey Bogolepov 02c46d17aa [K/N] Add a trivial test coverage for use Foundation 2023-02-01 15:34:26 +00:00
Mark Mann ba4ba27afd Fix regression where was removed from generated modulemaps 2023-02-01 15:34:25 +00:00
Vladimir Sukharev 26b6c0b310 [K2/N] Unlock old testinfra runs with K2 frontend
Merge-request: KT-MR-8552
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 15:28:14 +00:00
Nikita Bobko 62b27b4613 Cleanup: drop KlibIrVersion
Review: https://jetbrains.team/p/kt/reviews/8401
In scope of: KT-55082

Because this version isn't used for anything. We have KotlinAbiVersion
to version the IR format.
2023-02-01 15:13:34 +01:00
Vladimir Sukharev 08489c5734 [K2/N] KT-56218 Serialize receiver annotations
Merge-request: KT-MR-8624
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-02-01 13:33:55 +00:00
Ivan Kochurkin 6bdd0edd6c [FIR2IR] Add Fir2IrCommonMemberStorage, get rid of merge in Fir2Ir storages
Extract DescriptorSignatureComposerStub and WrappedDescriptorSignatureComposer to separate classes
2023-02-01 11:42:46 +00:00
Ivan Kochurkin e601b01be2 [FIR2IR] Use single IrBuiltInsOverFir for all MPP source modules
^KT-56229 Fixed
2023-02-01 11:42:45 +00:00
Ivan Kochurkin 001b11f285 [FIR2IR] Use single SymbolTable and SignatureComposer for all MPP modules
Merge createModuleFragmentWithSignaturesIfNeeded and createModuleFragmentWithoutSignatures
into the createModuleFragmentWithSignaturesIfNeeded
2023-02-01 11:42:44 +00:00
Sebastian Sellmair b6ea04d789 [K/N] Don't add linkDependencies when serializing a metadata klib
^KT-56205 Verification Pending
2023-01-31 16:15:19 +00:00
Nikita Nazarov fe5a8f664a Add debug information for inline function parameters (#5050)
Add debug information for inline function parameters

Previously during debugging Kotlin/Native applications you couldn't inspect the inline function or inline lambda parameters. This happened because the debug information for them wasn't generated at all. To fix this issue we have to store the information about which expressions were inlined instead of which parameters. This commit adds a new mapping, which allows storing the required information during the inlining phase. The mapping is then reused during the bitcode generation phase to add the debug information for inline function parameters.

^KT-55440
2023-01-31 11:02:48 +01:00
Pavel Kunyavskiy cb655d2d37 [K/N] Fix work with adapted function references
Their parsing was totally incorrect for K2, and sometimes incorrect for
K1. After this commit it uses same code as for JVM.

^KT-55462
2023-01-30 19:44:49 +00:00
Svyatoslav Scherbina 7ef7d0e062 Native: fix Deprecation ObjCExport test after updating version to 1.9
Starting from language version 1.9, deprecation is not propagated
through overrides (see KT-47902 for more details).
As a result, after updating langauge version to 1.9 in 66544a4,
testObjCExport started to fail, because it expected the old behaviour.
This commit updates the test correspondingly.
2023-01-30 15:45:18 +00:00