Commit Graph

1545 Commits

Author SHA1 Message Date
Pavel Punegov d69df1898d [build] Advance kotlin-build-gradle-plugin version to 0.0.38 in the repo
Use build Gradle plugin version property
2022-04-08 14:42:35 +03:00
Elena Lepilkina 04da0ba55d [K/N][perf] Fix swiftinterop benchmarks linkTask names 2022-04-07 20:06:40 +03:00
Elena Lepilkina 23d66fabad [K/N][perf] Fix swiftinterop benchmrks 2022-04-07 20:06:40 +03:00
Elena Lepilkina 655ed0f7c8 [K/N][perf] Fix compile task name for debug binaries 2022-04-07 20:06:40 +03:00
Elena Lepilkina f401573e5c [K/N][perf] Added chart for execution time of debug binaries on performance server 2022-04-07 20:06:40 +03:00
Elena Lepilkina 087f7e3b31 [K/N] Added possibility to run only base part of benchmarks 2022-04-07 20:06:40 +03:00
Pavel Punegov 4b3a5ad875 [K/N][samples] Use compilations for libcurl dependency setting 2022-04-07 10:13:04 +00:00
Abduqodiri Qurbonzoda 1cb5cab28f [K/N and WASM] Fix ESCAPE and COMMENTS modes 2022-04-05 15:21:31 +00:00
Abduqodiri Qurbonzoda 187faa121e Test backreference to group with index zero 2022-04-05 15:21:29 +00:00
Abduqodiri Qurbonzoda 74121b26c0 Test octal literal in regex 2022-04-05 15:21:28 +00:00
Abduqodiri Qurbonzoda 46408ffd9d Fix tests by adjusting to platform behavior 2022-04-05 15:21:27 +00:00
Abduqodiri Qurbonzoda 9c4c1ed557 [K/N and WASM] Implement named capturing group in Regexes #KT-41890 2022-04-05 15:21:26 +00:00
Alexander Shabalin 421ad77740 [K/N] Simplify ObjectFactory ^KT-51436
Merge-request: KT-MR-5958
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-03-31 09:43:47 +00:00
Elena Lepilkina cb0acaa469 [K/N][perf] Small fixes for release builds and some type of benchmarks reports 2022-03-31 09:00:46 +00:00
Sergey Bogolepov 9b103b35cd [K/N] Replace destinationDir with destinationDirectory.
Breaking change was introduced in e9498c8.
2022-03-30 12:17:22 +03:00
Pavel Kunyavskiy 7ba4d9e1f0 Rework nullability in IR 2022-03-30 06:27:59 +00:00
Sergey Bogolepov 027c51653d [K/N] Fix -Ptest_compile_only for iosArm64 target
We don't need to configure Xcode or disable some tests when running
tests in compile-only mode.
2022-03-29 12:25:22 +00:00
Sergey Bogolepov f635e450df [K/N] Add trivial test for RemoveRedundantSafepoints phase 2022-03-29 11:52:26 +00:00
Sergey Bogolepov f90a56c131 [K/N] Introduce RemoveRedundantSafepointsPass
Since we do not inline Kotlin_mm_* functions on watchos_arm32 and
ios_arm32 targets, there are a lot of unnecessary subsequent safepoints.
To reduce binary size and avoid unnecessary safepoints we apply a simple
optimization: remove all calls to Kotlin_mm_safePointFunctionPrologue in
a basic block except the first one.

