Commit Graph

149 Commits

Author SHA1 Message Date
Ivan Kylchik 695229e288 [JS] Mark necessary methods that must be evaluated at compile-time
It includes methods and properties from Boolean, Char, String,
Enum and KCallable.
2023-04-20 08:18:57 +00:00
Ivan Kylchik 07ca981632 Unify generation of Primitives files for all backends 2023-04-20 08:18:57 +00:00
Abduqodiri Qurbonzoda 040fcee04e [K/JS] Loosen StringBuilder.capacity() deprecation level to WARNING 2023-04-19 20:20:43 +00:00
Abduqodiri Qurbonzoda 7eba68e62b [K/N] Commonize String.regionMatches function
As a part of efforts to stabilize K/N stdlib.
2023-04-19 20:20:42 +00:00
Alexander Korepanov e8be3043cc [JS IR] Allow restriction of function argument by external type
Add a special annotation @JsExternalTypeArgument for
 marking function parameters. The marked parameter
 accepts an argument with an external type only.

^KT-57479 Fixed
2023-04-17 08:21:10 +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
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
Alexander Korepanov 4813b659ab [JS IR] Control an inheritance of non-external entity from external
Add a special annotation @JsExternalInheritorsOnly for marking
 external interfaces and classes. The marked interface or class
 can’t be a parent for non external interfaces, classes or objects.

^KT-57423 Fixed
2023-04-05 09:00:45 +00:00
Abduqodiri Qurbonzoda 352316ba9f [K/N] Add @SinceKotlin for ObjC annotations #KT-57197 2023-04-03 12:21:31 +00:00
Dmitriy Novozhilov a64d8e8a31 [Stdlib] Deprecate and make open Number.toChar()
^KT-46465 Fixed
2023-03-27 10:46:13 +00:00
Ilya Goncharov 229fd73b38 [Gradle, JS] Regenerate API stdlib
This reverts commit b4c0cab22a.
2023-02-22 11:00:11 +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
Denis.Zharkov b009ee3744 Add @SinceKotlin and KDoc for ContextFunctionTypeParams
Initially, it was added accidentally as part of e3f987459c
and missed all out processes.

Adding @SinceKotlin("1.7") after the annotation has already been
published before is not really a problem, because it only may be used
with an experimental `-Xcontext-receivers` flag, thus it doesn't have
to be a part of our regular backward compatibility routine.

^KT-55226 Fixed
2023-01-12 16:53:48 +00:00
Ilya Goncharov b4c0cab22a [Gradle, JS] Regenerate API stdlib 2023-01-04 16:30:34 +00: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 b6e6ca7c96 Deprecate Synchronized annotation in common and JS #KT-55344 2022-12-22 21:22:44 +00:00
Ilya Goncharov 688894aabc [JS, Stdlib] Move DOM API to separate module kotlin-dom-api-compat
[JS, Stdlib] Leave sources of dom api inside stdlib

