Commit Graph

345 Commits

Author SHA1 Message Date
Dmitriy Novozhilov bc3b791cd8 [TMP] Remove :kotlin-coroutines-experimental-compat module 2021-01-28 13:19:34 +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
Iaroslav Postovalov 00506a75d3 Make Random implementations serializable (KT-25571)
Make Random.Default, XorWowRandom, and wrapper classes for JDK Random implement Serializable interface.

Co-authored-by: Ilya Gorbunov <ilya.gorbunov@jetbrains.com>
2020-12-31 04:10:28 +03:00
Abduqodiri Qurbonzoda 1314adb6f7 Locale-agnostic case conversions by default #KT-43023 2020-12-30 10:08:25 +03:00
Denis.Zharkov 4f5db241ea Add @JvmRecord annotation and relevant diagnostics
^KT-43677 In Progress
2020-12-09 16:29:03 +03:00
Ilya Gorbunov 0634351fbc Introduce pathString/absolute/absolutePathString
Rename invariantSeparatorsPath to invariantSeparatorsPathString
to have more consistent names of methods returning path strings.

KT-19192
2020-11-29 17:46:47 +03:00
Ilya Gorbunov 84f5a294f7 Allow passing null parent directory to createTempFile/Directory
null signifies the default temp directory.

KT-19192
2020-11-29 17:46:47 +03:00
Ilya Gorbunov 64d85f259c Relax writeText/appendText parameter type to CharSequence
KT-19192
2020-11-29 17:46:47 +03:00
Ilmir Usmanov aabe709079 Value classes: Add @JvmInline annotation to stdlib 2020-11-25 01:08:31 +01:00
Ilya Gorbunov fe098ec821 Revise functions in PathReadWrite
- Adjust implementations to avoid excessive vararg copies
- Remove options from forEachLine, it doesn't make much sense and
isn't consistent with the other read* functions.
- Revise inlineness of functions in PathReadWrite
- Compact implementations of those that are remained inline.
- Clarify docs of functions for reading the entire file

#KT-19192
2020-10-28 07:36:19 +03:00
Ilya Gorbunov a43cc0d1f9 Implement additional Path extensions
#KT-19192
2020-10-28 07:36:16 +03:00
Abduqodiri Qurbonzoda d2c9fc41f1 Replace @LowPriorityInOverloadResolution with @DeprecatedSinceKotlin #KT-37101 2020-07-15 20:36:57 +03:00
Mikhail Zarechenskiy 9be8c5b527 Update test data about built-ins 2020-06-29 14:25:09 +03:00
Ilya Gorbunov d41e8ed4ad Annotate KTypeProjection factory methods with JvmStatic
#KT-30084 Fixed
2020-06-25 18:25:24 +03:00
Ilya Gorbunov 9d111b9451 Update API dumps 2020-06-22 12:29:25 +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
Mikhail Bogdanov 477cca3c99 Add JvmDefaultWithoutCompatibility annotation 2020-06-19 11:57:35 +02: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 ec5a04a6c7 Update public jvm API dump after introduction of javaType
See 9e37b62f62
2020-06-18 12:44:23 +03:00
Valeriy.Vyrva c023a02884 Create SortedMap with Comparator and items
KT-34142
2020-06-04 02:04:22 +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
Ilya Gorbunov 23414496c4 Annotation to enable overload resolution by lambda return type
#KT-38480
2020-05-29 09:36:32 +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
Dmitry Petrov fcf8a91a38 Update kotlin-stdlib-runtime-merged.txt 2020-05-20 07:19:29 +03:00
Alexander Udalov 82551e91a4 Add KClass.isFun modifier to reflection
#KT-38881 Fixed
2020-05-14 14:05:51 +02:00
Ilya Gorbunov a95f205c1a Binary compatibility validator is now an external tool
Use its code from a dependency.
2020-05-13 19:00:35 +03:00
Alexander Udalov 0ce16b9d8c Support non-reified type parameters in typeOf in JVM and JVM_IR
#KT-30279 Fixed
2020-05-13 10:04:28 +02:00
Abduqodiri Qurbonzoda ec166db506 Implement collection builders 2020-04-30 02:28:41 +03:00
Alexander Udalov 9fa8e009c6 Support equals/hashCode for fun interfaces in JVM and JVM_IR
#KT-33455 Fixed
2020-04-29 12:15:50 +02:00
Abduqodiri Qurbonzoda d6472aa700 Reverse range and sortDescending range #KT-36955 2020-04-20 22:06:28 +03:00
Dmitry Petrov b06780988d KNVE: add doc comment and mark as PublishedApi 2020-04-20 20:07:51 +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 408b441a71 Rename extension toStringWithTrace to stackTraceToString
#KT-37603
2020-04-13 09:32:42 +03:00
Ilya Gorbunov 552bcdb31b Introduce Throwable.toStringWithTrace
#KT-37603
2020-04-13 09:32:41 +03:00
Ilya Gorbunov 7b7263c5bf Implement common Throwable.addSuppressed/suppressed extensions
Instead of `suppressed` Array we provide `suppressedExceptions` List

#KT-23737
2020-04-13 09:32:41 +03:00
Abduqodiri Qurbonzoda f2c05bf82c IR: Move annotation @JsExport to common source set in stdlib #KT-35966 2020-04-11 04:03:57 +03:00
Abduqodiri Qurbonzoda 4a7b1b210a Add onEachIndexed similar to forEachIndexed #KT-37161 2020-04-11 03:47:47 +03:00
Ilya Gorbunov 15319eb88e Implement in-place shuffle for arrays
Minor: reorder shuffle/shuffled extensions more consistently

#KT-25651 Fixed
2020-04-10 11:04:51 +03:00
Ilya Gorbunov e58f1c8932 Introduce Sequence.shuffled
#KT-37751
2020-04-10 10:59:40 +03:00
Alexander Udalov 9f758b4f25 Support toString for AdaptedFunctionReference subclasses
Also make it serializable like other lambdas, suspend lambdas and normal
callable references.
2020-04-08 19:16:38 +02:00
Alexander Udalov 0681231e99 Introduce AdaptedFunctionReference runtime class
It's used as a superclass for anonymous classes for adapted function
references. Its main feature is that it _doesn't_ inherit from KFunction
(as opposed to FunctionReference), as per the decision to postpone
reflection support for adapted function references in KT-36024.

 #KT-36024 Fixed
2020-04-08 19:15:38 +02:00
Alexander Udalov 3269a7e693 Change behavior of equals/hashCode on adapted function references
Function references are now equal if they refer to the same function,
and if the parameter/return type adaptation, which happens when a
reference is used where some function type is expected, is exactly the
same. This includes the number of expected positional parameters (which
can be affected by defaults/varargs), whether the coercion of vararg
parameter to Array type happened, and whether the coercion of return
type to Unit happened.

 #KT-37543 Fixed
2020-04-01 14:18:49 +02:00
Ilya Gorbunov f3fc1197ae Add SIZE_BITS and SIZE_BYTES constants to Double and Float
#KT-29182
2020-04-01 08:06:57 +03:00
Ilya Gorbunov 1c93911279 Make Double and Float known values constant
#KT-13887
2020-04-01 08:06:57 +03:00
Abduqodiri Qurbonzoda b1fac4e721 Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866 2020-03-12 18:08:55 +03:00
Abduqodiri Qurbonzoda b60633d79a Add associateWith to Array<T> #KT-30372 2020-03-12 18:06:54 +03:00
Abduqodiri Qurbonzoda e632d58936 Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161 2020-03-12 18:01:23 +03:00