Commit Graph

3652 Commits

Author SHA1 Message Date
Abduqodiri Qurbonzoda 1b258646be Specify benchmarks repository for Base64 2023-01-22 02:02:38 +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
Ilmir Usmanov d18672bfb1 Wrap continuation with ContinuationImpl on callable references
in startCoroutineUninterceptedOrReturn. Otherwise, the coroutine will
not be interceptable later.

Add a test, which checks, that intercepted continuation is released.

 #KT-55869
2023-01-19 00:35:36 +00:00
Artem Kobzar 71486a321c [K/JS] Add support of compilation with ES-classes 2023-01-17 18:14:17 +00:00
Dmitriy Novozhilov 8d728d4f53 Revert "[FE 1.0] Deprecate declaration of expect and actual in the same module"
This reverts commit b09561c3c3.

It was decided to postpone this warning till 1.9
This is needed to provide proper IDE support

^KT-40904 Open
^KT-55177 Open
2023-01-17 18:02:50 +00:00
Dmitriy Novozhilov b09561c3c3 [FE 1.0] Deprecate declaration of expect and actual in the same module
^KT-40904 Fixed
^KT-55177 Fixed
2023-01-17 09:43:14 +00:00
Abduqodiri Qurbonzoda ba2833b90f Mark Base64 API with ExperimentalEncodingApi 2023-01-16 11:24:50 +00:00
Abduqodiri Qurbonzoda 954ec1f63c Introduce @ExperimentalEncodingApi for binary-to-text encoding API 2023-01-16 11:24:50 +00:00
Abduqodiri Qurbonzoda dc03a03762 Introduce basic, url-safe and mime Base64 variants #KT-9823 2023-01-16 11:24:49 +00:00
Svyatoslav Kuzmich d14d4c8510 [Wasm] Support JsModule and JsQualifier 2023-01-13 21:58:34 +00:00
Denis.Zharkov b009ee3744 Add @SinceKotlin and KDoc for ContextFunctionTypeParams
Initially, it was added accidentally as part of e3f987459c
and missed all out processes.

Adding @SinceKotlin("1.7") after the annotation has already been
published before is not really a problem, because it only may be used
with an experimental `-Xcontext-receivers` flag, thus it doesn't have
to be a part of our regular backward compatibility routine.

^KT-55226 Fixed
2023-01-12 16:53:48 +00:00
Ilya Goncharov 816971ed47 [JS] Use correct source for stdlib jar, because of lazy java source sets
^KT-55862 fixed
2023-01-11 13:35:02 +00:00
Svyatoslav Kuzmich 1564de5859 [Wasm] Support external vararg
Initial implementation copies Wasm array to JS array and spreads it
2023-01-11 10:35:36 +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 Gorbunov 916f733f73 Make k.c.Volatile since 1.9 in JVM and Common KT-55268, KT-55609
Leave it experimental since 1.8 for K/Native.
2023-01-04 17:28:46 +00:00
Ilya Goncharov b4c0cab22a [Gradle, JS] Regenerate API stdlib 2023-01-04 16:30:34 +00:00
Ilya Goncharov ba8cc877fd [Gradle, JS] Remove module dom-api-compat 2023-01-04 16:30:33 +00:00
Alexander Udalov ae6d4d268d Use short copyright from COPYRIGHT_HEADER in generated files 2023-01-02 22:52:18 +01:00
Mikhail Glukhikh bc5acb5e9d Regenerate built-ins copyright comments (year 2023) 2023-01-02 13:44:21 +01:00
Svyatoslav Kuzmich 9bc6b420a9 [Wasm][Stdlib] Add public APIs for linear memory access
Needed for interop with APIs that use linear memory.
2022-12-29 19:25:23 +00:00
Igor Yakovlev 35340f2f04 [Wasm] Fix stdlib String to Float parse 2022-12-29 11:57:47 +00:00
Igor Yakovlev 1b2b7ce34c [Wasm] Support Number type for external functions 2022-12-29 11:57:45 +00:00
Igor Yakovlev 4bd187ccea [Wasm] Move ItemArrayLike w3c declarations into the right package 2022-12-29 11:57:44 +00:00
Svyatoslav Kuzmich add5fa6e0d [Wasm] Minor: remove unused stdlib stub
Merge-request: KT-MR-8140
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2022-12-29 05:29:32 +00:00
Svyatoslav Kuzmich 3bbd8c291a [Wasm] Add @WasmImport annotation
Imports top-level function from given module
2022-12-28 12:13:18 +01:00
Abduqodiri Qurbonzoda fff593492d Introduce Common AutoCloseable & use #KT-31066
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-8113
Merged-by: Abduqodiri Qurbonzoda <abduqodiri.qurbonzoda@jetbrains.com>
2022-12-27 11:50:22 +00:00
Ilya Gorbunov e2d96da396 Introduce experimental kotlin.concurrent.Volatile annotation KT-55268, KT-55609
Use this annotation in tests to ensure it works the same at least on JVM
2022-12-23 19:07:30 +01:00
Ilya Gorbunov b6e6ca7c96 Deprecate Synchronized annotation in common and JS #KT-55344 2022-12-22 21:22:44 +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
Dmitriy Novozhilov 7cbe13dee9 [JS] Update testdata of ApiTest.test(Ir)Stdlib
Most likely it caused by 17e9a6a781
2022-12-21 22:30:08 +00:00
Abduqodiri Qurbonzoda fb31a29c39 [K/N] Fix stack overflow in regex when a quantifier is matched many times
Motivation:

Users often expect simple patterns, like `[a]+` or `[^a]+`, to work fast
and without any problems, even with long strings.
Char class from the first pattern matches only 'a' and gets wrapped into
LeafQuantifierSet, and works fine with long strings indeed.
Char class from the second pattern, however, matches any character
except 'a', including supplementary code points. So, the number of chars
it consumes is not known beforehand. There is no optimization for such
char classes, and if they are matched multiple times, the stack memory
gets exhausted.

Modification:

Introduce FixedLengthQuantifierSet node.
The node represents quantifier over constructs that consume a fixed
amount of characters for a given string and index. Such constructs don't
need backtracking to find a different match. Thus, it is possible for
the node to avoid recursion when matching multiple times.

Result:

Fixes KT-46211, KT-35508 and probably KT-39789. Reproducer for the
latter issue is no longer available, but error stacktrace resembles
those of the other issues.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda 6e50bbee3b [K/N] Set mayContainSupplCodepoints flag only when alt is updated
Motivation:

Calling AbstractCharClass.setNegative always leads to
mayContainSupplCodepoints being `true`, even when `alt` is already
equal to the argument. Given that CharClass always calls setNegative
with its constructor parameter - `negative`, mayContainSupplCodepoints
always gets set. i.e. `[a]` will have mayContainSupplCodepoints set.
mayContainSupplCodepoints affects what node (RangeSet or SupplementaryRangeSet)
wraps this char class. See Pattern.processRangeSet.
RangeSet is better optimized and avoids recursion when it is quantified.

Modification:

Set `mayContainSupplCodepoints` flag only when `alt` is updated.
When `alt` is updated, this char class gets inverted, hence now may
contain supplementary code points.
Otherwise, content of this char class does not change, i.e. no new
supplementary code points is added.

Result:

Fixes KT-46211.
2022-12-19 16:40:51 +00:00
Abduqodiri Qurbonzoda d7f166eda3 [K/N] Remove unused SupplementaryCharSet in regex
Motivation:

The node was never used. Perhaps, it was copied from apache harmony
but ultimately, despite possible performance impact, SequenceSet was
used instead. See Pattern.processCharSet and AbstractSet.first.
The performance impact wouldn't be noticeable anyway.

Modification:

Keeping unused code in project is not a good practice, so get rid of it.

Result:

Less code to maintain.
2022-12-19 16:40:50 +00:00
Takumi Maeomote c4f83adc2a Add sample for Map.asSequence (#5055) 2022-12-15 19:58:38 +03:00
Pavel Mikhailovskii 6db5f8ee7f KT-55123 Add a default constructor to "expect" JvmSerializableLambda 2022-12-07 16:41:11 +00:00
Svyatoslav Kuzmich 7ec6608e29 [Wasm] Add Promise and support tests that return Promise
Co-authored-by: Ilya Gorbunov <Ilya.Gorbunov@jetbrains.com>

Merge-request: KT-MR-7717
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
2022-11-25 20:56:47 +00:00
Zalim Bashorov 7f8f7aa050 [Wasm] Revert ref cast and test instructions to be compatible with Binaryen 2022-11-25 15:31:48 +01:00
Zalim Bashorov 5f140dac21 [Wasm] Remove wasm_ref_cast and use wasm_ref_cast_null inside the compiler 2022-11-25 15:31:47 +01:00
Ilya Gorbunov 7dd907342e Document the nature of natural order KT-54168 2022-11-25 14:09:10 +00:00
Ilya Gorbunov 0d0cc9250b Note about all() result on empty collections KT-54835 2022-11-25 14:09:09 +00:00
Ilya Gorbunov 77e03bb769 Minor fixes in math docs 2022-11-25 14:09:09 +00:00
Ilya Gorbunov b8728c18cb Fix Optional.asSequence docs 2022-11-25 14:09:09 +00:00
Abduqodiri Qurbonzoda 3f95b7e031 Clarify Map.getOrElse and MutableMap.getOrPut documentation #KT-21392 2022-11-25 09:37:37 +00:00
Igor Yakovlev c8306f1a3b [Wasm] Mark rotate functions with WasExperimental 2022-11-19 11:49:06 +01:00
Zalim Bashorov 919029f34f [Wasm] Add fast path for null in externRefToAny
- Introduce new intrinsics `wasm_ref_cast_null` & `wasm_ref_test_null`.
- Support getting type for immediate from generic argument.
- Remove redundant null check in `tryGetOrSetExternrefBox`.
2022-11-18 17:30:10 +01:00
Yahor Berdnikau e07e92c945 Raise 'kotlin.jvm.target.validation.mode' default value to 'error'.
Now target check intentionally runs always - even when Java sources are
empty. Java part configures publication 'org.gradle.jvm.version'
attribute which affect  published artifact consumers and should be the
same as Kotlin jvmTarget value.

^KT-54993 Fixed
2022-11-18 10:42:00 +00:00
Zalim Bashorov ab590e1279 [Wasm, stdlib] Change visibility for wasm_* helper functions to internal 2022-11-15 12:55:10 +01:00
Zalim Bashorov 2fc6cea681 [Wasm] Migrate to the new GC M6 instructions 2022-11-15 12:55:10 +01:00
Igor Yakovlev 210212c284 [WASM] Remove redundant parameters for w3c dynamic getters 2022-11-11 10:53:05 +00:00
Igor Yakovlev b6eb2b3620 [WASM] Add w3c bindings 2022-11-10 14:22:44 +00:00