[Stdlib, JS] Leave ItemArrayLike inside stdlib
2022-12-22 15:45:23 +00:00
Dmitriy Novozhilov 7cbe13dee9 [JS] Update testdata of ApiTest.test(Ir)Stdlib
Most likely it caused by 17e9a6a781
2022-12-21 22:30:08 +00:00
Artem Kobzar eb2326eabb [K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore. 2022-10-03 11:07:25 +00:00
Ilya Gorbunov e35ace5d3a Deprecate AbstractDoubleTimeSource
There are too few usages of it, and it can be mostly replaced with AbstractLongTimeSource.
2022-09-19 19:16:40 +00:00
Ilya Gorbunov 57c9d61291 ComparableTimeMark and specialized TimeSource KT-54082
- Introduce ComparableTimeMark interface extending TimeMark,
and TimeSource.WithComparableMarks - a time source that returns such time marks.
- Implement ComparableTimeMark in ValueTimeMark and AbstractLong/DoubleTimeMark classes.
2022-09-19 19:16:40 +00:00
Artem Kobzar d9c5f100db [K/JS] Use intrinsics instead of new functions in IR backend. 2022-09-19 13:04:16 +00:00
Abduqodiri Qurbonzoda 4e1cb12024 Remove deprecated Experimental and UseExperimental annotation classes #KT-53864 2022-09-13 17:19:01 +03:00
Abduqodiri Qurbonzoda b388c7503b Advance Int/Long/Double.units deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda 89b5ce1ed7 Advance Duration.toLongUnits() deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda b1300332ee Advance Duration.inUnits deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Abduqodiri Qurbonzoda 0b4ceb0897 Advance Duration.units(value) deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Alexander Udalov 686cd82327 Serialize OptIn to builtins, improve tests
Skip SOURCE-retention annotations in builtins serialization tests,
because otherwise the source analysis result can't be equal to the
metadata deserialization result.

 #KT-53073 Fixed
2022-09-09 21:31:39 +02:00
Abduqodiri Qurbonzoda 0db9326105 Introduce a deprecated StringBuilder.append(CharArray, Int, Int) in Common #KT-52336 2022-09-08 14:34:38 +00:00
Abduqodiri Qurbonzoda 2d0e95cea0 Remove StringBuilder functions with nonnull parameter type in K/N and JS #KT-53864 2022-09-08 12:16:55 +00:00
Abduqodiri Qurbonzoda 73a65c1bb1 Promote top-level kotlin.math.cbrt() to stable #KT-53277 2022-09-08 12:00:58 +00:00
Ilya Gorbunov 38099e11c3 Remove rangeUntil extensions that are now shadowed by members #KT-52933 2022-08-25 19:24:11 +00:00
Ilya Gorbunov 203a00151d rangeUntil member operator in builtins #KT-52933 2022-08-24 22:22:53 +00:00
Rick Clephas 6ae517a2df [Native] Add HiddenFromObjC and ShouldRefineInSwift annotations 2022-08-22 16:10:44 +02:00
Mikhail Glukhikh b4a92e8a56 Undeprecate @BuilderInference annotation #KT-52400 Declined 2022-08-17 14:07:13 +00:00
Mikhail Glukhikh 66e710704a Protect SubclassOptInRequired with opt-in marker 2022-08-11 14:05:09 +00:00
Mikhail Glukhikh 3f96626b40 Introduce SubclassOptInRequired annotation (see KT-41886) 2022-08-11 14:05:06 +00:00
Rick Clephas 5a5e6ad8cd [K/N] Add ObjCName annotation (#4815) 2022-07-23 18:58:06 +02:00
Vsevolod Tolstopyatov 59ac756f22 Initial implementation of EnumEntries
KT-53152


Merge-request: KT-MR-6656
Merged-by: Vsevolod Tolstopyatov <vsevolod.tolstopyatov@jetbrains.com>
2022-07-15 14:26:50 +00:00
Stanislav Erokhin d788a927c4 Change deprecations annotation order on Ranges#endExclusive property
We have [Int|Long|Char]Range classes in 2 different places:
- as separate class-files
- serialized in the kotlin_builtins file

For some reason our Kotlin compiler during the JVM compilation
re-arranging the order of the annotations, so in class file they
will be written in the following order:
- Deprecated
- SinceKotlin
- ExperimentalStdlibApi

But in the kotlin_builtins they will be stored the same way as
in the sources.
We need these 2 way to be synchronized, because stub's in IDE
cares about order.

After this commit IDE test BuiltInDecompilerConsistencyTest is fixed
2022-07-05 19:50:45 +00:00
Ilya Gorbunov 7e5abdb1c0 Update API dumps for open ranges and their operations
#KT-52932
2022-06-28 00:08:10 +00:00
Victor Petukhov de3f5497ab [Stdlib] Deprecate BuilderInference annotation
^KT-52400 Fixed
2022-06-21 15:01:56 +02:00
Romain Guy 02a3915fdf KT-48232: Implement kotlin.math.cbrt() (cubic roots)
cbrt() is the standard cubic root function that provides several advantages over pow(x, 1.0/3.0):
- Better precision
- Faster
- Behaves better with negative values
2022-06-16 20:27:43 +03:00
Ivan Kylchik 1564f2c549 Mark all declarations that will be evaluated with ir interpreter 2022-05-18 21:19:54 +03:00
Ilya Gorbunov eb8e701cb5 Make IntrinsicConstEvaluation annotation internal 2022-05-17 14:38:43 +00:00
Ilya Gorbunov a03999fe81 Rename DefaultTimeMark to TimeSource.Monotonic.ValueTimeMark 2022-04-14 16:54:32 +00:00
Ilya Gorbunov fede70d0d5 Make TimeMark returned by TimeSource.Monotonic a value class
This value class wraps Long on JVM and Native thus reducing allocations
in time measurement scenarios when the default monotonic time source is
statically known.

KT-46132
2022-04-14 16:54:30 +00:00
Ilya Gorbunov 1845e326d1 Hide deprecated Double/FloatArray.contains/indexOf/lastIndexOf 2022-04-12 15:03:40 +00:00