Commit Graph

3728 Commits

Author SHA1 Message Date
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
Abduqodiri Qurbonzoda 352316ba9f [K/N] Add @SinceKotlin for ObjC annotations #KT-57197 2023-04-03 12:21:31 +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
Artem Kobzar c6e4858bc9 [K/JS] Remove the ability to run Legacy JS backend from the Gradle Plugin 2023-03-28 12:47:04 +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
Ilya Gorbunov 9892a49c4b KT-54452 Use js-ir sources for building stdlib-js sources.jar and API docs 2023-03-22 05:57:14 +00:00
Anton Bannykh b0de442d76 JS IR: fix throwable descendants
^ KT-43490 fixed
2023-03-21 12:32:41 +00:00
Vyacheslav Gerasimov 76c54a8ff3 Build: Fix usages of apis deprecated in Gradle 8 2023-03-20 19:45:39 +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
Artem Kobzar 948c511284 [K/JS] Rework ES modules part with squashed JsImport and right renaming strategy inside import/export statements 2023-03-16 10:28:39 +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
Svyatoslav Kuzmich a99ea1d3ce [Wasm] Support enumValues and enumValueOf functions
^KT-57276 Fixed

Merge-request: KT-MR-9169
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-03-13 14:13:31 +00:00
Artem Kobzar ab7b429298 [K/JS] Add ability to use is checks on external objects 2023-03-10 11:33:30 +00:00
Ilya Chernikov 1d72681e4e K2: Fix stdlib test use of assertEquals
fixes test compilation according to the workaround
described in #KT-56717
2023-03-08 09:38:48 +00:00
Ilya Chernikov 8a8b204e11 K2, stdlib tests: make unsigned conversions explicit
Allow using K2 to compile stdlib tests
related to #KT-56379
2023-03-08 09:38:47 +00:00
Ilya Chernikov edcde79c02 Build: use K2 for stdlib tests when enabled
enables testing of #KT-56379
2023-03-08 09:38:47 +00:00
Svyatoslav Kuzmich 4be359ba02 [Wasm] Add @SinceKotlin("1.9") to js(code) 2023-03-03 19:39:12 +00:00
Svyatoslav Kuzmich 3566d918d2 [Wasm] Deprecate @JsFun with warning
kotlin.js.js("code") should be used instead
2023-03-03 19:39:11 +00:00
Svyatoslav Kuzmich 7175b9f31c [Wasm] Migrate usages of @JsFun to js("code") 2023-03-03 19:39:10 +00:00
Svyatoslav Kuzmich 71e6b19760 [Wasm] Support restricted version of js("code") (KT-56955) 2023-03-03 19:39:09 +00:00
Svyatoslav Kuzmich eb8c47343a [Wasm] Don't use js("code") in browser API
Use internal newJsObject to create new objects instead.

This is a preparation for restricted js("code") support (KT-56955)
2023-03-03 19:39:09 +00:00
Vyacheslav Gerasimov 34fcbb32ff Revert "[Build] Fix compilation of kotlin-js(-ir) libraries in 1.9.0 (stdlib and test)"
This reverts commit d39fd9416a.
2023-03-03 15:06:23 +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 d2dc23d8bb Introduce Path.createParentDirectories function #KT-53263 2023-02-27 20:36:21 +00:00
Nikita Bobko f620eb920f Drop redundant suppress
Review: https://jetbrains.team/p/kt/reviews/8933

The suppress was needed in https://jetbrains.team/p/kt/reviews/8308

But it's not needed anymore
2023-02-24 17:05:33 +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
Ilya Goncharov 229fd73b38 [Gradle, JS] Regenerate API stdlib
This reverts commit b4c0cab22a.
2023-02-22 11:00:11 +00:00
Ilya Goncharov 9b4821be28 [Gradle, JS] Add module dom-api-compat
This reverts commit ba8cc877fd.
2023-02-22 11:00:11 +00:00
Nikita Bobko 9a865e4c55 [FE 1.0] Issue a warning if expect and actual are declared in the same module
The commit is based on b09561c3c3
Co-authored-by: Dmitriy Novozhilov <dmitriy.novozhilov@jetbrains.com>

^KT-40904 Fixed
^KT-55177 Fixed
Review: https://jetbrains.team/p/kt/reviews/8731

True negative test already exist:
`compiler/testData/diagnostics/tests/multiplatform/hmpp/multiplatformCompositeAnalysis/intermediateWithActualAndExpect.kt`
2023-02-21 14:45:46 +01:00
Artem Kobzar d39fd9416a [Build] Fix compilation of kotlin-js(-ir) libraries in 1.9.0 (stdlib and test) 2023-02-18 13:26:53 +00:00
Alexander.Likhachev 18752fc1ad Revert "[Build] Add a temporary workaround for KT-56357"
This reverts commit ca60a4fcf9.
2023-02-17 15:03:53 +01:00
Ilya Gorbunov 61e9f98b9f Load JDK 8 platform implementations class without reflection
Also remove search for other platform implementation classes because
now the first match should be found in the same jar

Helps to avoid GraalVM related reflection problems in KT-51579
2023-02-13 20:25:30 +00:00
Yahor Berdnikau 6f8422eab3 Revert "[Build] Temporary disable hmpp metadata tasks with CoCa"
This reverts commit e42bed07fa.
2023-02-08 16:27:27 +00:00
Yahor Berdnikau 8d41c87b6b Revert "[Build] Add configuration cache compatibility workaround for MetadataDependencyTransformationTask"
This reverts commit a5f48e295e.
2023-02-08 16:27:27 +00:00
Abduqodiri Qurbonzoda 80b48eed0b Fix Path.copyToRecursively when copying across file systems #KT-55935
Merge-request: KT-MR-8705
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2023-02-07 08:25:54 +00:00
Alexander Korepanov 9324cf3360 [JS IR] Support function type interfaces in incremental cache infrastructure
The patch removes logic of generating extra IrFiles (fake file) into
 IrModuleFragment for the function type interfaces during klib deserialization,
 because IC infrastructure can not process files which do not exist in klib.

 Instead of adding extra IrFiles during deserialization, the empty files
 with required packages are added into Kotlin/JS stdlib physically.
 These files are used as containers for function type interface declarations.

 Since Kotlin/WASM uses the same klib loading infrastructure as Kotlin/JS,
 the the empty files are added into Kotlin/WASM stdlib as well.

 The patch also adds a check that IrModuleFagment has files only from klib.

^KT-55720 Fixed
2023-02-03 12:23:48 +00:00
Svyatoslav Kuzmich abf70a586c [Wasm] stdlib API: make kotlin.assert internal
Being disabled by default
 and not well-documented, these functions cause confusion among early
 adopters as to why their code don't work properly.

Assert APIs need a proper design across Kotlin platforms.
 Since APIs are not available in common code and K/JS, it is premature
  to have such a general feature in a new experimental platform.

Compiler tests:
* Mute tests that rely on assert.
* Replace JVM-specific assert calls with require calls and unmute passed K/JS tests.

Merge-request: KT-MR-8636
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2023-02-02 07:06:12 +00:00
Alexander.Likhachev ca60a4fcf9 [Build] Add a temporary workaround for KT-56357 2023-02-01 14:56:07 +01:00