Commit Graph

1935 Commits

Author SHA1 Message Date
Nikita Bobko 25c082f02b K1: Implement a checker that disallows to have different member scopes for expect open and its actual
^KT-22841 Fixed
Review: https://jetbrains.team/p/kt/reviews/11603/timeline

The commit also introduces `@AllowDifferentMembersInActual` annotation in
stdlib which allows to suppress the diagnostic
2023-08-21 19:51:08 +00:00
Vsevolod Tolstopyatov 64c8ce18a0 Make enumEntries intrinsic public
It is implemented in JVM, JS and Native backends already

^KT-53154 fixed


Merge-request: KT-MR-11355
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-08-02 18:07:51 +00:00
Abduqodiri Qurbonzoda 7fc90c02f1 Rename copyToArrayImpl to collectionToArray 2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 7010bf2c20 Move copyToArrayImpl implementation to Common source set 2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 6fdfd4e8dd Null-terminate Collection.toArray destination only in JVM
In other platforms the elements following the collection elements
should not be changed.

As a part of efforts to stabilize Native stdlib.
2023-07-27 11:16:58 +00:00
Abduqodiri Qurbonzoda 60455daa9d Update AbstractCollection.toArray documentation 2023-07-27 11:16:58 +00:00
Artem Kobzar 85ee2d71d2 [K/JS] Remove FILE target from JsName annotation and use the new experimental JsFileName annotation instead 2023-07-27 09:44:28 +00:00
Ilya Gorbunov 2a24eaeb74 [Docs] Minor api docs improvement 2023-07-26 10:15:45 +00:00
Ilya Gorbunov 865f392681 [Docs] Use absolute urls in links, new Dokka doesn't support relative 2023-07-26 10:15:45 +00:00
Sarah Haggarty 8e537ec67d [Docs] Update time API description 2023-07-26 10:15:45 +00:00
Abduqodiri Qurbonzoda 7a0af5d058 Mark the CName annotation with ExperimentalNativeApi 2023-07-25 15:01:49 +00:00
Abduqodiri Qurbonzoda e5ab1d9ccf Commonize the ExperimentalNativeApi annotation 2023-07-25 15:01:49 +00:00
Ilya Gorbunov 61175889b9 KT-53154 extract implementation of enumEntries into an expect/actual internal helper function
It's required, so it can be implemented in different backends
at a different pace and in a different manner
2023-07-24 11:18:44 +00:00
Abduqodiri Qurbonzoda fed453fdea Provide Common StringBuilder.append/insert with primitive type arguments #KT-57359
Merge-request: KT-MR-10892
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-13 11:52:14 +00:00
Leonid Startsev 98cfa0315e Use 'number' instead of 'amount' because 'times' is a countable noun. (#5145) 2023-07-11 13:21:15 +02:00
Vsevolod Tolstopyatov 37c2c862d8 KT-53154 enumEntries experimental intrinsic stub
Provide an inefficient default implementation and make it "@PublishedApi internal" so it can be safely merged as is.

Intrinsics will be added later in follow-up PRs, and then the implementation will be adjusted accordingly

Merge-request: KT-MR-10843
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-06-28 20:25:11 +00:00
Artem Kobzar 64158a8a2f [K/JS] Add file-to-file compilation ^KT-6168 Fixed 2023-06-22 18:23:45 +00:00
Abduqodiri Qurbonzoda 4ae19b2b44 [K/N] Deprecate SharedImmutable annotation #KT-57837
As a part of efforts to stabilize Native stdlib.
2023-06-19 11:35:32 +00:00
Abduqodiri Qurbonzoda 2ef50f8c34 Move ArrayDeque.newCapacity to AbstractList 2023-06-06 18:11:57 +00:00
Ilya Gorbunov bbb36ce501 KT-58046 Promote time sources, time marks, measureTime to stable 2023-05-16 11:42:32 +00:00
Vsevolod Tolstopyatov 5b474bc5d3 Stabilize EnumEntries stdlib signature
* Also, mention implementation details of EnumEntries to enable safe uses of a 'EnumEntries' as a set
* Fix testdata for opt-in marker in enum entries

^KT-58548 fixed

Merge-request: KT-MR-10037
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-05-11 09:18:44 +00:00
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +00:00
Ilya Gorbunov 937a14146a Hide experimental Duration functions that are not intended to be stabilized 2023-04-26 10:44:52 +00:00
Abduqodiri Qurbonzoda 175566fe56 KT-51908 Common MatchGroupCollection.get(name) extension function 2023-04-26 10:44:21 +00:00
Abduqodiri Qurbonzoda 63a5a74613 Introduce HexFormat for formatting and parsing hexadecimals #KT-57762
Merge-request: KT-MR-9460
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-04-26 09:54:25 +00:00
Sergey Bogolepov fce878d63a [K/N] KT-56464: implementation of HiddenFromObjC for classes in backend 2023-04-26 09:36:10 +00:00
Filipp Zhinkin 50841e7cb0 KT-42589 Add listOf, setOf, mapOf overloads for a single value to common src-set
`listOf`, `setOf` and `mapOf` overloads were defined in some source-sets
but common source-set was missing it.
This change adds common definition of these methods and also add
declarations for source-sets that were previously
missing it.

^KT-42589 fixed
2023-04-20 08:42:15 +00:00
Abduqodiri Qurbonzoda 88181404df [K/N] Remove deprecation from StringBuilder.capacity() function
As a part of efforts to stabilize K/N stdlib.
2023-04-19 20:20:43 +00:00
Vsevolod Tolstopyatov af9252aa96 Mark all Worker-related API as obsolete.
* Explain what obsolete means and why workers are obsolete
* Add some documentation to workers to explain its common pitfalls

^KT-54702


Merge-request: KT-MR-9563
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-04-19 09:28:23 +00:00
Ilya Gorbunov 1014434475 KT-58046 Use saturated math in LongTimeMark implementation
- keep offset in range (-1..+1) of time source units
- when adding big or infinite offset, saturate startedAt instead
- displace initial reading to zero, similar to MonotonicTimeSource
- fix the zero reading in TestTimeSource by calling markNow in constructor
- use more precise reading adjustment in TestTimeSource for big durations
- add a note about comparable time marks for AbstractLongTimeSource and TestTimeSource
2023-04-18 15:25:31 +00:00
Ilya Gorbunov 7a6947ad35 KT-58046 Generalize saturating duration math to arbitrary units 2023-04-18 15:25:31 +00:00
Ilya Gorbunov 17d977977c KT-58058 Duration truncation internal helper function 2023-04-18 15:25:30 +00:00
Iaroslav Postovalov fb80c0cb0d Override toString function in stdlib delegates
Co-authored-by: ilya-g <ilya.gorbunov@jetbrains.com>
2023-04-11 14:46:29 +00:00
Filipp Zhinkin d0847f2519 KT-57617 Delegate iterators of reversed list views to underlying list iterators
Improve the performance of reversed list view iterators by delegating to
underlying list iterators instead of using implementations provided by
the AbstractList.
Latter use AbstractList::get(index: Int) to implement next() and
previous() methods and depending on the underlying list's implementation
it may lead to worse performance.

The change also improves reversed list views test coverage.
2023-04-11 08:16:21 +00:00
Ilya Gorbunov 912b65060e KT-55610 Deprecate k.j.Volatile annotation in Common and JS
Use k.c.Volatile in common AbstractMap instead
2023-04-08 15:07:56 +00:00
Ilya Gorbunov b8da3e69ce KT-55268 Make k.c.Volatile stable 2023-04-08 15:07:56 +00:00
Abduqodiri Qurbonzoda 352316ba9f [K/N] Add @SinceKotlin for ObjC annotations #KT-57197 2023-04-03 12:21:31 +00:00
Vsevolod Tolstopyatov 33d13474c5 Make EnumEntries implementation eager
* Addresses the recent design changes of the corresponding language feature
* Also rework JS/Wasm enumEntries implementation with the function that accepts array instead of fabric function


^KT-57318


Co-authored-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>

Merge-request: KT-MR-9204
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2023-03-20 10:18:28 +00:00
Nikolay Lunyak bcfafc601e Add EnumEntries to minimal-stdlib-for-tests
This change allows to revert adding `WITH_STDLIB` directive
to tests which happened at `a9343aeb`.

Co-authored-by: Alexander Udalov <Alexander.Udalov@jetbrains.com>
2023-03-02 10:23:38 +00:00
Ilya Gorbunov 2cfbbb185d Change docs artifacts directory layout for easier publishing
Change module names of libraries to be consistent
2023-02-22 23:52:39 +00:00
Dmitriy Novozhilov 66544a4e00 Switch kotlin version to 1.9
with appropriate fixes in testdata, tests and other
places.
2023-01-30 09:29:55 +00:00
Abduqodiri Qurbonzoda 1b258646be Specify benchmarks repository for Base64 2023-01-22 02:02:38 +00:00
Abduqodiri Qurbonzoda ba2833b90f Mark Base64 API with ExperimentalEncodingApi 2023-01-16 11:24:50 +00:00
Abduqodiri Qurbonzoda 954ec1f63c Introduce @ExperimentalEncodingApi for binary-to-text encoding API 2023-01-16 11:24:50 +00:00
Abduqodiri Qurbonzoda dc03a03762 Introduce basic, url-safe and mime Base64 variants #KT-9823 2023-01-16 11:24:49 +00:00
Ilya Gorbunov 916f733f73 Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
Leave it experimental since 1.8 for K/Native.
2023-01-04 17:28:46 +00:00
Mikhail Glukhikh bc5acb5e9d Regenerate built-ins copyright comments (year 2023) 2023-01-02 13:44:21 +01:00
Abduqodiri Qurbonzoda fff593492d Introduce Common AutoCloseable & use #KT-31066
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-8113
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2022-12-27 11:50:22 +00:00
Ilya Gorbunov e2d96da396 Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Ilya Gorbunov 7dd907342e Document the nature of natural order KT-54168 2022-11-25 14:09:10 +00:00