Commit Graph

99 Commits

Author SHA1 Message Date
Denis Zharkov
0e132b9857 Move all coroutine-related declarations from built-ins to stdlib
Also move internal declarations from runtime.jvm module into new package
kotlin.coroutines.jvm.internal in stdlib

The necessity of these declarations being in built-ins is controversial,
but also it will complicate the migration of current coroutine runtime
to a separate jar if we ever need this
2017-01-27 23:24:13 +03:00
Ilya Gorbunov
2e0209395a Restore Map.minus(key/keys) and Map.minusAssign(key/keys) operators.
#KT-13353
2017-01-25 22:08:46 +03:00
Ilya Gorbunov
070f9d9d17 Binary compatibility validation: dump public API of merged stdlib to another file 2017-01-24 22:04:46 +03:00
Alexander Udalov
70d2296e61 Update public API dump after adding KPropertyN.getDelegate 2017-01-24 10:59:44 +03:00
Alexander Udalov
78f2515e95 Introduce KProperty{0,1,2}.getDelegate
#KT-8384 In Progress
2017-01-23 12:25:35 +03:00
Ilya Gorbunov
ed9b9d972c Make 'add' function abstract in AbstractMutableSet in JVM 2017-01-18 20:07:24 +03:00
Roman Elizarov
25739a08ea CoroutineContext Key and Element are now inside CoroutineContext interface itself (just like Map.Entry)
ContinuationInterceptor companion object is named Key
CoroutineContext.Element property for key is named just key
AbstractCoroutineContextElement implements all of CoroutineContext.Element, including key
2017-01-16 14:33:02 +03:00
Ilya Gorbunov
3d70d73964 Rename file class CoroutinesLibraryKt to CoroutinesKt 2017-01-15 20:57:11 +03:00
Ilya Gorbunov
141ad43039 Introduce buildSequence and buildIterator functions based on coroutines. 2017-01-14 20:14:01 +03:00
Denis Zharkov
85a3fefcc6 Get rid of SuspendFunctionX interfaces
Use a pair of effectively abstract methods in CoroutineImpl instead
2017-01-14 15:13:37 +03:00
Ilya Gorbunov
2dfcb490a5 Fix CoroutineContext tests, update public API dump 2017-01-14 13:24:53 +03:00
Denis Zharkov
7837d736f7 Merge RestrictedCoroutineImpl into CoroutineImpl 2017-01-14 13:24:53 +03:00
Denis Zharkov
d487c1ef0f Refine dispatching convention
Dispatching happens only via `suspendWithCurrentContinuation` calls
instead of each `resume` call

 #KT-15657 Fixed
2017-01-14 13:24:53 +03:00
Denis Zharkov
2cb9d3a8ad Move coroutine intrinsics to kotlin.coroutine.intrinsics package
Also rename val SUSPENDED to SUSPENDED_MARKER

 #KT-15698 Fixed
2017-01-14 13:24:53 +03:00
Ilya Gorbunov
6273ab5d43 Hold back eachSumOf for a while: fixups.
Remove unneeded import.
2017-01-11 20:04:00 +03:00
Ilya Gorbunov
04a0f0a036 Rename Grouping.elementIterator to sourceIterator 2017-01-11 16:49:45 +03:00
Ilya Gorbunov
2a2b417025 KEEP-23 implement group and fold operations
Docs for group-and-fold operations

Fix implementation for countEach and sumEachBy

countEach and sumEachBy implementations for JS

Rename keySelector to keyOf

Generate additional sources for groupingBy + headers

Rename countEach and sumEachBy to eachCount and eachSumOf.
2017-01-11 16:49:45 +03:00
Ilya Gorbunov
0bf2ba8701 Introduce new overloads of max and min to fix NaN propagation behavior on JVM. 2017-01-11 14:45:18 +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
d7885e699c Update public API dump of kotlin-runtime, relates to #KT-15449 2016-12-30 20:00:44 +03:00
Ilya Gorbunov
822e58ad83 Map.getOrImplicitDefault is exposed public as Map.getValue
#KT-11851
2016-12-29 07:49:27 +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
10f8e70322 Rename ClosedComparableRange to ClosedFloatingPointRange 2016-12-19 18:36:52 +03:00
Denis Zharkov
5ec62108ee Rename RestrictsSuspendExtensions -> RestrictsSuspension 2016-12-16 18:56:30 +03:00
Ilya Gorbunov
236333e475 Update public API dump for coroutines rev. 2 2016-12-16 04:28:32 +03:00
Dmitry Petrov
9fd1ac72a9 Purge remaining traces of @AllowSuspendExtensions. 2016-12-15 23:58:19 +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
Mikhael Bogdanov
1f26c3098f Binary compatibility validator tests update according to new @PublishedApi annotation 2016-12-12 10:25:05 +01:00
Mikhael Bogdanov
58263c46cc Compatibility validator update 2016-12-09 11:55:15 +01:00
Mikhael Bogdanov
95a47e56f7 InlineExposed usages are changed to PublishedApi 2016-12-09 11:55:14 +01: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
4721dcd07c Add specialization overloads for Float.rangeTo and Double.rangeTo to resolve them statically. 2016-12-08 20:49:10 +03:00
Ilya Gorbunov
7a019e80fe Exclude bundled org.jetbrains.annotations from kotlin-runtime. Add a dependency on org.jetbrains:annotations:13.0 instead. 2016-12-06 22:25:06 +03:00
Alexander Udalov
0d99801783 Revert "Add NonVolatileRef to runtime"
This reverts commit 1e9624901a.

For more information, see
https://discuss.kotlinlang.org/t/non-volatile-vs-volatile-captured-refs-by-default/

 #KT-14746 Fixed
2016-12-06 14:59:15 +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
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
Denis Zharkov
2c3b0aeddb Add 'suspendWithCurrentContinuation' and 'Suspend' object in built-ins
They are part of the new suspension convention, relevant
support in backends will be added in later commits

 #KT-14924 In Progress
2016-11-29 14:14:50 +03:00
Dmitry Petrov
b7f27b86fe Update golden data for public API test. 2016-11-28 10:23:10 +03:00
Ilya Gorbunov
78a89ef30a Add a hint how to regenerate API dump 2016-11-27 13:50:14 +03:00
Ilya Gorbunov
b7b320e4ce @JvmOverloads-generated overloads of final methods are also final: update public API tests. 2016-11-18 19:53:24 +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
Alexander Udalov
eedad9194e Drop KParameter.isNoinline, KParameter.isCrossinline
There seems to be no valuable use cases for them at the moment
2016-11-15 11:01:17 +03:00
Alexander Udalov
7e82d139cf Drop KFunction.isTailrec
The fate of this modifier seems unclear, and there doesn't seem to be any
valuable use cases for it in reflection
2016-11-15 11:01:16 +03:00
Denis Zharkov
da5c81448b Add CoroutineImpl to rendered public API 2016-11-09 12:25:31 +03:00
Denis Zharkov
77e2b12566 Add kotlin.DslMarker to binary public API 2016-11-03 17:55:41 +03:00