Commit Graph

1235 Commits

Author SHA1 Message Date
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 63535393e7 Move Comparator to kotlin.comparisons and make it imported by default.
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov 090bd76ac9 Introduce type aliases for jvm collections in kotlin.collections
#KT-2084
2016-11-16 18:47:42 +03:00
Ilya Gorbunov 09072f6cdc Remove toInt() conversion as it's hardly required.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov 8de67d039b Expose maximum version component value as a constant, increase it to 255.
Add tests for KotlinVersion, document remaining parts of API.
#KT-14789
2016-11-15 16:38:52 +03:00
Ilya Gorbunov 5f7d779370 Introduce KotlinVersion API
#KT-14789
2016-11-15 16:38:52 +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
Ilya Gorbunov 660dc94f7c Move Closeable to its usage, move internal Serializable to kotlin package in JS, introduce internal typealias in kotlin.io in JVM. 2016-11-07 21:39:36 +03:00
Alexander Udalov 3db459c1d8 JS: drop Collections.reverse and java.util.Collections altogether 2016-11-07 12:27:54 +03:00
Alexander Udalov 316fbd820b JS: drop Collections.sort 2016-11-07 12:27:13 +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
Alexander Udalov b52f67132e Fix some warnings in JS-specific stdlib sources 2016-11-07 12:20:14 +03:00
Ilya Gorbunov 49ea0f5984 Relax generic variance in Array.flatten 2016-10-31 22:05:38 +03:00
Ilya Gorbunov baccac30fb Annotate explicitly stdlib sources, which must be excluded from JS stdlib with @JvmVersion, do not use file naming convention. 2016-10-26 17:47:15 +03:00
Ilya Gorbunov e6887ea4e5 Use abstract readonly collections as base classes for implementing collection properties of regex MatchResult 2016-10-14 19:06:25 +03:00
Ilya Gorbunov 703ee6bd78 Have mutable collection interfaces specified explicitly to get rid of platform types in parameter and return types. 2016-10-14 19:06:25 +03:00
Ilya Gorbunov a57321dea8 Annotate all new API with SinceKotlin in kotlin-stdlib and kotlin-test 2016-10-13 08:37:30 +03:00
Ilya Gorbunov a239231c75 Revert dropping inline-only extensions for Throwable, to be able to use runtime of 1.1 with language version of 1.0 which makes mapped builtin members unavailable again.
#KT-14213 Fixed
2016-10-11 16:46:14 +03:00
Denis Zharkov 1ad9f1c985 Fix serialVersionUID for EmptyMap and EmptySet
Otherwise removal of redundant special stubs
leads to InvalidClassException during deserialization
2016-10-07 11:59:15 +03:00
Ilya Gorbunov 282629f618 Remove overrides of equals and hashCode from AbstractCollection and AbstractMap.values, making the equality referential again. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov 7dde8df9ae Make mutation methods in AbstractMutable-collections abstract rather than implement them unsupported. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov f88a009653 Do not recreate entries, keys and values collections on each access to property. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov c6654fc9d8 Remove unused/redundant implementation details. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov 38f030dce4 Split AbstractMap into readonly and mutable. 2016-09-28 22:06:03 +03:00
Ilya Gorbunov a5c0f11d60 Split AbstractCollection, List, Set in JS to readonly Abstract[Collection] and mutable AbstractMutable[Collection].
Update compatibility type aliases.
2016-09-28 22:06:03 +03:00
Ilya Gorbunov 2bb1d6d5b4 Provide implementation of read-only AbstractCollection, AbstractList and AbstractSet,
Alias AbstactMutableCollection to java.util.AbstractCollection.
Change inheritance hierarchy of reversed list views.
2016-09-28 22:06:03 +03:00
Ilya Gorbunov 75069143c7 Rewrite ArrayList, AbstractList, AbstractCollection in kotlin.
AbstractList is imported from GWT.
#KT-12386
2016-09-24 07:08:21 +03:00
Ilya Gorbunov 47be8e664a Minor: replace var with val. 2016-09-22 22:28:14 +03:00
Ilya Gorbunov 9c4221cda8 Return EMPTY range [0, -1] when MIN_VALUE is specified as exclusive upper bound.
#KT-12762 Fixed
2016-08-26 05:19:51 +03:00
Ilya Gorbunov 0d7819e011 Move exceptions to kotlin package in JS library, introduce type aliases for exceptions in kotlin package in JVM runtime.
#KT-18 Fixed
2016-08-17 12:40:50 +03:00
Ilya Gorbunov dcd6e86cd3 Minor: rename type parameter from C to M as it stands for Map 2016-08-10 21:52:24 +03:00
Ilya Gorbunov bb774cea76 Minor: remove anonymous class for Map.asSequence 2016-08-10 21:52:24 +03:00
Ilya Gorbunov fb99919c59 Accept maps out-projected by key where possible. 2016-08-10 21:52:24 +03:00
Ilya Gorbunov 738219d53e Make Map.toSortedMap accept Map out-projected by key type as the receiver.
Update related completion testData.
2016-08-10 21:52:24 +03:00
Ilya Gorbunov 9ff6a6260e Minor: explicit visibility and improved code formatting 2016-08-10 21:32:33 +03:00
Ilya Gorbunov 200f1c98ed Minor: fix formatting and improve docs 2016-08-10 18:23:32 +03:00
Laszlo Hornyak 6fda0816f3 buildString with initial capacity for the StringBuilder instance
this method helps save computation time when the developer knows or have a good
educated guess about the size of the generated string and have to use control
structures while filling the string builder

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2016-08-10 18:23:32 +03:00
Ilya Gorbunov e35a214eaf Review fixes: special case of toMap for singleton map.
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov efc8f2c88a Provide extensions to copy maps.
#KT-9108
2016-08-09 21:49:57 +03:00
Ilya Gorbunov ae985e24ca Docs: clarify docs for 'generateSequence'. 2016-08-09 17:43:12 +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
Ilya Gorbunov e31167e74f Improve FileTreeWalk documentation,
#KT-13297 Fixed
2016-08-09 17:43:12 +03:00
Ilya Gorbunov e7d250b7d7 Document that sequences could be iterated multiple times.
#KT-13115 Fixed
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
Mikhail Glukhikh a2b68f65be Suppress CAST_NEVER_SUCCEEDS removed from standard library code
(cherry picked from commit 7d9aa04)
2016-07-27 10:51:41 +03:00
Ilya Gorbunov e9ccc480b0 Docs: improve docs for Closeable.use and AutoCloseable.use 2016-07-13 20:39:54 +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