Commit Graph

4063 Commits

Author SHA1 Message Date
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
Ilya Gorbunov f07bf70aa7 Switch stdlib tests to KMP kotlin-test KT-61969 2023-12-13 15:40:25 +00:00
Ilya Gorbunov f3240757ed Extract custom publishing dsl to buildsrc-compat
It will be used also in kotlin-test KT-61969
2023-12-13 15:40:25 +00:00
Artem Kobzar 2eb1e65bbf [K/Wasm] Allow to export unsigned numbers 2023-12-08 09:06:19 +00:00
Alexander.Likhachev a19bd2ed2e [Build] Migrate most of the build logic from Project.buildDir usage
It's going to be deprecated in Gradle 8.3

There's currently no way to pass a `org.gradle.api.provider.Provider` to the JavaExec.systemProperty or Test.systemProperty. There's a workaround using `org.gradle.process.CommandLineArgumentProvider`, but I intentionally don't rework these calls as Gradle is going to allow passing providers to configure system properties: https://github.com/gradle/gradle/issues/12247#issuecomment-1568427242
^KTI-1473 In Progress
2023-12-07 18:31:06 +00:00
Ilya Gorbunov 28c1049518 [stdlib] KT-55619 provide samples and extend documentation for String.format 2023-11-27 15:04:51 +00:00
Abduqodiri Qurbonzoda e94b247835 Introduce Common StringBuilder.append/insert(Byte/Short) extensions #KT-63341 2023-11-26 02:48:19 +02:00
Abduqodiri Qurbonzoda db6a662631 Remove Common StringBuilder.append/insert(Byte/Short) members #KT-63341 2023-11-26 02:48:18 +02:00
Ilya Gorbunov 88bbe8d92d [stdlib] Enable explicit API mode 2023-11-24 01:45:45 +00:00
Ilya Gorbunov d8ee74222f [builtins-gen] Explicit visibility for companion objects and secondary constructors 2023-11-22 18:04:34 +00:00
Ilya Gorbunov ab7c2f2196 [stdlib] Explicit visibility and return types: builtins 2023-11-22 18:04:34 +00:00
Ilya Gorbunov df190b1265 [stdlib] Explicit visibility and return types: JVM internal 2023-11-22 18:04:34 +00:00
Ilya Gorbunov 2e030f213b [stdlib] Explicit visibility and return types: JVM 2023-11-22 18:04:34 +00:00
Alexander Korepanov 45c166abf8 [JS IR] Introduce special setMetadataFor*() for synthetic classes
^KT-63436 Fixed
2023-11-22 09:21:44 +00:00
Alexander Korepanov 9af681e234 [JS IR] Rename metadataUtils.kt -> metadataUtilsOld.kt 2023-11-22 09:21:44 +00:00
Ilya Gorbunov 4d8cf4903c [stdlib] Explicit visibility and return types: DOM API 2023-11-21 18:14:09 +00:00
Ilya Gorbunov ce427b96b3 [stdlib] Suppress explicit api errors in DOM declarations generated by dukat
Suppressions should be removed once dukat supports generating
explicit public visibility and return types
2023-11-21 18:14:09 +00:00
Ilya Gorbunov cfa8a1dc0f [stdlib] Explicit visibility and return types: Wasm 2023-11-21 18:14:09 +00:00
Ilya Gorbunov 381a8fd55f [stdlib] Explicit visibility and return types: JS
Stepping test line number changes are due to changes in coroutineInternalJS.kt
2023-11-21 18:14:09 +00:00
Ilya Gorbunov 62700c3ec3 [stdlib] K/N ArrayList: restore constructor docs, correct modifier order 2023-11-20 02:24:40 +00:00
Ilya Gorbunov aa4419b7e3 [stdlib] Explicit visibility and return types: Collections 2023-11-20 02:24:40 +00:00
Ilya Gorbunov 0dd61c9f81 [stdlib] Explicit visibility and return types: Duration 2023-11-20 02:24:40 +00:00