Ilya Gorbunov
aedc704e77
[stdlib] Further merge js-ir specific sources
2023-10-19 03:11:54 +00:00
Ilya Gorbunov
911fa3bbbb
[stdlib] Merge js-ir specific sources into common js sources
2023-10-19 03:11:54 +00:00
Ilya Gorbunov
1d232c69d6
[stdlib] Move location of generated sources for js-IR compilation
2023-10-19 03:11:53 +00:00
Ilya Gorbunov
5f0a930ea3
[stdlib] Delete js-v1 sources
2023-10-19 03:11:53 +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
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
93b0a90172
Add missing SinceKotlin for new JS annotations, KT-6168
2023-08-21 12:49:21 +00:00
Nikita Bobko
d39755b578
[FE] Convert specific diagnostic for actual function with default arguments into a common incompatibility
...
^KT-59665 Fixed
Review: https://jetbrains.team/p/kt/reviews/11039/timeline
It's better to have this logic in common place
(AbstractExpectActualCompatibilityChecker) to avoid missing compilation
errors in the future
This commit fixes:
1. Missing compilation error for actual function with default arguments
for 'actual typealias' KT-59665
2. Missing compilation error for actual function with default arguments
for actual fake-override KT-59665
Alternative solution for KT-59665 is to create a special checker.
"incompatibility" vs "special checker":
Arguments for common incompatibility:
- What if we had a rule that expect and actual default params must
match? If so then it certainly would be an incompatibility.
- Technically, we do the matching of expect and actual params (because
we allow default params in common ancestors of expect and actual
declarations).
- It's hard to check that the actual definition doesn't use default
params because `ExpectedActualResolver.findActualForExpected` filters
out fake-overrides and doesn't return them. It's not clear logic for
me, that I'm afraid to touch.
implicitActualFakeOverride_AbstractMap.kt test breaks if you drop this
weird logic
- WEAK incompatibilities can be considered as "checkers". So it doesn't
matter how it's implemented, as a "incompatibility" or a "checker"
Arguments against common incompatibility:
- Although we match expect and actual declarations to allow default
params in common ancestors of expect and actual declarations, it's
still can be considered that we check that the actual declaration
doesn't have default params. And it doesn't feel right that we check
correctness of the actual declaration in expect-actual matcher.
- ~~It may change the rules of expect actual matching~~ (It's not true,
because ActualFunctionWithDefaultParameters is declared as WEAK
incompatibility)
2023-08-10 15:46:46 +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
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
Alexander Korepanov
ad3583ac38
[JS IR] Fix KClass equals for Nothing type
2023-07-21 14:48:30 +00:00
Alexander Korepanov
90498593f3
[JS IR] Fix review comments.
2023-07-21 14:48:30 +00:00
Alexander Korepanov
09501224e8
[JS IR] Add comments
...
^KT-59001
2023-07-21 14:48:30 +00:00
Alexander Korepanov
0b4a9499f0
[JS IR] Catch concurrent modifications of HashMap
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
5e2c1761fc
[JS IR] Implement InternalStringLinkedMap
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
058cc9def2
[JS IR] Rework HashSet
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
f834007da6
[JS IR] Remove unused code & comments & style fixes
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
2300facead
[JS IR] Rework HashMapEntries, get rid of LinkedHashMap
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
f202865080
[JS IR] Improve InternalStringMap iterators & Extend InternalMap interface
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
6f0628cb8a
[JS IR] Replace InternalHashCodeMap with InternalHashMap
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
6a1e14df0b
[JS IR] Implement InternalMap interface
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
6a77514a83
[JS IR] Get rid of HashMap EqualityComparator
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
402d5e63fd
[JS IR] Cleanup InternalHashMap
...
^KT-59001
2023-07-21 14:48:29 +00:00
Alexander Korepanov
e26c06f0e1
[JS IR] Copy paste native-wasm HashMap implementation
...
Copy from libraries/stdlib/native-wasm/src/kotlin/collections/HashMap.kt
^KT-59001
2023-07-21 14:48:29 +00:00
Artem Kobzar
044c0adae7
[K/JS] Implement an incremental compilation for the per-file granularity
2023-07-19 15:57:56 +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
Ilya Gorbunov
39e9996940
Rename js/annotations.kt to avoid duplicates in sources
...
The conflicting one is Annotations.kt from builtins that are merged together with js stdlib sources, thus leading to two files with the same name differing only by case.
2023-06-26 18:24:34 +00:00
Artem Kobzar
64158a8a2f
[K/JS] Add file-to-file compilation ^KT-6168 Fixed
2023-06-22 18:23:45 +00:00
Vsevolod Tolstopyatov
175cf5e833
KT-53327 replace Enum.values() with Enum.entries in CharCategory
...
Also, replace it in stdlib tests where appropriate and disable already unsupported legacy JS tests
^KT-53327 fixed
Co-authored-by: Artem Kobzar <Artem.Kobzar@jetbrains.com >
Merge-request: KT-MR-10632
Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com >
2023-06-21 14:40:16 +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
3be613ced8
[K/N] Use iterator in AbstractMutableList.indexOf/lastIndexOf
...
Instead of access by index. To avoid performance issues
when the subclass `get(index)` has non-constant time complexity.
It also aligns behavior with JVM.
2023-06-19 11:41:10 +00:00
Abduqodiri Qurbonzoda
295fdc36ce
Enum.valueOf throws inconsistent exception across multiple platforms #KT-35116
2023-06-16 22:18:20 +00:00
Abduqodiri Qurbonzoda
830c78773c
Align behavoir of collection constructors across platforms #KT-59192
...
The initialCapacity should be non-negative and loadFactor should be positive.
As a part of efforts to stabilize Native stdlib.
2023-06-08 12:41:40 +00:00
Abduqodiri Qurbonzoda
0bef1533e2
Improve documentation of collection constructors #KT-59192
2023-06-08 12:41:40 +00:00
Ilya Gorbunov
bbb36ce501
KT-58046 Promote time sources, time marks, measureTime to stable
2023-05-16 11:42:32 +00:00
Filipp Zhinkin
cadf4f63b0
KT-54739 Return single empty inst from collection builders(all src-sets)
...
Fixed remaining builders, added additional checks to a test.
^KT-54739 fixed
2023-04-26 12:05:15 +00:00
Ilya Gorbunov
f260b55810
Raise deprecation of js synchronized {} to error
2023-04-26 10:44:52 +00:00
Abduqodiri Qurbonzoda
2248f4ea33
Remove supportsNamedCapturingGroup flag in tests
...
Now it is true on all platforms
2023-04-26 10:44:21 +00:00
Abduqodiri Qurbonzoda
175566fe56
KT-51908 Common MatchGroupCollection.get(name) extension function
2023-04-26 10:44:21 +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
Ilya Gorbunov
ace2279631
Refactor helper function to run/not run block of common code on specific platform
...
Use it in StringBuilder tests
2023-04-25 13:55:04 +00:00
Filipp Zhinkin
50841e7cb0
KT-42589 Add listOf, setOf, mapOf overloads for a single value to common src-set
...
`listOf`, `setOf` and `mapOf` overloads were defined in some source-sets
but common source-set was missing it.
This change adds common definition of these methods and also add
declarations for source-sets that were previously
missing it.
^KT-42589 fixed
2023-04-20 08:42:15 +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
Abduqodiri Qurbonzoda
040fcee04e
[K/JS] Loosen StringBuilder.capacity() deprecation level to WARNING
2023-04-19 20:20:43 +00:00
Abduqodiri Qurbonzoda
7eba68e62b
[K/N] Commonize String.regionMatches function
...
As a part of efforts to stabilize K/N stdlib.
2023-04-19 20:20:42 +00:00
Ilya Gorbunov
0c1afcac67
KT-58046 Wrap hrtime array reading into a class
...
To achieve nice toString and proper equals/hashCode semantics of ValueTimeMark
2023-04-18 15:25:31 +00:00