Commit Graph

1649 Commits

Author SHA1 Message Date
Ilya Gorbunov 80f2efb625 joinTo/joinToString: Do not call toString on elements that are already CharSequence or Char.
#KT-15557
2017-01-13 19:49:57 +03:00
Ilya Gorbunov 0c27e07e8c Improve headers of Appendable and StringBuilder 2017-01-13 19:41:59 +03:00
Ilya Gorbunov afdc7b94da Add headers for print and println.
#KT-15458 fixed
2017-01-13 19:41:59 +03:00
Ilya Gorbunov be95f66b13 Minor: remove unnecessary header. 2017-01-13 19:41:59 +03:00
Ilya Gorbunov cdfb72ab76 Provide protected toArray implementation in AbstractCollection.
Relates to #KT-13898
2017-01-13 19:38:28 +03:00
Ilya Gorbunov 6273ab5d43 Hold back eachSumOf for a while: fixups.
Remove unneeded import.
2017-01-11 20:04:00 +03:00
Ilya Gorbunov 4816474d70 Hold back eachSumOf for a while. 2017-01-11 16:49:45 +03:00
Ilya Gorbunov 0dfcbdf072 Improve docs, use consistent naming for parameters, rename unused parameters of lambdas to _. 2017-01-11 16:49:45 +03:00
Ilya Gorbunov 04a0f0a036 Rename Grouping.elementIterator to sourceIterator 2017-01-11 16:49:45 +03:00
Ilya Gorbunov 6d3a71c691 Minor refactoring: use mapValuesInPlace optimization, delegate aggregate implementation to aggregateTo. 2017-01-11 16:49:45 +03:00
Ilya Gorbunov d73744f1c0 Tests for group-and-fold operations 2017-01-11 16:49:45 +03:00
Ilya Gorbunov 2a2b417025 KEEP-23 implement group and fold operations
Docs for group-and-fold operations

Fix implementation for countEach and sumEachBy

countEach and sumEachBy implementations for JS

Rename keySelector to keyOf

Generate additional sources for groupingBy + headers

