Commit Graph

225 Commits

Author SHA1 Message Date
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
Yahor Berdnikau 73f6316f27 [repo] Enable warnings as errors for Gradle Kotlin scripts 2023-07-12 12:49:32 +00:00
Artem Kobzar cf949e8760 [K/JS] Support KClass<*>.createInstance reflection method ^KT-58684 Fixed 2023-07-06 18:18:14 +00:00
Artem Kobzar 9ad5910de9 [K/JS] Remove isObject check from runtime ^KT-57926 Fixed 2023-07-03 13:19:43 +00:00
Artem Kobzar 89507c1b82 [K/JS] Remove dead branches for jsIsType 2023-06-26 14:00:09 +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 039b5fca7a [K/JS] Use declared upper-bound types for parameters inside inlined functions body, instead of the provided types 2023-06-20 12:01:28 +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 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
Ilya Gorbunov b35b727d73 KT-53778 Remove experimental annotations from open ranges 2023-04-28 17:12:15 +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
Ivan Kylchik 2e836494f5 Rewrite primitives' generation using simple DSL 2023-04-20 08:18:58 +00:00
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 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
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
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
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
Artem Kobzar ab7b429298 [K/JS] Add ability to use is checks on external objects 2023-03-10 11:33:30 +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
Ilya Goncharov 9b4821be28 [Gradle, JS] Add module dom-api-compat
This reverts commit ba8cc877fd.
2023-02-22 11:00:11 +00: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 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
Ilya Goncharov d7c31f79a8 Do not suppress NPM related tasks, but be aware about checking of them in task graph 2023-01-19 13:43:57 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Abduqodiri Qurbonzoda ba2833b90f Mark Base64 API with ExperimentalEncodingApi 2023-01-16 11:24:50 +00:00
Artem Kobzar 642bbd38ba [K/JS] Move global interface id state into an object to prevent interface ids reinitialization ^Fixed KT-55758 2023-01-09 20:56:19 +00:00
Ilya Goncharov ba8cc877fd [Gradle, JS] Remove module dom-api-compat 2023-01-04 16:30:33 +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
Artem Kobzar 8a89b2f29f [K/JS] Remove the old interface runtime check because of bootstrapping
Merge-request: KT-MR-7457
Merged-by: Artem Kobzar <Artem.Kobzar@jetbrains.com>
2022-10-21 11:34:31 +00:00
Ilya Gorbunov 607f15b55b Sycnhronize docs of primitives in JS-IR, Wasm, Native sources 2022-10-02 19:04:37 +00:00
Artem Kobzar 73e7053c35 [K/JS] Use only single variant of default arguments function wrapper for exported and not-exported functions 2022-09-19 17:49:04 +00:00
Artem Kobzar d9c5f100db [K/JS] Use intrinsics instead of new functions in IR backend. 2022-09-19 13:04:16 +00:00
Artem Kobzar a368fc37c7 [K/JS] Make interface subtyping faster and lighter. 2022-09-19 10:26:11 +00:00
Nikolay Krasko 01f567a16d Disable yarn and npm tasks from the build when tests are not active
Kotlin build shouldn't depend on npm during while deploy artefacts tasks

^KTI-887 Fixed
^KT-53687 Related
2022-08-30 22:15:16 +00:00
Ilya Gorbunov 203a00151d rangeUntil member operator in builtins #KT-52933 2022-08-24 22:22:53 +00:00
Artem Kobzar 87038e7d8a [K/JS] feat: add logic under the flag for strict implicit export generating inside d.ts files. 2022-08-09 16:48:59 +00:00
Ilya Gorbunov cd9b36b4c3 Introduce OpenEndRange and make primitive ranges implement it
#KT-52932
2022-06-28 00:08:03 +00:00
Nikolay Krasko 405e90abee Apply -Xklib-relative-path-base to all KotlinCompile tasks
As absolute paths were also revealed in
   atomicfu.jar
   kotlin-stdlib-wasm
   kotlin-test-wasm

Use solution from Alexander Likhachev (avoid accessing
buildDir, projectDir in doFirst()) to prevent breaking the configuration
cache.

Should be removed after fixing KT-50876

KTI-729
2022-04-07 19:17:20 +00:00
Ilya Gorbunov 000165b12b Fix incorrect conversion of Long to String in base 36 in JS KT-48924 2022-03-30 06:13:51 +00:00
Artem Kobzar 0153f5d92a chore: set isComplete flag also for interfaces that do not contain constructor fields. 2022-03-21 18:53:04 +00:00
Artem Kobzar ac542d4c01 feat(JS/IR isInterfaceImpl perf): improve isInterfaceImpl performance by memoize an result. 2022-02-28 20:28:10 +00:00
Artem Kobzar 804eb61bf0 feat: add polyfills insertion for ES Next used features 2022-02-16 10:49:11 +00:00
Alexander Korepanov 769fbcf3d0 [JS IR] Improve performance for runtime typecheck
This is a part of KT-42743
2022-01-31 09:15:58 +00:00
Sergej Jaskiewicz d5e46e0607 [JS IR] Introduce intrinsics for slicing array-like objects 2022-01-27 11:06:16 +00:00