Commit Graph

4084 Commits

Author SHA1 Message Date
Alexander Udalov 7f90111283 Build: remove obsolete -Xbuiltins-from-sources from stdlib build
It was removed in 77dba281a3.
2024-02-28 07:25:47 +00:00
Abduqodiri Qurbonzoda 65cfc578a8 Introduce constructor-like function for AutoCloseable #KT-66102 2024-02-27 20:52:49 +00:00
Abduqodiri Qurbonzoda 557ea32f87 Introduce kotlin.AutoCloseable typealias in K/JVM stdlib #KT-55777 2024-02-27 20:52:49 +00:00
Abduqodiri Qurbonzoda 98ad68eb90 Promote AutoCloseable & use to stable #KT-65532 2024-02-27 20:52:49 +00:00
Abduqodiri Qurbonzoda 0811a5b77b Promote enumEntries() to stable #KT-65532 2024-02-27 19:49:12 +00:00
Abduqodiri Qurbonzoda 31aa71dd6a Promote Common String.toCharArray(destination) to stable #KT-65532 2024-02-26 10:48:29 +00:00
Ilya Gorbunov 85854a6b8d [stdlib] Make enumEntriesIntrinsic not reified/inline
It's required to simplify the corresponding backends' inliners.

KT-59712, KT-59713
2024-02-23 05:50:37 +00:00
Ilya Gorbunov 86d5e83f4b [stdlib] Remove bootstrap implementation of enumEntriesIntrinsic
It should have been already implemented as intrinsic in all backends.

Do not test enumEntries intrinsic in the old JVM BE.

KT-53154

Co-authored-by: Alexander Udalov <alexander.udalov@jetbrains.com>
2024-02-23 05:50:37 +00:00
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Ilya Gorbunov 0ecbbbf1ca [stdlib] Set AV to 2.0, LV to 1.9 for main compilations, build tests with K2 2024-02-21 16:28:12 +00:00
Ilya Gorbunov c2e28149e6 [stdlib] Enable link-via-signatures to workaround KT-62798 2024-02-20 19:59:16 +00:00
Ilya Gorbunov 709076acc9 [stdlib] Improve documentation of Char.isWhitespace and test it behaves the same in different targets 2024-02-20 03:48:08 +00:00
Ilya Gorbunov baca742a31 [stdlib] Minor: fix various grammar in docs 2024-02-20 03:48:08 +00:00
Ilya Gorbunov 15375c0fd5 [stdlib] Use more idiomatic and performant implementation of isBlank
Also replace expect-actual with a common function because its implementation is no longer different in different platforms.

KT-65590
2024-02-20 03:48:08 +00:00
Abduqodiri Qurbonzoda ae3c9dd9b9 Improve Path.walk/delete/copyToRecursively documentation 2024-02-09 17:20:15 +00:00
Abduqodiri Qurbonzoda f8c587ddcf Fix security vulnerability in Path recursive functions #KT-63103
* Prohibit files with name "." or ".."
* Detect cycles caused by files with name "/"
* Prohibit copy outside the target directory

The commit also moves zip-related tests to PathRecursiveFunctionsZipTest.
2024-02-09 17:20:15 +00:00
Igor Yakovlev 7cf793f308 [Wasm] Add bootstrap declarations 2024-02-08 14:15:17 +00:00
Igor Yakovlev be6b9e8a9a [Wasm] Support lazy associated object initialisation
Fix #KT-63939
2024-02-08 14:15:17 +00:00
Abduqodiri Qurbonzoda 5b703c57ec Fix a test failure caused by KT-52181 2024-02-08 07:46:09 +00:00
Abduqodiri Qurbonzoda 600e306d80 Fix JS Map.keys.remove return value #KT-65525 2024-02-08 07:46:09 +00:00
Abduqodiri Qurbonzoda 20b9ac9d55 Fix memory leak in MapBuilder #KT-65518 2024-02-08 07:46:09 +00:00
Abduqodiri Qurbonzoda e4a8fc01c3 Fix typo in stdlib KDocs, behavoir -> behavior 2024-01-31 12:11:48 +00:00
Abduqodiri Qurbonzoda c9d8ecc599 Detect concurrent modifications in ArrayDeque #KT-63355
Remove the ArrayDeque.subList().subList() test for comodification detection.
For types that extend AbstractList and to not override subList function,
the behavior varies depending on JDK version. With JKD8, the test fails for ArrayDeque.
While with JDK9+, it passes.
2024-01-31 12:11:48 +00:00
Abduqodiri Qurbonzoda 5f16fb2e4d Introduce Common protected property AbstractMutableList.modCount #KT-57150 2024-01-31 12:11:48 +00:00
Anton Keks 695119ca35 [stdlib] remove duplicate size checks, as the same is done inside of Array extension functions that are called here 2024-01-31 06:51:08 +00:00
Abduqodiri Qurbonzoda b67ebf36a2 Implement optimized removeRange for ArrayDeque #KT-64956
Test ArrayDeque with size 15. With the existing sizes the removeRange
implementation couldn't reach the maximum number of iterations - 3.