^KT-51737 fixed.
2022-03-29 11:52:25 +00:00
Sergey Bogolepov 30006b5143 [K/N] Add CMakeLists.txt to simplify work with libllvmext
Also moved functions that have nothing to do with code coverage
into a separate file.
2022-03-29 09:42:46 +00:00
Sergey Bogolepov 7dc48b3837 [K/N] Rename llvmCoverageMappingC to libllvmext
This subproject covers much wider scope now than code coverage,
so it makes sense to rename it to reflex that.
2022-03-29 09:42:45 +00:00
Sergey Bogolepov d7386dc315 [K/N] enable RuntimeLinkageStrategy.LinkAndOptimize for debug by default 2022-03-29 09:40:03 +00:00
Sergey Bogolepov 3723e2af52 [K/N] Allow to optimize runtime bitcode separately
Since runtime is split into several LLVM modules there is no LTO
optimizations between them during debug compilation because the latter
performs almost no optimizations to preserve debug info.
Of course, it affects runtime performance of debug binaries. To improve
it, we can link and aggressively optimize runtime modules and then link
optimized module into unoptimized Kotlin LLVM module.
This commit also introduces `linkRuntime` binary option that forces the
way we link runtime modules.
2022-03-29 09:40:02 +00:00
Svyatoslav Scherbina cf581738c3 Native: improve ClassCastException message for local classes
Previously it was like "null cannot be cast to MyObject" or
"MyObject cannot be cast to null", because `KClass.qualifiedName` is
`null` for local classes (including anonymous ones).

Use `KClass.toString()` instead, for both object actual dynamic type
and cast target type. This string representation is generally more
meaningful for such cases, and contains useful details for local
classes.
2022-03-28 08:21:55 +00:00
Evgeniy.Zhelenskiy b6f2513dd2 [FIR] Introduce valueClassRepresentation to FIR
#KT-1179
2022-03-24 11:38:44 +00:00
Elena Lepilkina d2c0234895 [K/N][perf] Fix url for buildserver 2022-03-24 08:22:30 +00:00
Victor Petukhov b5933c70e2 [FE 1.0] Refactor error utils: split error entities and introduce error type and error scope kinds 2022-03-23 21:13:33 +00:00
Svyatoslav Scherbina 42ed0c5fe6 Native: add .alloc(value) for primitive types to interop runtime
^KT-50312 Fixed
2022-03-22 18:49:09 +03:00
Svyatoslav Scherbina 19d13bb8bf ObjCExport: enable unitSuspendFunctionObjCExport=proper by default
For Unit-returning suspend functions ObjCExport now generates
completion handlers without redundant `KotlinUnit*` result parameter.

So Swift (5.5+) can import these functions as Void-returning async
functions.

unitSuspendFunctionObjCExport=legacy binary option can be used to
enable the legacy behaviour. It will be removed in a future release.

