Commit Graph

309 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda df16fa3306 [K/N] Regex matching zero length should split surrogate pairs #KT-57401
Merge-request: KT-MR-11110
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-26 14:19:25 +00:00
Abduqodiri Qurbonzoda 86c1e0ded6 Remove reified constraint from Array constructors #KT-57363
This is an attempt to bring consistency to array constructors reified requirement.
Currently,
JVM - reified type in all three: arrayOfNulls, arrayOf, emptyArray
Native - reified in arrayOfNulls and arrayOf, but not in emptyArray
JS & Wasm - reified in arrayOfNulls, but not in arrayOf and emptyArray

Merge-request: KT-MR-11005
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-07-26 10:17:45 +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
Roman Efremov 8ce1417621 [Stdlib] Fix reports of MPP annotation checker
^KT-58551
2023-07-24 09:48:49 +00:00
Svyatoslav Kuzmich 2fd77d0925 [Wasm] IDL: Generate overloads for functions with union-typed arguments 2023-07-14 10:52:10 +00:00
Svyatoslav Kuzmich c1100042b2 [Wasm] Use Unit in IDL event handler return type
Return value can be used in rare cases to stop event propagation.
Event methods can be called instead.

^KT-57058 Fixed
2023-07-14 10:52:10 +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
Igor Yakovlev b5eafb9eb7 [Wasm] WasmExport implementation 2023-07-07 20:45:51 +00:00
Abduqodiri Qurbonzoda f665388704 Advance ExperimentalNativeApi opt-in requirement level to ERROR #KT-57838
As a part of efforts to stabilize Native stdlib.
2023-06-30 15:27:08 +00:00
Abduqodiri Qurbonzoda 00abbc5cfe Advance ObsoleteNativeApi opt-in requirement level to ERROR #KT-57088
As a part of efforts to stabilize Native stdlib.
2023-06-30 15:27:08 +00:00
Bogdan Mukvich a9d0ff83cf Add SBOM publishing for kotlin wasm libraries
^KTI-1273
2023-06-27 09:02:18 +00:00
Alexander Udalov ab195b68a5 Build: remove explicit enabling of RangeUntilOperator
This feature is enabled by default since 1.8. Using the `-XXLanguage`
compiler argument leads to big warnings which are distracting during the
build.
2023-06-22 18:55:56 +00:00
Artem Kobzar 64158a8a2f [K/JS] Add file-to-file compilation ^KT-6168 Fixed 2023-06-22 18:23:45 +00:00
Alexander.Likhachev a93c49baf1 [Build] Fix a bunch of buildscript compilation warnings
#KTI-1221 Fixed
2023-06-22 15:16:08 +00:00
Artem Kobzar c53b49d7fa [K/Wasm] Remove custom equals because this kind of equality is lowered in duration of the compilation ^KT-58126 Fixed 2023-06-20 17:36:01 +00:00
Abduqodiri Qurbonzoda 1be0e3f70e Document that arrayOfNulls throws RuntimeException on negative size 2023-06-20 16:31:59 +00:00
Abduqodiri Qurbonzoda ffcc7dfca0 [WASM] Document Array types 2023-06-20 16:31:59 +00:00
Abduqodiri Qurbonzoda 9f16daac02 [WASM] Throw IllegalArgumentException on negative array size 2023-06-20 16:31:59 +00:00
Abduqodiri Qurbonzoda 193aa0f935 Align the Boolean.hashCode() value across platforms
Boolean.hashCode() should return 1231/1237 for true/false correspondingly.

As a part of efforts to stabilize Native stdlib.
2023-06-14 08:19:46 +00:00
Abduqodiri Qurbonzoda 3917ec94ab [K/N] Use AbstractList.checkIndex() functions instead of custom check functions 2023-06-06 18:11:57 +00:00
Bogdan Mukvich 303b01b89b Add SBOM configuration for all published artifacts by default 2023-06-06 13:27:26 +00:00
Artem Kobzar bfd57fd2df [K/JS, K/Wasm] Optimize simple objects declaration and usage ^Fixed KT-58797 2023-06-02 14:23:40 +00:00
Abduqodiri Qurbonzoda 7d9ea28604 Deprecate lazy() that synchronizes on a given lock in non-JVM platforms
Because the overload has a meaningful implementation only in JVM.
In other platforms the specified lock object is ignored.
In K/N it throws UnsupportedOperationException.
2023-06-01 19:40:02 +00:00
Igor Yakovlev c71a2c6dd3 Codereview 2023-05-31 10:46:24 +00:00
Igor Yakovlev 78b72efd32 [Wasm] Make Arrays' constructors with size and lambda inline
Fixed #KT-58746
2023-05-31 10:46:24 +00:00
Igor Yakovlev 1749bafc30 [Wasm] Rename dateref to structref 2023-05-19 15:50:07 +00:00
Igor Yakovlev 6437d0919c [Wasm] Replace deprecated cast instructions 2023-05-19 15:50:06 +00:00
Igor Yakovlev a224feefd2 [Wasm] Fix invalid rounding for reminder calculation
#Fixed KT-58681
2023-05-16 15:53:01 +00:00
Ilya Gorbunov bbb36ce501 KT-58046 Promote time sources, time marks, measureTime to stable 2023-05-16 11:42:32 +00:00
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +00:00
Abduqodiri Qurbonzoda 2248f4ea33 Remove supportsNamedCapturingGroup flag in tests
Now it is true on all platforms
2023-04-26 10:44:21 +00:00
Ilya Gorbunov 448e9fc5e7 Drop functions hidden since 1.4 (inline-only or experimental in JVM)
Since it's no longer possible to use API version less than 1.4,
these functions can be no longer called at all.
2023-04-26 10:31:03 +00:00
mvicsokolova 75b4469757 [K/N] Stabilization of Atomics API
`AtomicInt`, `AtomicLong`, `AtomicReference` and `AtomicNativePtr` classes were moved to `kotlin.concurrent` package. The corresponding classes from `kotlin.native.concurrent` were deprecated with warning since Kotlin 1.9.

