Commit Graph

3595 Commits

Author SHA1 Message Date
Artem Kobzar 23384dd57d [K/JS] Remove @Suppress from stdlib @JsExport.Ignore 2022-10-19 10:22:15 +00:00
Igor Yakovlev 5218acd5c9 [WASM] Optimise interop adapters 2022-10-18 20:48:12 +02:00
Sergey Bogolepov c6bbce986d [K/N] Fix KT-54498
Forward users to kotlinlang.org instead of new_mm.md because the latter
is obsolete now.
2022-10-17 14:36:59 +00:00
Abduqodiri Qurbonzoda 71381ec8e2 [K/N] HashMap/HashSet doesn't reclaim storage after removing elements #KT-53310 2022-10-07 11:19:31 +00:00
Nikolay Krasko b5b58f40d6 Workaround instability of Gradle builds caused by the default encoding
The encoding setting from org.gradle.jvmargs is not applied
(https://github.com/gradle/gradle/issues/22292) during
the :kotlin-stdlib-js:compileJs, causing instability in kotlin.js.map
(https://youtrack.jetbrains.com/issue/KT-50589) on machines where
default encoding is not UTF-8.

This reverts commit d7ef5efa6a.

KTI-932
2022-10-05 10:57:46 +00:00
Artem Kobzar eb2326eabb [K/JS] Add ability to exclude declarations from export by a new annotation @JsExport.Ignore. 2022-10-03 11:07:25 +00:00
Abduqodiri Qurbonzoda 917c8606f5 Document @Synchronized behavior on extension functions #KT-32469 2022-10-03 10:16:37 +00:00
Ilya Gorbunov 607f15b55b Sycnhronize docs of primitives in JS-IR, Wasm, Native sources 2022-10-02 19:04:37 +00:00
Ilya Gorbunov 34de2d9155 Trim trailing spaces in generated docs of builtins 2022-10-02 19:04:36 +00:00
Paŭlo Ebermann 418c530820 docs: mod/rem: clarify who is dividend and divisor 2022-09-30 15:41:55 +03:00
Artem Kobzar d7ef5efa6a [K/JS] Remove ligature that breaks map files comparison pipeline (hack for KT-50589 issue) 2022-09-22 16:03:14 +00:00
Vsevolod Tolstopyatov 137e5d67d0 Scrupulously document OptIn-related annotations
#KT-49425

Merge-request: KT-MR-7094
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
2022-09-22 13:57:45 +00:00
Pavel Mikhailovskii f8fd23e373 KT-8575 Add tests and disable reflection for Java synthetic property references 2022-09-22 13:33:28 +00:00
Igor Yakovlev 081cd4a4a8 [WASM] Support nullable types for external functions 2022-09-22 11:54:04 +02:00
Nikolay Krasko 1630386712 Move to JDK_X_Y variables 2022-09-21 22:53:19 +00:00
Ilya Goncharov 0efb8a64bf [Gradle, JS] Add fileTree for kotlin2jsCompile 2022-09-21 10:58:23 +00:00
Ilya Goncharov eeb0520b48 [Gradle, JS] Migrate kotlin-stdlib-js 2022-09-21 10:58:21 +00:00
Ilya Gorbunov e35ace5d3a Deprecate AbstractDoubleTimeSource
There are too few usages of it, and it can be mostly replaced with AbstractLongTimeSource.
2022-09-19 19:16:40 +00:00
Ilya Gorbunov 57c9d61291 ComparableTimeMark and specialized TimeSource KT-54082
- Introduce ComparableTimeMark interface extending TimeMark,
and TimeSource.WithComparableMarks - a time source that returns such time marks.
- Implement ComparableTimeMark in ValueTimeMark and AbstractLong/DoubleTimeMark classes.
2022-09-19 19:16:40 +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
Yahor Berdnikau e94c1ea0ed Update Kotlin repo for bootstrap update
^KT-27301 Fixed
2022-09-19 12:30:42 +02:00
Artem Kobzar a368fc37c7 [K/JS] Make interface subtyping faster and lighter. 2022-09-19 10:26:11 +00:00
Abduqodiri Qurbonzoda f38654740e Use Path.deleteRecursively() in the Path.cleanupRecursively() test util 2022-09-18 22:49:02 +00:00
Abduqodiri Qurbonzoda 90189f9c39 Provide Path.copyToRecursively() and Path.deleteRecursively() #KT-52928 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 7271de2642 Test Path.copyTo when source and target paths are the same file 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 6fde3391d3 Test that Path.copyTo() does not follow symlink in destination 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda 6ddb0326bb Test that Path.copyTo() copies the source file access permissions 2022-09-18 22:49:01 +00:00
Abduqodiri Qurbonzoda f0da420b1f Move Path.tryCreateSymbolicLinkTo to AbstractPathTest.kt 2022-09-18 22:49:00 +00:00
Ilya Gorbunov 75e1effbc5 Make Optional extensions stable since 1.8
KT-51907, KT-53277
2022-09-17 22:52:46 +00:00
Ilya Gorbunov b76854eddf Simplify signatures of Optional extensions getOrDefault and getOrElse
Two generic types are not need to cover the same use cases.

KT-50484
2022-09-17 22:52:46 +00:00
Leonid Startsev c8647841dc Added documentation for MagicApiIntrinsics.voidMagicApiCall
Remove mavenLocal() from repos
2022-09-16 14:34:30 +00:00
Alexander Korepanov 47bbd5e8c1 [JS IR] Add work around in EnumEntriesList for JS IR to avoid name clashes
JS IR generates bridges with type checks for special class methods,
 however if parent and child type parameters are same,
 the JS signature for the generated brige will be clashed with
 the JS signature of original method.

 This patch changes type parameter name of EnumEntriesList to avoid the clash.

^KT-54011 Fixed
2022-09-16 07:19:20 +00:00
Igor Yakovlev c94a051c19 [WASM] Renew to Milestone 6 instructions set 2022-09-15 16:27:42 +00:00
Igor Yakovlev 95396eb61a [WASM] When expressions optimisations for String and Int constant cases 2022-09-15 16:27:39 +00:00
Igor Yakovlev fff6b16483 [WASM] Wasm string.plus optimisations 2022-09-15 16:27:39 +00:00
Ilya Gorbunov 18e4d9e16c Deprecate modules of the empty artifacts to discourage their usage
#KT-51907
2022-09-15 15:38:33 +00:00
Ilya Gorbunov 1b6a462057 Move contents of stdlib-jdk7/8 into stdlib
#KT-51907
2022-09-15 15:38:32 +00:00
Ilya Gorbunov b53a6beb61 Loosen the signature of declaringJavaClass to accept Enum<E> instead of E
KT-54005
2022-09-14 13:39:25 +00:00
pyos 41299287cf Remove incorrect override in TypeVariableImpl
The correct return type of getAnnotatedBounds is Array<AnnotatedType>.
This fact causes some problems now that kotlin-stdlib is targeting JDK
1.8:

  * the compiler generates a bridge to the incorrect "override" that
    attempts to cast an empty Array<Annotation> into the correct type,
    which fails because those two types are unrelated;

  * on Android, touching this method in any way (via reflection) on
    any API version causes a ClassNotFoundException;

  * tools that validate references in libraries when compiling for
    Android complain about the bridge because they know the returned
    type does not exist.

The easiest solution is to simply remove the override and leave
getAnnotatedBounds unimplemented, making it throw AbstractMethodError
when called. This is the behavior it previously had anyway, as
kotlin-stdlib targeting JDK 1.6 lacked a method with the correct
signature.
2022-09-14 15:00:57 +02:00
Abduqodiri Qurbonzoda 4e1cb12024 Remove deprecated Experimental and UseExperimental annotation classes #KT-53864 2022-09-13 17:19:01 +03:00
Abduqodiri Qurbonzoda b388c7503b Advance Int/Long/Double.units deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda 89b5ce1ed7 Advance Duration.toLongUnits() deprecation level to ERROR #KT-53864 2022-09-11 23:49:07 +03:00
Abduqodiri Qurbonzoda b1300332ee Advance Duration.inUnits deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Abduqodiri Qurbonzoda 0b4ceb0897 Advance Duration.units(value) deprecation level to ERROR #KT-53864 2022-09-11 23:49:06 +03:00
Abduqodiri Qurbonzoda 7060811c8b Remove the brittle contains optimization code #KT-47707 2022-09-11 10:54:37 +00:00
Alexander Udalov 686cd82327 Serialize OptIn to builtins, improve tests
Skip SOURCE-retention annotations in builtins serialization tests,
because otherwise the source analysis result can't be equal to the
metadata deserialization result.

 #KT-53073 Fixed
2022-09-09 21:31:39 +02:00
Alexander Udalov 87d3ce6ded Write a copy of SMAP to a new annotation
To make it available for dynamically attached JVMTI agents.

`@SourceDebugExtension` annotation value is equal to the
SourceDebugExtension attribute value, which is checked now for all box
tests. The difference is that the annotation stored in the constant
pool, which is available for dynamically attached JVMTI agents.

 #KT-53438 Fixed
2022-09-09 14:32:35 +02:00
Abduqodiri Qurbonzoda 0db9326105 Introduce a deprecated StringBuilder.append(CharArray, Int, Int) in Common #KT-52336 2022-09-08 14:34:38 +00:00
Abduqodiri Qurbonzoda faedd76b32 Remove deprecation from ConcurrentModificationException constructors #KT-53927
The constructors were introduced in jdk7,
thus their usage was prohibited in Common code.
Now that jvmTarget is 1.8 and jdk8+ is used to compile stdlib,
these constructors are available on all platforms.
2022-09-08 14:01:09 +00:00