Commit Graph

1944 Commits

Author SHA1 Message Date
Vladimir Sukharev 44f638e952 Drop K/N dependency to JCenter 2022-11-03 10:51:56 +00:00
Pavel Punegov 8483f0a227 [K/N][build] Fix kotlin-native.jar compiler dependencies
Merge-request: KT-MR-7553
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-01 16:46:23 +00:00
Vladimir Sukharev f099c190f7 Parallelize platformLibs build on macos_arm64 2022-11-01 15:07:07 +00:00
Pavel Punegov 00e9544670 [K/N][perf] Set project properties for benchmarksAnalyzer build
Merge-request: KT-MR-7520
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-11-01 13:44:29 +00:00
Alexander Shabalin 5ef9a5a240 [K/N] Crash with OOM on large array allocations ^KT-54659
Merge-request: KT-MR-7507
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-11-01 11:00:23 +00:00
Alexander Shabalin 3a35dd2947 [K/N] Mute stress_gc_allocations on mingw_x64 ^KT-54727
Merge-request: KT-MR-7528
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-10-31 11:09:50 +00:00
Igor Chevdar 873b84491d [K/N][codegen] Fixed bug with huge arrays during escape analysis
Escape analysis tried to allocate some very big arrays on the stack
because an overflow happened during size computation
2022-10-27 16:23:43 +03:00
Dmitriy Novozhilov e73049dfb0 [Native] Add workaround for KT-54668 2022-10-27 11:08:57 +00:00
Dmitriy Novozhilov f2cc5310b9 [Native] Fix code to make it compilable with K2
Check KT-54663 for details
2022-10-27 11:08:56 +00:00
Pavel Punegov 2d8035ba9f [K/N][build] Add test for intellij-deps-fastutil and openapi
Test that jars in the distribution contain desired libraries
2022-10-26 15:36:49 +00:00
Pavel Punegov 59d9da05fe [K/N][build] Add intellij-deps-fastutil dependency explicitly
Fastutil is required by the CLICompiler.
compilerApi dependencies are used to create shadow jar kotlin-native.jar
2022-10-26 15:36:48 +00:00
Troels Bjerre Lund 80b50bcd21 [K/N] Improve performance benchmark build
This unlinks the benchmarksAnalyzer build from being configured automatically
whenever any benchmark build is.

Co-authored-by: Troels Lund <troels@google.com>
2022-10-26 13:02:24 +00:00
Troels Bjerre Lund c6e4d034cb [K/N] Fix large array allocations ^KT-54659
If the count argument is above 2**29, then memberSize does not fit in
uint32_t.

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