^KT-49928 Fixed
2022-03-22 15:42:35 +00:00
Pavel Punegov 0fa60ea75f [K/N][samples] Add else branch to make when exhaustive 2022-03-21 13:05:16 +00:00
Sergey Bogolepov 77c04e7d71 [K/N] Do not inline runtime functions in case of armv7 darwin targets
^KT-51649 fixed
2022-03-21 09:11:13 +00:00
Pavel Punegov 5851f757f5 [K/N][build] Add comment about dependency and cross build 2022-03-16 10:46:16 +00:00
Pavel Punegov ce5094e586 [K/N][build] Don't rewrite same stdlib parts during copy 2022-03-16 10:46:16 +00:00
Martin Petrov 2a1d5d3e0a [Native] Explicitly use Foundation in ObjC export. (#4762)
This enables using exported Frameworks with `-fmodules-decluse`.
One use-case for this is ensuring that distributed builds are
explicitly providing all required modules; this is important for
reproducibility.

For more background on `use` declarations, see:
https://clang.llvm.org/docs/Modules.html#use-declaration

The easiest way to reproduce this locally is by compiling a framework,
and emitting a pcm file with `swiftc`. Note that this requires a
reference to a pcm for Foundation, which can be found in the clang
ModuleCache.

```
kotlin-native/dist/bin/kotlinc-native ~/test.kt -produce framework -o /tmp/TestFramework.framework
swiftc -emit-pcm -module-name TestFramework -o /tmp/TestFramework.pcm /tmp/TestFramework.framework/Modules/module.modulemap -Xcc -fmodules-decluse -Xcc -fmodule-file=Foundation=$HOME/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/1IQ2SWDEIAPH0/Foundation-2FJBXN8U6QRTS.pcm
```
2022-03-16 12:15:50 +03:00
Alexander Shabalin 3b2a318c7d [K/N] Generalize Mark queue handling ^KT-51436
Merge-request: KT-MR-5904
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-03-15 10:36:16 +00:00
Elena Lepilkina f5bd210c08 [K/N] Remove outdated gradlew wrapper 2022-03-14 13:27:46 +00:00
Alexander Shabalin 53de23200d [K/N] Make GC scheduler parametrized by Clock. ^KT-48537 2022-03-14 13:21:40 +00:00
Alexander Shabalin e014e6b154 [K/N] Handle clock wrapping in RepeatedTimer. ^KT-48537 2022-03-14 13:21:39 +00:00
Alexander Shabalin eae9d05f50 [K/N] Add mockable clock. ^KT-48537 2022-03-14 13:21:39 +00:00
Alexander Shabalin e6b7a142b2 [K/N] Implicit constructors for saturating. ^KT-48537 2022-03-14 13:21:38 +00:00
Alexander Shabalin 03b09346a5 [K/N] Intrusive single linked list ^KT-51436
Merge-request: KT-MR-5854
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-03-14 13:20:41 +00:00
Vyacheslav Gerasimov 5e09c3176f Build: Set kotlin.build.cache.push to false by default
#KTI-793
2022-03-13 20:29:12 +00:00
Svyatoslav Scherbina 54fb4d9b70 Native: make forward declarations expect in metadata compilations
If we are compiling metadata, make synthetic forward declarations
`expect`, because otherwise `getFirstClassifierDiscriminateHeaders`
would prefer it over a "real" `expect` declaration from a commonized
interop library, which would ruin the whole idea of using synthetic
forward declarations only when no proper definitions are found.

^KT-51377 Fixed
2022-03-11 15:09:38 +00:00
Pavel Kunyavskiy 42a2ce1610 [K/N] Fix currentFrame in smaller scope, to avoid gc while having incorrect shadow stack 2022-03-10 13:22:04 +00:00
dependabot[bot] 872bda01e0 Bump node-fetch in /kotlin-native/tools/performance-server
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-09 14:30:08 +03:00
Svyatoslav Scherbina 63a396b51d Native: fix classpath in KonanCliRunner
It included "konan/lib/*.jar", which became incorrect after adding
kotlin-native-compiler-embeddable.jar to K/N dist in 2baf344f5f:
after that, the classpath included both kotlin-native.jar and
kotlin-native-compiler-embeddable.jar, so it contained duplicating
classes.

Fix this by choosing particular .jar files from konan/lib, and use
kotlin-native-compiler-embeddable.jar.
2022-03-09 11:09:25 +00:00
Svyatoslav Scherbina 5a1513ad59 Native build: make distCompiler no-op when using custom dist
Custom dist is already in place and has the compiler, so we don't have
to build and copy the compiler to dist.

Moreover, if we do copy it, it might overwrite the compiler files
already loaded by this Gradle process (including the jar loaded to the
custom classloader), causing hard-to-debug errors.

To workaround this, we disable the distCompiler task and don't add any
dependencies to it when custom dist is used.
2022-03-06 12:17:06 +00:00
Svyatoslav Scherbina 7470aaf06c Native build: don't read klib files in KonanCacheTask.cacheFile
It is `@OutputDirectory`, so Gradle can invoke it early, even before the
klib itself is built.

Instead of reading `uniqName` from klib files, require specifying it
explicitly.
2022-03-06 12:16:17 +00:00
Pavel Kunyavskiy dae24ff6d1 [K/N] Support IrDefinitelyNotNullType in type erasure 2022-03-01 08:03:28 +00:00
Nikolay Krasko 0b4aea4103 Fix exhaustive when error in :ring:compileKotlinNative 2022-03-01 02:28:52 +03:00