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
Ilya Gorbunov
bc944961f1
Use internal published-api function to validate radix in string-number conversion functions.
...
#KT-8286
2016-12-14 17:20:44 +03:00
Mikhail Zarechenskiy
c15c00677e
Add operator 'rem' as extension to BigDecimal
...
Deprecate 'mod' operator
2016-12-14 15:29:00 +03:00
Mikhail Zarechenskiy
5a829809d9
Add operator 'rem' as extension to BigInteger
...
#KT-14650 Fixed
Note that after this change behaviour of '%' on BigInteger is changed,
now it works like a proper remainder
2016-12-14 15:29:00 +03:00
Mikhael Bogdanov
95a47e56f7
InlineExposed usages are changed to PublishedApi
2016-12-09 11:55:14 +01:00
Alexey Andreev
0f813d5cfe
JS: fix compiling stdlib tests in JS
2016-12-09 12:04:32 +03:00
Ilya Gorbunov
3e69820907
Fix ClosedComparableRange.contains implementation, add docs.
2016-12-08 22:13:02 +03:00
Ilya Gorbunov
8ec2a2e6fe
Add NaN-propagation in coerceIn(ClosedComparableRange<Double>)
2016-12-08 22:13:00 +03:00
Ilya Gorbunov
ea77673dde
Reimplement coerceIn to range with new range functions: lessThanOrEquals.
2016-12-08 20:50:26 +03:00
Ilya Gorbunov
d60fc7d9a8
Introduce ClosedComparableRange interface which inherits ClosedRange to provide special comparison operation for double and float.
2016-12-08 20:50:11 +03:00
Ilya Gorbunov
5773594412
Reimplement ClosedRange.contains extensions to call interface contains method.
2016-12-08 20:50:07 +03:00
Ilya Gorbunov
4721dcd07c
Add specialization overloads for Float.rangeTo and Double.rangeTo to resolve them statically.
2016-12-08 20:49:10 +03:00
Ilya Gorbunov
f5cc53c157
Provide ComparableRange specializations for Double and Float.
...
#KT-4481
2016-12-08 20:47:24 +03:00
Ilya Gorbunov
eaf64fb225
MapTest: Uncomment cases that pass now, add more cases.
2016-12-08 20:34:57 +03:00
Ilya Gorbunov
2fa98323f1
Refactor: rename files.
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
d5f5f88cda
Add number to string conversion with the specified radix.
...
#KT-8286
2016-12-06 21:30:35 +03:00
Ilya Gorbunov
a6fb61f5c3
Fix various maven pom problems:
...
- Add relativePath to samples pom.
- Specify versions of plugins
2016-12-04 14:15:34 +03:00
Ilya Gorbunov
75d80acac9
Rework existing unit tests used as samples.
2016-12-02 22:41:25 +03:00
Ilya Gorbunov
57cef391ac
Create a separate project for stdlib samples.
2016-12-02 22:41:25 +03:00
Ilya Gorbunov
dc57d69085
Improve onEach templates.
...
Add new functions to reference API.
Add tests for onEach
#KT-8220
2016-11-30 16:46:56 +03:00
Ilya Gorbunov
21fba92c93
Annotate new number parsing functions with SinceKotlin.
...
#KT-8286, #KT-7930
2016-11-30 02:33:51 +03:00
Ilya Gorbunov
9b421eb7a4
Throw IllegalArgumentException instead of NumberFormatException on incorrect radix.
2016-11-30 02:20:33 +03:00
Ilya Gorbunov
3c80a7056a
Refactor local test dsl.
...
Add several cases and arabic digits conversion test.
2016-11-30 02:19:43 +03:00
Ilya Gorbunov
1b9dfffc13
Minor: normalize casing of Test annotation
2016-11-30 02:19:40 +03:00
Ilya Gorbunov
410e85ef79
Minor: extract a couple of platform-specific functions.
2016-11-30 02:19:38 +03:00
Ilya Gorbunov
4d6c5bcdcf
Split API to separate overloads with radix parameter and without.
...
Remove unused radix parameter from toFloat and toDouble.
Update public API dump.
#KT-8286, #KT-7930
2016-11-30 02:19:36 +03:00
Ilya Gorbunov
ce50c7f13d
Fix in test to deal with java 6 not accepting leading plus.
2016-11-30 02:19:33 +03:00
voddan
a8bd174cd0
Added tests for parsing with radix.
...
#KT-8286
2016-11-30 02:19:31 +03:00
voddan
0a939a647f
Added optional radix parameter to string-parsing functions: String.toInt, String.toIntOrNull etc.
...
#KT-8286
2016-11-30 02:19:29 +03:00
voddan
87d010e038
Introduce local dsl for number parsing tests, improve test coverage.
...
#KT-7930
2016-11-30 02:19:27 +03:00
voddan
ce9c981e26
Implemented String.toIntOrNull , String.toLongOrNull.
...
Rewrote `String.toShortOrNull` and `String.toByteOrNull` by delegating to `String.toIntOrNull`.
Added a regEx check into `String.toDoubleOrNull` to prevent throwing exceptions mostly.
#KT-7930
2016-11-30 02:19:26 +03:00
voddan
3d050322e0
Added String.toIntOrNull, etc
...
#KT-7930
2016-11-30 02:17:35 +03:00
voddan
fb51d21888
Extracted string-parsing extensions and their tests into separate files.
2016-11-30 02:17:35 +03:00
Ilya Gorbunov
0eba06405a
Use InputStream as another guess for estimated size in InputStream.readBytes()
2016-11-22 23:37:29 +03:00
Ilya Gorbunov
e41cbe6fe1
Check that the length of a file can be represented as Int.
2016-11-22 23:37:27 +03:00
Ilya Gorbunov
c90ee13656
Performance: use byte array buffer directly to read the entire contents of a file.
...
#KT-14883 Fixed
2016-11-22 23:37:05 +03:00