In order to prepare for further commonization of Atomics API the following changes were made:
* `kotlin.concurrent.AtomicInt`: 
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Int` , `decrementAndGet(): Int`, `getAndIncrement(): Int`, `getAndDecrement(): Int`, `getAndSet(newValue: Int): Int` 
* `kotlin.concurrent.AtomicLong`:
    * `increment(): Unit` and `decrement(): Unit` methods were deprecated with error
    * New methods were added: `incrementAndGet(): Long`, `decrementAndGet(): Long`, `getAndIncrement(): Long`, `getAndDecrement(): Long`, `getAndSet(newValue: Long): Long`
    * Deprecated `AtomicLong()` constructor with default parameter value
* For all atomic classes `compareAndSwap` method was renamed to `compareAndExchange`

See KT-58074 for more details.

Merge-request: KT-MR-9272
Merged-by: Maria Sokolova <maria.sokolova@jetbrains.com>
2023-04-25 16:55:42 +00:00
Ilya Gorbunov ace2279631 Refactor helper function to run/not run block of common code on specific platform
Use it in StringBuilder tests
2023-04-25 13:55:04 +00:00
Zalim Bashorov 77491ded1b Use Array constructor with size to create Array of nulls
Change the constructor visibility from public to private as it should be.
2023-04-22 17:41:23 +00:00
Svyatoslav Kuzmich 933f47aaf9 [Wasm] Rename JsHandle to JsReference
Decision to do this was made at Kotlin/Wasm interop design meeting
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7ba8f7cce2 Revert "[Wasm] Deprecate @JsFun with warning"
Reason: Design of js(code) replacement is still in flux.
        It would be better to delay deprecation until we converge
        to proper solution.

This reverts commit 3566d918d2.
2023-04-21 15:03:20 +00:00
Svyatoslav Kuzmich 7c2fa3290e [Wasm] Revert removal of some Dynamic functions
Deprecate them with ERROR instead to improve compiler messages
2023-04-21 15:03:19 +00:00
Ivan Kylchik 2e836494f5 Rewrite primitives' generation using simple DSL 2023-04-20 08:18:58 +00:00
Ivan Kylchik dd0267f4ad [WASM] 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:58 +00:00
Ivan Kylchik 07ca981632 Unify generation of Primitives files for all backends 2023-04-20 08:18:57 +00:00
Abduqodiri Qurbonzoda b25f3be81b [K/N] Experimental Char code point constants and functions
Internalize WASM Char code point functions.

As a part of efforts to stabilize Native stdlib.
2023-04-19 20:33:33 +00:00
Abduqodiri Qurbonzoda c6eaadb44f [WASM] Internalize MutableList.replaceAll function
It will be introduced later in Common: KT-57152.
2023-04-19 20:32:56 +00:00
Abduqodiri Qurbonzoda 954e11c265 [K/N] Mark MutableList.replaceAll with ExperimentalNativeApi
As a part of efforts to stabilize Native stdlib #KT-55765.
2023-04-19 20:32:55 +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
Abduqodiri Qurbonzoda c1fb6528aa [WASM] Introduce internal ExperimentalNativeApi
To be able to OptIn usages in shared native-wasm directory.
2023-04-19 19:02:14 +00:00
Zalim Bashorov 521a272acb [Wasm] Pass js stack value directly when replacing a wasm exception with JS one
In this case, we don't need to convert a value to and from wasm String.
2023-04-17 16:15:22 +00:00
Zalim Bashorov 6bfd1e7e9f [Wasm] Stop using unsigned numbers in ScopedMemoryAllocator
It turned out that using unsigned numbers is heavy both in terms of size and performance.
We can consider switching back (KT-58041) as soon as we implement unsigned numbers and operations using wasm built-in capabilities (KT-58039).
2023-04-17 16:15:22 +00:00
Abduqodiri Qurbonzoda 8629c92c62 Update copyright of generatedUnicodeData files 2023-04-12 23:28:12 +00:00