Benchmark results for ArrayDeque.subList().clear() that uses
removeRange() can be found here:
https://github.com/qurbonzoda/KotlinArrayDequeBenchmarks/tree/master/results
2024-01-30 22:37:25 +00:00
Abduqodiri Qurbonzoda 240a423bed Introduce Common protected function AbstractMutableList.removeRange #KT-57151 2024-01-30 22:37:25 +00:00
Artem Kobzar 8c69ffe8c9 [K/Wasm] Generate wasm-specific unsigned implementations ^KT-58039 Fixed 2024-01-29 20:11:41 +00:00
Artem Kobzar b59993d88a [K/Wasm] Prepare for splitting unsigned implementation helpers into expect/actuals KT-58039 2024-01-29 20:11:41 +00:00
vladislav.grechko f318b5969d Erase non-reified type parameters by-default when inlining.
Substitution of type arguments to non-reified type parameters may lead
to accidental reification, which should not be done (see ^KT-60174 for
examples). So, we should erase them, except the few cases.

^KT-60174: Fixed
^KT-60175: Fixed
2024-01-26 18:31:20 +00:00
Anastasiia Spaseeva 945f602b91 Revert "[Wasm] Support lazy associated object initialisation"
This reverts commit 552ee1ee38.
2024-01-25 14:11:56 +01:00
Igor Yakovlev 552ee1ee38 [Wasm] Support lazy associated object initialisation
Fix #KT-63939
2024-01-24 16:24:44 +00:00
Igor Yakovlev 3e9b2573c5 [Wasm/std] Fix invalid sign for FP rem operator
Fixed #KT-64829
2024-01-24 15:40:48 +00:00
Artem Kobzar 8d1a90c23c [K/JS] Support essential Kotlin collections (List, MutableList, Set, MutableSet, Map, MutableMap) for exporting into JS
^KT-34995 Fixed
^KT-44871 Fixed
2024-01-24 11:14:46 +00:00
Anastasia.Nekrasova ad9025afa6 [k1/K2]: Mark @SubclassOptInRequired as an experimental
At the moment, SubclassOptInRequired is marked with the
ExperimentalSubclassOptIn annotation. However, it does not work
as expected due to a missing opt-in error. To use SubclassOptInRequired,
an explicit opt-in is necessary because SubclassOptInRequired is an
unstable feature now.

^KT-64739
2024-01-15 14:54:36 +00:00
Igor Yakovlev 931cc48def [Wasm/WASI] Implementation of a callback on root exported function exit
Fixed #KT-64486
2024-01-15 11:37:37 +00:00
Igor Yakovlev 99d5ee4db8 [stdlib] Replace usage of Enum.values with Enum.entries 2024-01-12 18:28:00 +00:00
Igor Yakovlev 2d08953c91 [stdlib] Remove unused kotlin.time.formatUpToDecimals 2024-01-12 18:28:00 +00:00
Igor Yakovlev 1e9bc1abc7 [Wasm/WASI] Use K/JVM implementation of MonotonicTimeSource
Fixed #KT-60963
2024-01-12 18:28:00 +00:00
Igor Yakovlev 567fc6b140 [Wasm/WASI] Make std random generator 64bit seeded
Fixed #KT-60962
2024-01-12 18:28:00 +00:00
Yahor Berdnikau 2a55aa782d Revert "[Gradle] Add dsl marker to KotlinSourceSet"
This reverts commit eb663117c7.
2024-01-10 22:10:59 +00:00
Yahor Berdnikau eb663117c7 [Gradle] Add dsl marker to KotlinSourceSet
We also need users to distinguish KotlinSourceSet DSL from other levels
of DSL, specifically extension one.

^KT-64722 In Progress
2024-01-08 14:07:50 +00:00
Filipp Zhinkin 940c3c81ad KT-64361 delegate Int/Long::sign to methods from Java stdlib
Merge-request: KT-MR-13708
Merged-by: Filipp Zhinkin <filipp.zhinkin@jetbrains.com>
2024-01-05 17:13:37 +00:00
Dmitrii Gridin b6d373d8e5 Update copyright to 2024 2024-01-05 13:43:17 +00:00
cristiangarcia 5a1fb78fcd Declare generated SourceSets correctly
Allow Gradle to keep the track of the task generating the sources
KTI-1502 Fixed
2023-12-24 00:01:59 +00:00
Yahor Berdnikau ea8f7af1f2 [Gradle] Add api marker to Kotlin compilation tasks DSL
Kotlin's compilation tasks DSL should also be separated from other DSL
parts.

^KT-57292 In Progress
2023-12-21 10:30:50 +00:00
Artem Kobzar 2530cba82a [K/JS] Compile Kotlin coroutines as JS generator ^KT-63038 Fixed 2023-12-18 17:13:07 +00:00
Artem Kobzar 1473b4bb41 [K/Wasm] Introduce JsBigInt type 2023-12-13 18:44:57 +00:00
Ilya Gorbunov 5ce2a2cbee Use strongly typed task GenerateProjectStructureMetadata to tweak kpsm.json 2023-12-13 15:40:25 +00:00
Ilya Gorbunov e0bc0b81c6 [kotlin-test] Drop subprojects unneeded anymore KT-61969 2023-12-13 15:40:25 +00:00