Rename countEach and sumEachBy to eachCount and eachSumOf.
2017-01-11 16:49:45 +03:00
Ilya Gorbunov 3bf38e62c8 Add a note about NaN propagation for floating point specializations. 2017-01-11 14:45:21 +03:00
Ilya Gorbunov 897e9658ac Do not run total order tests on JS 2017-01-11 14:45:19 +03:00
Ilya Gorbunov 0bf2ba8701 Introduce new overloads of max and min to fix NaN propagation behavior on JVM. 2017-01-11 14:45:18 +03:00
Ilya Gorbunov 74331f8eaa Add NaN propagation and total ordering tests. 2017-01-11 14:45:16 +03:00
Ilya Gorbunov 6041a7d6c8 Add tests for normal cases of maxOf/minOf 2017-01-11 14:45:14 +03:00
Ilya Gorbunov 844c68286a Refactor: replace Math.min with minOf in common code.
Add temporary import of kotlin.comparisons where required.
2017-01-11 14:42:36 +03:00
Ilya Gorbunov 51c24a0c3c Introduce minOf/maxOf in kotlin.comparisons. #KT-7417 2017-01-11 14:42:36 +03:00
Ilya Gorbunov 35d433160e Move more logic of 'use' into 'closeSuppressed', rename the latter to 'closeFinally', that will result in more compact inline call expansions. 2017-01-11 14:35:38 +03:00
Ilya Gorbunov a71b68268d Refactor exception suppression to provide Throwable.addSuppressed extension in kotlin-stdlib.
Place Closeable and AutoCloseable extensions to separate files (CloseableKt and AutoCloseableKt).
#KT-15477 Fixed
2017-01-11 14:35:38 +03:00
Ilya Gorbunov 076a94f7f2 Provide parameterless mutable collection factory functions.
#KT-15630
2017-01-11 14:33:17 +03:00
Mikhael Bogdanov dc4cdbf82d Fix for KT-14162: Support @InlineOnly on inline properties
#KT-14162 Fixed
2017-01-10 14:09:41 +01:00
Ilya Gorbunov 5db75c993b Introduce array-like list instantiation functions.
#KT-14935 Fixed
2016-12-30 20:00:45 +03:00
Ilya Gorbunov 822e58ad83 Map.getOrImplicitDefault is exposed public as Map.getValue
#KT-11851
2016-12-29 07:49:27 +03:00
Alexander Udalov c4f731b987 Write Kotlin-Version to runtime artifacts built with Maven
Add a test that checks that Kotlin-Version and Kotlin-Runtime-Component have
been written to all relevant runtime libraries
2016-12-26 17:46:36 +03:00
Ilya Gorbunov 9619e08c9b Use emptyArray in orEmpty. 2016-12-24 02:03:48 +03:00
Ilya Gorbunov 05dcaccf09 Do not require array extensions being reified to create new array.
#KT-15377
2016-12-24 01:55:33 +03:00
Ilya Gorbunov c43e4f6682 Uncomment some assertions for overflow behavior that now can pass in JS 2016-12-23 18:14:32 +03:00
Ilya Gorbunov 6b509892cb Remove manual overflow for JS arithmetic operations 2016-12-23 18:14:32 +03:00
Denis Zharkov d0ba048342 Refine coroutine/suspend functions ABI
- `invoke` method must always start a suspend functions
- For creation of coroutine that has not been started yet, there are
two special internal interfaces `SuspendFunction0`/`SuspendFunction1`
2016-12-22 11:08:42 +03:00
Ilya Gorbunov 6ee8a23ddd JS: Drop native map get/set intrinsics altogether.
MutableMap.set extension operator is now common among stdlib and stdlib-js.
#KT-2323
2016-12-20 18:00:19 +03:00
Ilya Gorbunov c6a812b11c Fix some API holes in headers 2016-12-20 14:02:01 +03:00
Ilya Gorbunov 2209631f1a Add SinceKotlin to new coerceIn method. 2016-12-19 18:36:52 +03:00
Ilya Gorbunov 10f8e70322 Rename ClosedComparableRange to ClosedFloatingPointRange 2016-12-19 18:36:52 +03:00
Ilya Gorbunov b2ccea87f3 Temporary workaround to generate functions with optional parameters with bodies in common code. 2016-12-16 04:36:30 +03:00
Ilya Gorbunov b72e5c038d Generate common headers to common/src/generated 2016-12-16 04:36:29 +03:00
Ilya Gorbunov 4f2593fb99 Add preprocessed JVM stdlib sources as common sources 2016-12-16 04:36:27 +03:00
Ilya Gorbunov 88a14056b7 Add hand-written headers for common stdlib 2016-12-16 04:36:25 +03:00
Ilya Gorbunov d381b56d47 Add module for common stdlib 2016-12-16 04:36:23 +03:00
Ilya Gorbunov 75992173b6 Unify Array.plus and plusElements function templates between JVM and JS. 2016-12-16 04:36:21 +03:00
Ilya Gorbunov 202cd81134 Unify Array.copyOf and copyOfRange function templates between JVM and JS. 2016-12-16 04:36:20 +03:00
Ilya Gorbunov 572a63f0e2 Unify Array.sort and sortWith function templates between JVM and JS.
Introduce new inline-only overload Array<out T: Comparable<T>>.sort().
2016-12-16 04:36:18 +03:00
Ilya Gorbunov e890cb137f Unify MutableList.reverse function template between JVM and JS 2016-12-16 04:36:16 +03:00
Ilya Gorbunov 085f476d22 Unify content[ToString, Equals, HashCode] function templates between JVM and JS 2016-12-16 04:36:14 +03:00
Ilya Gorbunov f3df648f4a Unify toTypedArray and asList templates between JVM and JS 2016-12-16 04:36:12 +03:00
Ilya Gorbunov 6ea1cde449 Generate additional sources for JS instead of copying them from JVM 2016-12-16 04:31:07 +03:00
Roman Elizarov 7b079bd1f7 Renaming after DM 2016-12-15 23:58:22 +03:00
Ilya Gorbunov 3bedbfae33 Move kotlin.comparisons.Comparator to kotlin package and remove the former from default imports. 2016-12-15 13:39:10 +03:00
Stanislav Erokhin 457918a6dd Changed name resolution for dynamic extension. Added annotation DynamicExtension. 2016-12-14 21:36:26 +03:00