Commit Graph

1634 Commits

Author SHA1 Message Date
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
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