Ilya Gorbunov
3c37bbaf64
Duration: normalize to avoid negative zeroes (KT-44168)
...
The current comparison method of inline classes makes
durations of positive and negative zeroes non-equal.
To avoid that, normalize the duration value upon construction
preventing negative zero being stored.
2020-12-31 19:44:39 +03:00
Ilya Gorbunov
ae6f10df3b
Duration: reject NaN duration values (KT-44168)
2020-12-31 19:44:10 +03:00
Abduqodiri Qurbonzoda
662787b12b
Straighten Char-to-code and Char-to-digit conversions out #KT-23451
2020-12-31 12:07:41 +03:00
Abduqodiri Qurbonzoda
1314adb6f7
Locale-agnostic case conversions by default #KT-43023
2020-12-30 10:08:25 +03:00
Svyatoslav Scherbina
0f4173cdfa
Fix running stdlib tests in worker on Native
...
Add `@SharedImmutable` or `@ThreadLocal` where required.
2020-12-14 19:03:06 +03:00
Ilya Gorbunov
28168bf230
Correctly implement specialized MutableEntrySet.contains KT-41278
...
This is a workaround for the problem KT-43321.
Introduce an intermediate abstract set specialized for Map.Entry elements
and implement 'contains(Map.Entry)' method there.
Then inherit that intermediate set in entrysets of JS HashMap,
JS LinkedHashMap, JVM MapBuilder, that are specialized for
MutableMap.MutableEntry elements, so that no override of 'contains' is
required anymore.
This allows to avoid incorrect special 'contains' bridge being generated
that otherwise rejects all arguments except ones of MutableEntry type.
2020-12-14 12:42:47 +03:00
Ilya Gorbunov
149bcc2d22
Revert using regex Pattern in String.replace
...
Use String.indexOf(..., ignoreCase) instead in all branches to preserve
compatibility with behavior before 1.4.20 that used String.split which
essentially relied on that String.indexOf
#KT-43745 Fixed
2020-12-04 17:43:54 +03:00
Roman Artemev
9ef7273641
Unmute stdlib tests after bootstrap advance.
2020-10-14 12:06:02 +03:00
Roman Artemev
fa7104213c
Temporary disable test until bootstrap is updated
2020-10-12 15:22:44 +03:00
pyos
adcbfc7b4c
IR: add an emptiness check to all unsigned until loops
...
Unlike signed integers, a larger unsigned type does not mean a lower
minimum value, so `x - 1` can overflow even if `x` is casted to a larger
type.
#KT-42186 Fixed
2020-10-07 12:53:00 +02:00
Ilya Gorbunov
fafb4a7914
Use regex for case-insensitive String.replace
...
KT-41799
2020-10-02 00:29:26 +03:00
Abduqodiri Qurbonzoda
36e6247125
Add more details about bit shift operations #KT-41112
2020-09-16 04:05:12 +03:00
Ilya Gorbunov
349cad7b9a
Minor: migrate remaining scanReduceIndexed usages
2020-09-11 19:08:04 +03:00
Alexander Udalov
ae9c1af883
Do not use erroneous unsigned/signed comparison in UnsignedArraysTest
...
The error SIGNED_CONSTANT_CONVERTED_TO_UNSIGNED is suppressed in this
file, and JVM IR is not able to generate comparisons of UInt and Long
(KT-41780).
2020-09-10 19:27:09 +02:00
Ilya Gorbunov
010e530ac4
Make common KClass extend common KClassifier
...
It already does that in all platforms.
Add KClass common API test.
2020-07-13 23:20:52 +03:00
Ilya Gorbunov
20683d62a6
Postpone introducing common StringBuilder.capacity() function
...
Its support complicates JS StringBuilder implementation with no actual
performance improvements. Benefits of having capacity() function
in common code are also not completely clear.
Relates to KT-33069
#KT-40168
2020-07-10 18:49:39 +03:00
Vsevolod Tolstopyatov
3270c7e016
Introduce CancellationException
...
#KT-39126 Fixed
2020-07-02 11:01:28 +03:00
Abduqodiri Qurbonzoda
d3fb9cc5f3
Deprecate with error mixed Int/FP contains operator for ranges KT-22423
2020-06-29 12:18:19 +03:00
Ilya Gorbunov
53cbcfac5a
Validate arguments of KTypeProjection constructor
...
#KT-34596 Fixed
2020-06-25 18:25:24 +03:00
Ilya Gorbunov
696701d377
Drop deprecated MutableMap property delegation operator
2020-06-22 12:29:25 +03:00
Ilya Gorbunov
e9c4f531eb
Increase deprecation level for previously deprecated API
...
- unsupported common exceptions
- common 'synchronized'
- jquery API
- experimental kotlin.time API
- js Math object
- DefaultAsserter constructor-like fun
2020-06-22 12:29:24 +03:00
Ilya Gorbunov
130987fa1e
Provide flatMapIndexed operation
...
- similar to flatMap, but transform function takes index and element
#KT-36894
2020-06-19 17:55:15 +03:00
Abduqodiri Qurbonzoda
c923b2e139
Deprecate contains, indexOf, lastIndexOf functions of Float/DoubleArray #KT-28753
2020-06-19 08:39:47 +03:00
Abduqodiri Qurbonzoda
97c688057d
Compare floating point values asList elements in total order #KT-28753
2020-06-19 08:39:47 +03:00
Abduqodiri Qurbonzoda
16b62b8e65
Introduce minWithOrNull and maxWithOrNull extension functions #KT-38854
2020-06-19 04:53:53 +03:00
Abduqodiri Qurbonzoda
194791a168
Introduce minByOrNull and maxByOrNull extension functions #KT-38854
2020-06-19 04:53:51 +03:00
Abduqodiri Qurbonzoda
846a7823ad
Introduce minOrNull and maxOrNull extension functions #KT-39064
2020-06-19 04:53:49 +03:00
Ilya Gorbunov
de6154980d
Make ReadOnlyProperty and PropertyDelegateProvider fun interfaces
2020-06-17 19:45:15 +03:00
Abduqodiri Qurbonzoda
6a2fed33d3
Deprecate old CharArray to String conversion api #KT-31343
2020-06-08 04:12:28 +03:00
Abduqodiri Qurbonzoda
820353ee0e
Promote scanReduce deprecation level to error
2020-06-07 10:05:40 +03:00
Ilya Gorbunov
d19f9ee0c5
Simplify min/max implementation
2020-06-02 19:01:44 +03:00
Ilya Gorbunov
b4ba00ca36
Document and test NaN propagation of maxOf/minOf
...
Also simplify minOf/maxOf implementations
#KT-38708
2020-06-02 19:01:44 +03:00
Ilya Gorbunov
7b68de38e1
Introduce minOf/maxOf, minOfWith/maxOfWith and their OrNull variants
...
#KT-38708 Fixed
2020-06-02 19:01:44 +03:00
Ilya Gorbunov
6a24becd1d
Introduce sumOf with various selector types
...
#KT-11253
2020-06-02 19:01:43 +03:00
Ilya Gorbunov
bdd53ee9cd
Introduce new overloads of flatMap and flatMapTo
...
- Sequence<T>.flatMap((T) -> Iterable<R>)
- Iterable<T>.flatMap((T) -> Sequence<R>)
- Array<T>.flatMap((T) -> Sequence<R>)
- Map.flatMap((Entry) -> Sequence<R>)
KT-34506
2020-06-02 19:01:43 +03:00
Abduqodiri Qurbonzoda
1bd63bb07f
Make consistent parameter nullability with appendLine
2020-06-01 22:00:36 +03:00
Abduqodiri Qurbonzoda
e05eeea6cd
Promote common StringBuilder to stable
2020-06-01 22:00:34 +03:00
Ilya Gorbunov
7cc4cc0cec
Make testDeepTreeOddEvenNodesMutual two times easier
...
Otherwise it often times out in JS tests in a parallel build.
2020-06-01 20:15:55 +03:00
Roman Elizarov
46b426ef77
KT-31741: stdlib: DeepRecursiveFunction ( #3398 )
...
Introduces experimental coroutines-based framework to execute deeply recursive functions that utilities the heap and thus avoid StackOverflowError.
2020-05-27 10:06:00 +03:00
Abduqodiri Qurbonzoda
f3145454f2
Decommonize collection builder implementations
2020-05-23 03:40:44 +03:00
Ilya Gorbunov
d37c412f76
Suppress a couple more warnings
2020-05-19 19:24:00 +03:00
Ilya Gorbunov
bf21e1282a
Suppress most of unused parameter warnings
2020-05-19 19:24:00 +03:00
Abduqodiri Qurbonzoda
0c7b04a495
Document fromIndex and toIndex parameters #KT-38388
2020-05-09 23:34:03 +03:00
Abduqodiri Qurbonzoda
ec166db506
Implement collection builders
2020-04-30 02:28:41 +03:00
Abduqodiri Qurbonzoda
d6472aa700
Reverse range and sortDescending range #KT-36955
2020-04-20 22:06:28 +03:00
Abduqodiri Qurbonzoda
57597f5900
Fix String.toHashSet tests
2020-04-20 04:08:29 +03:00
Abduqodiri Qurbonzoda
0d5ec27ac4
toHashSet is suboptimal for inputs with a lot of duplicates #KT-23142
2020-04-19 07:58:49 +03:00
Ilya Gorbunov
893021f22b
Introduce runningFold and runningReduce operations
...
runningFold is a synonym for scan,
runningReduce replaces scanReduce.
#KT-38060
2020-04-15 23:28:07 +03:00
Ilya Gorbunov
ea1e16e309
Delegate properties to property references
...
#KT-8658
2020-04-15 18:37:33 +03:00
Abduqodiri Qurbonzoda
08ff52bee4
Introduce StringBuilder.appendLine in stdlib-common #KT-37839
2020-04-13 14:27:53 +03:00