Merge-request: KOTLIN-MR-533
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2022-10-25 19:18:54 +00:00
Igor Chevdar 94a2479015 [K/N][IR] Replaced end-to-end indexing with in-file one
We don't want the names of classes/functions to be dependant on the files order,
this could be bad for per-file caches and/or incremental compilation.
2022-10-25 17:44:07 +00:00
Igor Chevdar 7a7f1d559d [K/N][IR] Refactored a bit FunctionReferenceLowering 2022-10-25 17:44:06 +00:00
Pavel Punegov c098ba789c [K/N][perf] JS IR Gradle DSL syntax changed to JS
Merge-request: KOTLIN-MR-532
Merged-by: Pavel Punegov <pavel.punegov@jetbrains.com>
2022-10-24 17:58:18 +00:00
Pavel Punegov 259d58c817 [K/N] Rename jsIr preset usage back to js
Merge-request: KT-MR-7467
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-10-24 10:44:23 +00:00
Pavel Punegov ae7404878f [K/N][test] Add test on jar contents.
* Check jar for included entries.
* Small changes to embeddable jar smoke test.
* Delete not used test.
2022-10-21 10:33:41 +00:00
Pavel Punegov d2c58cdd27 [K/N][build] Dependencies fixes: trove4j and kotlin-compiler
* Depend on kotlin-compiler project instead of its runtimeElements only
* trove4j fixes: add as a dependency and use common version
* Strip dependencies in different projects: remove unnecessary
2022-10-21 10:33:40 +00:00
Martin Petrov 6c0b4bcfd4 [KT-54284][Native] Produce deterministic klibs from cinterop. (#4979)
Pass in temp-file C sources to clang via stdin instead of by name.
This prevents absolute paths of temp files from being encoded in bitcode.
2022-10-21 12:16:34 +02:00
Dmitriy Dolovov 71d51801ce [IR] Partial linkage fix: Implement abstract fake overrides in non-abstract classes so that there are no call sites that still refer to abstract fake overrides
^KT-53663
2022-10-20 10:18:54 +02:00
Dmitriy Dolovov 2f9d6f6c44 [IR] Partial linkage: Rename UnlinkedDeclarationsSupport to PartialLinkageSupport 2022-10-19 13:46:22 +00:00
Dmitriy Dolovov 15635482aa [IR] Partial linkage: Enable it by just passing a boolean flag to IR linker constructor 2022-10-19 13:46:22 +00:00
Dmitriy Dolovov a0fdf08b56 [IR] Partial linkage: unify UnlinkedDeclarationsSupport for JS and Native backends 2022-10-19 13:46:21 +00:00
Sergey Bogolepov c6bbce986d [K/N] Fix KT-54498
Forward users to kotlinlang.org instead of new_mm.md because the latter
is obsolete now.
2022-10-17 14:36:59 +00:00
Pavel Punegov bc33f84678 [K/N] Choose watchOS simulator depending on Xcode version
Merge-request: KT-MR-7410
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2022-10-17 12:52:52 +00:00
Sergey Bogolepov 56602290ec [K/N] Decompose ObjCExport framework generator
Split framework generation into several specialized classes
to reduce coupling.
2022-10-14 06:12:06 +00:00
Sergey Bogolepov 6a4722188f Extract SameTypeNamedCompilerPhase from NamedCompilerPhase
Currently, compiler pipelines are heavily couples with
NamedCompilerPhase. Unfortunately, NamedCompilerPhase uses the same
type for Input and Output, thus it is not applicable to phases that
try to transform some data purely.
Thus, we separate this class into two, allowing to have a new
inheritor of NamedCompilerPhase with different Input and Output types.
2022-10-13 08:25:26 +00:00
Sergey Bogolepov e1f2b89875 Untie Symbols class from CommonBackendContext
`Symbols.context` property is actually unused. Let's drop
it as it makes harder to create an instance of this class.
2022-10-13 08:24:11 +00:00
Sergey Bogolepov 54deba63a1 Use PhaseConfigurationService in CompilerPhase instead of PhaseConfig 2022-10-13 06:39:39 +00:00
Johan Bay bc13173ea9 [K/N] cinterop: Do not expand non-constant macros
Expanding macros such as __FILE__ or __TIME__ exposes
arbitrary generated filenames and timestamps from the compiler
pipeline which are not useful for interop and makes the klib
generation non-deterministic. This patch instead redefines
the macros to just map to their name in the properties
available from Kotlin.

Co-authored-by: Johan Bay <jobay@google.com>
2022-10-12 16:54:00 +00:00
Svyatoslav Scherbina 2987340edd Get rid of unsafe cast function usages in :kotlin-native:backend.native 2022-10-11 15:11:36 +00:00
Pavel Punegov 51e337a148 [K/N] Fix watchOS-simulator device name changed in XCode 14 2022-10-11 15:11:01 +02:00
Pavel Punegov b0b3698698 [K/N][build] Make kotlin-native.jar archive version empty
Gradle base plugin sets convention to project's version that can be
SNAPSHOT that brakes name of the archive
2022-10-11 12:50:13 +00:00
Svyatoslav Scherbina 527e8dde27 docs: add more links for contributing to Kotlin/Native 2022-10-10 14:55:36 +00:00
Pavel Kunyavskiy b01808ddf5 [K/N] Fix deprecations and warnings in performance infra 2022-10-10 13:14:35 +00:00
Igor Chevdar 4ac9e49abd [K/N][codegen] Moved llvmContext from global scope to generationState 2022-10-07 17:32:26 +00:00
Svyatoslav Scherbina 28dea9d949 Native: remove obsolete compiler flags that have no effect
Same for compiler configuration keys.
2022-10-07 15:33:42 +00:00
Alexander Shabalin 5c9802ae84 [K/N] Optimize intrusive_forward_list usage in GCs ^KT-54163
* Add fallible push to intrusive_forward_list.
* Add fallible pop to intrusive_forward_list.
* Get rid of size_ member in intrusive_forward_list.
* Force all intrusive_forward_list items to have non-null next().
* Get rid of explicit colors in STMS and CMS.
* Do not queue weak reference for later processing in Mark.

Merge-request: KT-MR-7263
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-10-06 20:16:53 +00:00
Sergey Bogolepov d7fff3ca01 [K/N] Add -Xforce-compiler-driver=(static, dynamic) flag
Useful for development purposes when one wants to compare
the outputs of different drivers.
2022-10-06 13:10:50 +00:00
Sergey Bogolepov 6ef4277d89 [K/N] Introduce multiple compiler drivers
We want to move from current compilation pipeline
that is defined in TopLevelPhases.kt to a "dynamic" one.
The main drawback of the current one is that it is built
around single Context, single IR module, single compiler output, etc.
It is now as flexible as Kotlin/Native compiler requires.
For example, it is pretty hard to support multiple Apple frameworks
or a proper separate compilation.
To mitigate this problem, we are going to move to a new "dynamic"
compiler pipeline that relies on an explicit data passing between
different compiler phases. For example, it allows to use single phase
output as an input for multiple independent subsequent phases. Or
vice versa, e.g. use outputs of multiple "produce object file" phases by
a single linker phase.

This commit introduces `CompilerDriver` hierarchy which is required
during transition period.
2022-10-06 13:10:50 +00:00
Pavel Punegov 6b97a7657d [K/N] Publish bundles to maven
Makes build be able to publish bundles to the maven. It uses common
properties and settings as all other Kotlin publications.
Add usage of the Gradle base plugin and correct version and name setting
for archive tasks
2022-10-06 12:18:48 +02:00
Igor Chevdar 05016596df [K/N][codegen] Refactored debug info building 2022-10-06 07:12:32 +00:00
Sergey Bogolepov 46feb00ee7 [K/N] KT-48100
Use `"frame-pointer"="all"` on arm64_32 watches.
Motivation: https://github.com/llvm/llvm-project/commit/152df3a
2022-10-05 13:23:49 +00:00
Sergey Bogolepov 94c705d608 [K/N] Remove LocalEscapeAnalysis
It was disabled for a long time because we have
a proper one now.
2022-10-05 08:31:32 +00:00
Sergey Bogolepov 2efcc21d21 [K/N] Extract KonanConfig-dependent methods from Context
Introduce ConfigChecks interface which can be reused between different
classes.
2022-10-05 08:31:32 +00:00
Sergey Bogolepov 60ee30a28d [K/N] Remove some unused code from Context 2022-10-05 08:31:32 +00:00
Sergey Bogolepov 2437e8a06c [K/N] Extract descriptors search from Context into a DescriptorsLookup
Reduces dependency on Context class in Kotlin/Native backend.
2022-10-05 08:31:31 +00:00
Pavel Kunyavskiy 0959255379 [K/N] Refactor GC logging and statistics
Same code is now used for GC logging in all gc versions.

^KT-53064
2022-10-04 18:44:58 +00:00
Pavel Kunyavskiy c4e2901a1d [K/N] Avoid inlining of ignored check on external call 2022-10-04 18:44:58 +00:00