Commit Graph

341 Commits

Author SHA1 Message Date
Ilya Gorbunov 9ccce52915 Clean up WasExperimental annotation from declarations with SinceKotlin<=1.4
Since it is not possible to use -api-version < 1.4, this annotation has no effect
2023-11-10 12:20:52 +00:00
Ilya Gorbunov bd6607c860 Drop kotlin-stdlib-wasm project
Its tasks are no longer used as build entry points
2023-10-20 16:27:30 +00:00
Ilya Gorbunov 469ca237db Remove the previous approach to build wasm stdlib variants 2023-10-17 16:30:41 +00:00
Ilya Gorbunov 53681a33d9 Add required opt-ins in wasm stdlib sources 2023-10-17 16:30:41 +00:00
Ilya Gorbunov 735a97245d Remove forgotten ExperimentalStdlibApi in wasm sources 2023-10-17 16:30:41 +00:00
Zalim Bashorov 86e854a980 Revert "[Wasm] Don't use the new br_on_cast* instructions since they are not supported in Node.js yet"
This reverts commit 2d728727

#KT-60828 Fixed
2023-09-19 09:23:26 +00:00
Ilya Gorbunov 8ae21c0e1b [Generator] Do not omit public visibility of methods in wasm 2023-09-04 11:32:39 +00:00
Ilya Gorbunov 1c149925b7 [Generator] Always put expression body on a new line 2023-09-04 11:32:39 +00:00
Ilya Gorbunov 68a9b9c312 [Generator] Reference generator class in generated code files 2023-09-04 11:32:39 +00:00
Abduqodiri Qurbonzoda 9352e40d54 Wasm Enum.hashCode() is not final #KT-61614
Merge-request: KT-MR-11938
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-31 14:31:56 +00:00
Abduqodiri Qurbonzoda 84c6333b23 Introduce Common String.toCharArray(destination) #KT-60657
Merge-request: KT-MR-11340
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-08-25 03:11:13 +00:00
Ivan Kylchik adce2c9a78 [WASM] Replace deprecated Char.toInt() with Char.code 2023-08-24 08:59:49 +00:00
Ivan Kylchik ee973c0ede [Generator] Generate Char class 2023-08-24 08:59:49 +00:00
Ivan Kylchik 38e434bc07 [Generator] Generate Boolean class 2023-08-24 08:59:49 +00:00
Ilya Gorbunov 3f3cd2e87a [Generator] Set up body for rangeTo and rangeUntil by default
Also use expression body formatting for `rangeTo`.
2023-08-24 08:59:49 +00:00
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
Ilya Gorbunov 9640e32483 [stdlib-mpp] Publish wasm artifacts through variants of stdlib KT-60909 2023-08-18 15:36:15 +00:00
Igor Yakovlev 223e590dcd [Wasm] Temporary task to provide wasm stdlib tests 2023-08-08 18:10:20 +02:00
Igor Yakovlev 983991d46c [Wasm] Add box and stdlib tests in wasi mode 2023-08-08 18:10:19 +02:00
Igor Yakovlev f42d0b1ed4 [Wasm] Add wasi kotlin.test target gradle buildscript 2023-08-08 18:10:19 +02:00
Igor Yakovlev d1c7caf15c [Wasm] Add wasi stdlib target gradle buildscript
KT-56608
2023-08-08 18:10:19 +02:00
Igor Yakovlev 8cc0660693 [Wasm] Wasi stdlib implementation
KT-56608
2023-08-08 18:10:19 +02:00
Igor Yakovlev 090f393f97 [Wasm] Make std internal functions have a bodies 2023-08-08 18:10:19 +02:00
Ilya Goncharov b9e5b8a087 [Gradle, Wasm] Add wasmWasi target, replace wasm target onto wasmJs
KT-60654
2023-08-01 13:11:36 +00:00
Artem Kobzar cd840997b1 [K/Wasm] Rework Wasm enumEntriesIntrinsic declaration to fix stdlib compilation 2023-08-01 11:53:14 +00:00
Zalim Bashorov 2d728727da [Wasm] Don't use the new br_on_cast* instructions since they are not supported in Node.js yet
#KT-60835 Fixed
2023-08-01 08:46:59 +00:00
Zalim Bashorov 4572680877 [Wasm] Migrate to the latest br_on_cast* instructions
#KT-59722 Fixed
2023-07-28 16:16:33 +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
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
Artem Kobzar 029c71ebb1 [K/JS, K/Wasm] Implement enumEntries top-level function ^KT-59712 Fixed 2023-07-27 09:43:01 +00:00
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