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
Abduqodiri Qurbonzoda
c961c15729
Commonize AssertionError(message, cause) constructor
2023-04-11 13:32:54 +00:00
Abduqodiri Qurbonzoda
b65a68ca0d
[K/N and WASM] Internalize NoWhenBranchMatchedException and UninitializedPropertyAccessException
...
As a part of efforts to stabilize Native stdlib.
Merge-request: KT-MR-9531
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com >
2023-04-10 21:10:51 +00:00
Zalim Bashorov
155eb9b77a
[Wasm, stdlib] extract Any::identityHashCode to workaround the bug in FunctionDescriptorFactory
...
A fix is on its way -- KT-MR-9426.
2023-04-05 20:50:53 +02:00
Zalim Bashorov
9760e3ee1e
[Wasm] Introduce check and error specialized for String to reduce output size
2023-04-05 20:50:52 +02:00
Zalim Bashorov
295acdf2af
[Wasm] Rewrite lazy initialization without by lazy and lateinit to reduce overhead
2023-04-05 20:50:52 +02:00
Zalim Bashorov
1a8a4fa65d
[Wasm] Don't use by lazy inside Throwable
2023-04-05 20:50:52 +02:00
Zalim Bashorov
67357fa5d4
[Wasm] Replace heavyweight stackTraceToString with "pure" JS stack
2023-04-05 20:50:52 +02:00
Zalim Bashorov
14af47bbd9
[Wasm] Introduce utilities to get package and name of class directly from metadata and use it in some places
2023-04-05 20:50:52 +02:00
Zalim Bashorov
a9b553f16e
[Wasm] Don't use by lazy to keep some JS values used by adapters
2023-04-05 20:50:52 +02:00
Zalim Bashorov
2ef47901d0
[Wasm] Introducing private identityHashCode shared between Any's hashCode and toString
...
It splits the dependency of toString from hashCode that prevents keeping hashCode when toString is used.
2023-04-05 20:50:51 +02:00
Igor Yakovlev
49beec33b4
[Wasm] Replace ClassId and InterfaceId with single TypeId
2023-04-04 18:39:18 +00:00
Igor Yakovlev
5a46cb1c40
[Wasm] Fix invalid float and double sign parser for '-Infinity' value
2023-04-04 18:39:18 +00:00
Igor Yakovlev
b8f797af00
[Wasm] Support for Associated Objects feature
2023-04-04 18:39:17 +00:00
Svyatoslav Kuzmich
46a6695072
[Wasm] WebIDL: Make getters and setters not inline
2023-03-29 11:08:30 +00:00
Svyatoslav Kuzmich
0c7d625123
[Wasm] Suppress warning of unused parameter in WebIDL js(code) functions
2023-03-29 11:08:30 +00:00
Svyatoslav Kuzmich
c466f926b0
[Wasm] Deprecate Dynamic in favour of JsAny
...
Remove extension methods created to compile
Kotlin/JS-like WebIDL bindings
^KT-57060 Fixed
2023-03-29 11:08:30 +00:00
Svyatoslav Kuzmich
0e54ec5ef6
[Wasm] Stop using Dynamic in WebIDL generated code
2023-03-29 11:08:29 +00:00
Svyatoslav Kuzmich
cafc27aae9
[Wasm] Add JsAny.unsafeCast
...
Replacement for Dynamic.unsafeCast, but limited to JsAny types where
it makes sense.
2023-03-29 11:08:29 +00:00
Svyatoslav Kuzmich
e32611d2f2
[Wasm] Make Promise methods generic instead of using Dynamic
...
Copy full Promise implementation from Kotlin/JS,
and specify JsAny? upper bounds
2023-03-29 11:08:29 +00:00
Svyatoslav Kuzmich
635671d623
[Wasm] Stop using Dynamic in kotlin-test
2023-03-29 11:08:28 +00:00
Dmitriy Novozhilov
a64d8e8a31
[Stdlib] Deprecate and make open Number.toChar()
...
^KT-46465 Fixed
2023-03-27 10:46:13 +00:00
Dmitriy Novozhilov
90ec84d7b7
[Stdlib] Update copyrighting in generated stdlib sources
2023-03-27 10:46:11 +00:00
Abduqodiri Qurbonzoda
9076e5b112
[K/N] Mark BitSet usages in stdlib with @ObsoleteNativeApi
2023-03-23 14:48:23 +00:00
Svyatoslav Kuzmich
76b4498399
[Wasm] IDL bindings improvements
...
- Generated types extend JsAny
- Use JsAny instead of Dynamic
- Use JsArray instead of Array
- Use JsNumber, JsString and JsBoolean in JsAny context
- Refactor dictionary constructor functions
2023-03-16 09:12:08 +00:00
Svyatoslav Kuzmich
1208a26fc4
[Wasm] Use JsAny, JsHandle and other Js* types in stdlib and kotlin-test
2023-03-16 09:12:07 +00:00
Svyatoslav Kuzmich
d6886d69ec
[Wasm] Add internal JsPrimitive annotation
...
Before external classes could only represent JS object types and are
type-checked with `instanceof`.
@JsPrimitive allows external classes to represent primitive types with
`typeof` checks.
2023-03-16 09:12:07 +00:00