Valentin Kipyatkov
b256329287
Added "ReplaceWith" to deprecated library functions
2015-05-27 16:15:50 +03:00
Valentin Kipyatkov
5c445ca003
DeprecatedSymbolUsageFix: dealing with dropping arguments with potential side effects + stdlib's "let" has no receiver type bound
2015-05-27 16:15:47 +03:00
Dmitry Jemerov
1188e57597
rename @overloads annotation to @jvmOverloads
2015-05-27 12:23:08 +02:00
Ilya Gorbunov
5f319e69d8
Restore String.split(String, Int) overload and make it deprecated.
2015-05-27 00:36:30 +03:00
Ilya Gorbunov
310666a617
Deprecate times method taking integer and function. Provide top-level repeat method instead.
...
#KT-7074 Fixed.
2015-05-26 23:23:37 +03:00
Ilya Gorbunov
45c82f2844
map(): Take into account size of collection being transformed when allocating ArrayList.
...
#KT-7832 Fixed.
2015-05-26 23:23:36 +03:00
Ilya Gorbunov
c9afb407f1
Provide isNotEmpty() extension function for Maps.
2015-05-26 23:23:34 +03:00
Ilya Gorbunov
01a0348685
Remove deprecated size property usage from generated code.
2015-05-26 23:23:32 +03:00
Ilya Gorbunov
1cf4a407d1
JS: Provide MIN_VALUE and MAX_VALUE member constants for Double and Float companion objects.
...
JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Double and Float companion objects.
2015-05-26 00:26:19 +03:00
Ilya Gorbunov
4fd1b46e91
Refactor JS tests: unified package name, test JS specific map implementations only in JS.
...
Add required files to build StdLibTestToJSTest.
Remove tests StdLibMapJsTest and StdLibSetJsTest because they are tested elsewhere.
2015-05-24 05:07:01 +03:00
Ilya Gorbunov
c95ba4da8e
Tests for specialized primitive implementations of sets and maps in JS.
2015-05-24 05:06:51 +03:00
Ilya Gorbunov
ebe578dbc5
Tests to ensure the behavior of the specialized empty List, Set, Map implementations is same as of non-specialized ones.
2015-05-24 05:03:46 +03:00
Ilya Gorbunov
edc471c8ec
Optimize the implementation of emptyList, emptySet and emptyMap and make them serializable.
...
Specialized implementations of singleton List, Set and Map are used in JVM.
#KT-6682 Fixed
#KT-7104 Fixed
#KT-4840 Fixed
2015-05-24 05:03:36 +03:00
Ilya Gorbunov
0efaedd32c
Rename files to avoid having identically named files in the same package, which sometimes may confuse debugger.
2015-05-22 18:08:28 +03:00
Ilya Gorbunov
33f5158170
Fix deprecated replaceAll and replaceFirst usages in stdlib tests and tools.
2015-05-22 16:13:55 +03:00
Ilya Gorbunov
6516c74a1a
Revert back 2nd stage of split semantics change and restore deprecated String.split(String).
2015-05-21 23:13:16 +03:00
Michael Nedzelsky
34100fff99
fix maven tests: NoInternalVisibilityInStdLibTest.kt
2015-05-21 02:46:44 +03:00
Ilya Gorbunov
6a3cb0eff8
Provide distinctBy(keySelector) method for collections and sequences.
...
Implement distinct() and toMutableSet() for sequences.
Breaking change: distinct() now returns List instead of Set.
#KT-5834 Fixed
#KT-6063 Fixed
2015-05-20 19:28:47 +03:00
Ilya Gorbunov
46d91b2606
Add test for toMap with key selector and value transform.
2015-05-20 19:28:45 +03:00
Ilya Gorbunov
85e637b1e7
Revert toArrayList for primitive arrays back to trivial implementation.
...
Use newly introduced Int.MAX_VALUE in JS.
Inline mapCapacityForValues function.
Precalculate capacity of linked hash set being created with toMutableSet function.
2015-05-20 19:28:44 +03:00
Danny Thomas
7ce0487b7e
Collection performance improvements
...
Lists
- For arrays, use Arrays.asList, then toArrayList making the list creation an array copy
- For the same reason, use the ArrayList(Collection) constructor
- Replace duplicate code in toList, instead calling toArrayList
Maps/Sets
- Where the size of the source is known, precalculate the capacity, using the formula used by Guava's Maps class
- For toMap where we're unable to get at the private function, use HashSet's formula where the size is known
- Add a toMap that takes a selector and a transform, avoiding a separate step for transforming values
2015-05-20 19:27:44 +03:00
Mikhail Glukhikh
633b252ff5
Unnecessary comment removed
2015-05-18 19:43:02 +03:00
Mikhail Glukhikh
fdf0ea5546
Enum warnings fixed: deprecated delimiters, short super constructors, both in project and in libraries
2015-05-18 16:08:16 +03:00
Pavel V. Talanov
5c3d8c1616
Update api usages in NoInternalVisibilityInStdLibTest
...
Broken by 01efbb1502
2015-05-18 16:01:31 +03:00
Ilya Gorbunov
f18b9caa8d
JS: Provide MIN_VALUE and MAX_VALUE member constants for Int, Long, Short and Byte companion objects.
...
JVM: Make MIN_VALUE and MAX_VALUE not an extension but member constant properties of Int, Long, Short and Byte companion objects.
2015-05-17 17:26:25 +03:00
Ilya Gorbunov
1fc5c39c22
Remove overload of joinToString with 5 parameters and it's usage from java code.
2015-05-15 03:02:48 +03:00
Ilya Gorbunov
7ffc1e13d9
Char.isLetter and Char.isLetterOrDigit (JVM).
2015-05-15 03:02:33 +03:00
Ilya Gorbunov
7721efad8a
Restore isNotEmpty and isNotBlank methods for non-nullable String receiver.
...
#KT-7234 Fixed
2015-05-15 02:59:22 +03:00
Evgeny Gerashchenko
0498bd7739
KT-7587 Overloads are not generated during partial compilation of package
...
#KT-7587 fixed
2015-05-14 21:51:08 +03:00
Sergey Mashkov
7045140d11
JS make NodeListAsList field private
2015-05-14 14:33:37 +03:00
Sergey Mashkov
f0c55c98f2
JS fix failed test caused by strings API change
2015-05-14 13:39:33 +03:00
Sergey Mashkov
0ce1edd417
JS IDL2K better callbacks support + bugfixes according to review
2015-05-14 09:16:57 +03:00
Sergey Mashkov
a11e0a84b5
JS tests for addClass, removeClass, removeFromParent
2015-05-14 09:16:56 +03:00
Sergey Mashkov
6e09100877
JS IDL2K refactoring according to review discussion
2015-05-14 09:16:51 +03:00
Sergey Mashkov
4ee780ef07
JS move document/window/storage to kotlin.browser
2015-05-14 09:16:51 +03:00
Sergey Mashkov
33c1d5d2cf
JS fix tests failed due to api change
2015-05-14 09:16:50 +03:00
Sergey Mashkov
4bc91ba652
JS fix stdlib API to conform to new DOM3
2015-05-14 09:16:49 +03:00
Sergey Mashkov
e487825237
JS deprecate old declarations
2015-05-14 09:16:48 +03:00
Ilya Gorbunov
f7aa997003
Provide fast path for negative index values in elementAt.
...
Minor: kdoc wording.
2015-05-12 21:07:24 +03:00
Ilya Gorbunov
a5ed5d4269
Generate elementAtOrNull and elementAtOrElse extension methods for iterables, collections, sequences, etc.
...
#KT-6952 Fixed
2015-05-12 20:08:20 +03:00
Dmitry Jemerov
2a99f757c4
replace 'trait' keyword with 'interface' in library code
2015-05-12 17:07:46 +02:00
Ilya Gorbunov
69a58d1f0e
Minor: correct kdoc comment.
2015-05-12 12:25:27 +03:00
Ilya Gorbunov
34526005d0
Provide a way to construct an empty typed array without init lambda.
2015-05-09 11:45:43 +03:00
Ilya Gorbunov
16d20ff009
Temporary add jvm.overloads annotation for generated joinToString() method.
...
Stdlib generator: allow to specify arbitrary annotations for all or some of generic function expansions.
2015-05-09 01:11:49 +03:00
Ilya Gorbunov
d531d7130f
Add an optional parameter to joinToString() and joinTo() functions: lambda function which maps the element to string.
...
#KT-5468 Fixed
2015-05-09 01:11:47 +03:00
Ilya Gorbunov
c8a76f6344
Merge overloads String.compareToIgnoreCase and String.compareTo with an optional parameter. Provide CASE_INSENSITIVE_ORDER comparer in String.Companion.
2015-05-09 01:11:45 +03:00
Ilya Gorbunov
64b23054a6
Specify abbreviated code for each general Unicode category.
2015-05-09 01:11:43 +03:00
Ilya Gorbunov
1eed3675fe
Add Char.isTitleCase, Char.toTitleCase methods (JVM).
2015-05-09 01:11:40 +03:00
Ilya Gorbunov
efe6bee106
Add Char.isSurrogate function and Char.MIN_SURROGATE, Char.MAX_SURROGATE constants.
2015-05-09 01:11:38 +03:00
Ilya Gorbunov
062d080e80
CharCategory and CharDirectionality enums for JVM.
2015-05-09 01:11:36 +03:00