Ilya Gorbunov
5c2fe13a89
Refer to java.util.Arrays fully-qualified in generated code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
fae5c88f22
Remove java.util references from the common code
2016-11-16 18:47:42 +03:00
Ilya Gorbunov
8feaaf4df0
Allow to annotate generated API with SinceKotlin and annotate new array functions.
2016-11-08 18:08:59 +03:00
Ilya Gorbunov
dceec89572
JS: Array.toString is const, Array.contentToString is shallow, Array.contentDeepToString is deep and self-reference aware
...
#KT-13582
2016-11-08 17:23:45 +03:00
Ilya Gorbunov
a868eecb1a
Introduce contentEquals/HashCode/ToString for Arrays. Different methods for deep equals/hashCode/toString rather than overloads with a parameter, because most of the time it would be constant, and make these methods inline-only.
...
Make `contentEquals` infix function.
Add docs.
#KT-13582
2016-11-08 17:23:45 +03:00
Alexander Udalov
30a7790dca
Minimize references to java.util.Collections in stdlib sources
...
Only three usages are left in platform-independent code: in reverse, sort and
sortWith for mutable lists
2016-11-07 12:20:14 +03:00
Ilya Gorbunov
fed24c2be6
Docs: preserve empty lines in the generated documentation to separate summary and paragraphs in the body.
2016-08-09 17:43:12 +03:00
Mikhail Glukhikh
bf4231d65a
Standard library regenerated
...
(cherry picked from commit 68af26c)
2016-07-27 10:52:01 +03:00
Alexander Udalov
8f33830f29
Suppress UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS in several places
...
This is related to KT-6611 being fixed recently. Note that not all cases of
incorrect "cast never succeeds" were fixed
2016-07-13 13:42:42 +03:00
Ilya Gorbunov
d646afabb2
Document functions which return set or map preserving the order of elements/entries.
...
#KT-11632 Fixed
2016-05-08 03:24:03 +03:00
Ilya Gorbunov
249d08a66e
Handle special cases of drop, take, takeLast when it is known in advance that the result is a single-item list. #KT-9990
2016-04-29 22:21:19 +03:00
Ilya Gorbunov
a665b2183c
Optimize operations to return special collection implementations when result is empty or has single element.
...
#KT-9990
2016-04-29 22:21:19 +03:00
Valentin Kipyatkov
b551886889
Code cleanup: removed redundant semicolons
2016-04-29 11:26:25 +03:00
Ilya Gorbunov
409094f0f7
Make stdlib functions dependent on reified is checks available in JS.
...
#KT-11346 Fixed
2016-04-27 18:22:20 +03:00
Ilya Gorbunov
f35dc47b4e
Optimize snapshot operations to return special collection implementations when result is empty or has single element.
...
#KT-9990 Fixed
2016-03-31 21:30:59 +03:00
Ilya Gorbunov
e5dbb65ff7
JS: Remove declarations of unsupported SortedSet and TreeSet, make toSortedSet() jvm-only.
...
Fix completion test.
Relates to #KT-7480
2016-03-01 14:01:38 +03:00
Ilya Gorbunov
19fa2f51ea
Review and correct exception messages.
2016-02-27 00:52:30 +03:00
Ilya Gorbunov
00e30e417f
Cleanup: suppress warnings where appropriate.
2016-02-26 21:54:57 +03:00
Ilya Gorbunov
b19c0363fd
Clarify parameter order of lambda function parameter of *Indexed functions.
...
#KT-10953 Fixed
2016-02-26 20:47:26 +03:00
Ilya Gorbunov
0e0455daeb
Improve the documentation of binarySearch functions.
...
#KT-10198 Fixed
2016-02-26 20:31:05 +03:00
Ilya Gorbunov
1fca1cc607
Use foreach loop instead of directly taking iterator in sum and average.
...
Use indexed loop for arrays in reduce and reduceIndexed.
#KT-10579 Fixed
2016-02-09 22:51:39 +03:00
Ilya Gorbunov
b4ebaad8f5
Drop previously deprecated API.
2016-02-09 02:58:07 +03:00
Michael Bogdanov
4b203de608
INVISIBLE_MEMBER_FROM_INLINE renamed to NON_PUBLIC_CALL_FROM_PUBLIC_INLINE
2016-02-03 10:35:29 +03:00
Ilya Gorbunov
f19ef6e3d5
SAM-constructors for Iterable and Sequence interfaces.
2016-02-03 00:13:17 +03:00
Ilya Gorbunov
947fd84f1e
Minor: reorder primitive specializations in generated code (according to the order they defined in java).
2016-02-02 22:06:34 +03:00
Ilya Gorbunov
dccae6c3ff
Introduce annotation InlineExposed to indicate internal members effectively public due to usage in inlined functions.
...
Currently, doesn't affect anything.
Make collectionSizeOrDefault and collectionSizeOrNull internal, but expose them via inlining together with mapCapacity.
Make Regex(Pattern) constructor exposed by inlined Pattern.toRegex
2016-02-01 22:20:27 +03:00
Ilya Gorbunov
c7bd70732c
Inline-only in generated code
2016-02-01 22:09:07 +03:00
Gabriel Borges
d58efff974
Add foldIndexed and reduceIndexed groups of functions
...
- foldIndexed, foldRightIndexed, reduceIndexed and reduceRightIndexed have been added, in line with filterIndexed etc.;
- Test cases added appropriately for the new functions.
2016-01-31 02:45:02 +03:00
Ilya Gorbunov
d46501e11b
Make all remaining deprecations to be errors.
2016-01-27 18:34:32 +03:00
Ilya Gorbunov
8d02467e6d
Introduce plusElement and minusElement to disambiguate situations like List<List<T>> + List<T>
...
#KT-9992 Fixed
2016-01-27 00:00:01 +03:00
Ilya Gorbunov
90a239e74c
Provide toMutableList as a replacement for toArrayList.
2016-01-26 11:49:15 +03:00
Ilya Gorbunov
564155734b
Introduce associateTo and associateByTo with the destination MutableMap to fill.
2016-01-26 11:49:12 +03:00
Ilya Gorbunov
8224a4e186
Rename toMap and toMapBy to associate and associateBy
2016-01-26 11:49:03 +03:00
Ilya Gorbunov
7703252239
Provide groupBy and groupByTo with keySelector and valueTransform.
...
Rename parameters of groupBy, add type parameter for MutableMap to groupByTo.
2016-01-25 21:15:56 +03:00
Ilya Gorbunov
ef0d998fbc
Drop deprecations: *Raw functions.
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
85a02d40c6
Drop hidden declarations provided for binary compatibility
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
264c9a0fc9
Drop deprecated toGenerator and toLinkedList (again).
2016-01-22 05:54:38 +03:00
Ilya Gorbunov
67ef790abc
Move comparison related functions to kotlin.comparisons, update imports in stdlib.
2016-01-18 21:46:31 +03:00
Ilya Gorbunov
68971e2162
Remove redundant JvmName annotations for Array.copyOf, copyOfRange
2016-01-14 18:30:41 +03:00
Ilya Gorbunov
b99e1111f6
Do not use out projection for Array where appropriate.
2016-01-14 18:30:40 +03:00
Ilya Gorbunov
eb5b5331fb
Minor: reorder invariant arrays of objects in generated code
2016-01-14 18:30:39 +03:00
Ilya Gorbunov
362e463b26
Preserve type projection for Array.requireNoNulls.
...
#KT-10039 Fixed
2016-01-14 18:30:37 +03:00
Dmitry Petrov
c97294a066
stdlib fixes:
...
- 'sequence(initialValue: T?, ...)' should have LowPriorityInOverloadResolution
(otherwise 'sequence({...}, {...})' is ambiguous).
- 'copyOf' and 'copyOfRange' should be defined for 'Array<T>' only
('Array<out T>' version always loses to 'Array<T>', since the second one
is always more specific).
2015-12-30 10:44:00 +03:00
Ilya Gorbunov
055c71e8d0
Provide minWith and maxWith to find maximum and minimum values according to the given comparator.
...
#KT-9002 Fixed
2015-12-18 00:00:52 +03:00
Ilya Gorbunov
b5e637bed5
Rename toMap with selector and transform to toMapBy
2015-12-17 22:50:44 +03:00
Ilya Gorbunov
544bc9a70c
Introduce toMap with key-value pair selector.
...
#KT-6657
2015-12-17 22:50:43 +03:00
Ilya Gorbunov
33b366b9b9
Relax upper bound of T for minBy and maxBy to be nullable.
...
Swap type parameters of minBy and maxBy.
#KT-10099 Fixed
2015-12-14 04:56:45 +03:00
Ilya Gorbunov
81e7826568
Move generated code between packages.
2015-12-14 03:49:43 +03:00
Ilya Gorbunov
0ffce06356
Hide toMap with keySelector
...
#KT-6657
2015-12-01 01:18:46 +03:00
Ilya Gorbunov
6ca647aecd
Minor: cleanup asSequence() documentation.
2015-12-01 01:18:19 +03:00