Dmitry Jemerov
322379e6ae
Assorted stdlib KDocs
2017-03-01 16:09:01 +01:00
Alexander Udalov
abbbdb5771
Update KotlinVersion.CURRENT to 1.1.2
2017-02-28 20:24:33 +03:00
Roman Elizarov
266d7c15fe
Documentation for createCoroutine/createCoroutineUnchecked
2017-02-27 16:48:24 +03:00
Ilya Gorbunov
c0c01d6e49
Drop HIDDEN deprecations from kotlin-stdlib.
2017-02-22 17:28:02 +03:00
Ilya Gorbunov
fee676a281
Introduce 'takeUnless' function which is like 'takeIf' but with the predicate inverted.
...
#KT-7858
2017-02-13 16:07:34 +03:00
Ilya Gorbunov
e9f40c41c2
Minor: refactor and rename parameters.
2017-02-08 20:16:10 +03:00
Ilya Gorbunov
fc7b1c8611
KDoc for mutable abstract collections.
...
Document abstract overrides.
2017-02-08 20:13:22 +03:00
Ilya Gorbunov
ef5e53b37b
KDoc for read-only abstract collections
2017-02-08 20:13:22 +03:00
Roman Elizarov
5895c211a1
Fixed corotine context performance by using reference equality for contexts and keys
...
Added documentation explaining that keys are compared by reference
2017-02-07 19:33:46 +03:00
Denis Zharkov
4f6a77cf38
Introduce createCoroutineUnchecked intrinsic
...
Also use it for buildSequence implenentation
#KT-16155 Fixed
2017-02-07 11:08:27 +03:00
Roman Elizarov
9a71a20ad6
Docs for startCoroutineUninterceptedOrReturn
2017-02-07 11:07:04 +03:00
Denis Zharkov
230564fb4a
Minor. Get rid of code duplications for resume call wrapping in stdlib
...
Use processBareContinuationResume instead
2017-02-07 11:07:04 +03:00
Denis Zharkov
6dde567be4
Optimize startCoroutine impls, move them to common stdlib
...
Do not wrap initial continuation for startCoroutine in SafeContinuation
This changes leaves only internal declarations and intrinsics as platform
dependent parts of the coroutine library, the rest parts (public API)
is implemented through them in common module
2017-02-07 11:07:04 +03:00
Denis Zharkov
a65d86293b
Improve coroutines library layout
...
- Split CoroutinesLibrary into common and JVM parts
- Get rid of startCoroutine duplications
- Make suspendCoroutine implementation to be platform independent
2017-02-07 11:07:04 +03:00
Denis Zharkov
258ee0db75
Introduce startCoroutineUninterceptedOrReturn coroutine intrinsic
...
#KT-15716 Fixed
2017-02-07 11:07:04 +03:00
Denis Zharkov
29b0b30031
Make createCoroutine return a safe continuation
...
#KT-15718 Fixed
2017-02-07 11:06:50 +03:00
Ilya Gorbunov
af443ac046
Search java version in java.specification.version, prepare to that starting from java 9 it will contain only a single component.
2017-02-03 17:52:13 +03:00
Ilya Gorbunov
4ac7be9fa5
Retract bitwise operators from builtins for Byte and Short and add them as extensions in kotlin.experimental package in stdlib.
...
#KT-16030
2017-01-30 18:54:59 +03:00
Dmitry Jemerov
8968d5663d
Minor fixes for stdlb kdoc
2017-01-30 16:13:49 +01:00
Ilya Gorbunov
7195e26ae2
Rollback Closeable.use implementation as it was in 1.0 in order not to call functions that were introduced in 1.1 from this inline function.
...
#KT-16026
2017-01-29 02:41:12 +03:00
Roman Elizarov
8dc318dd92
Fixed KT-15963 (coroutines machinery should not use equals on results)
2017-01-27 23:24:13 +03:00
Denis Zharkov
c362a9154b
Rename SUSPENDED_MARKER to COROUTINE_SUSPENDED
2017-01-27 23:24:13 +03:00
Denis Zharkov
246946bc18
Move buildSequence/buildIterator to kotlin.coroutines.experimental
2017-01-27 23:24:13 +03:00
Denis Zharkov
68fc6fa217
Support non-CoroutineImpl instances in createCoroutine
2017-01-27 23:24:13 +03:00
Denis Zharkov
8fa8ba7055
Move coroutine-related runtime parts to kotlin.coroutines.experimental package
...
#KT-15975 Fixed
2017-01-27 23:24:13 +03:00
Denis Zharkov
cb4914ab56
Make 'suspendCoroutineOrReturn' inline-only
2017-01-27 23:24:13 +03:00
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
01f53d0173
Return NaN as an average of an empty collection.
...
#KT-15399 Fixed
2017-01-27 14:53:33 +03:00
Ilya Gorbunov
661ff81e67
Specify names for parameters of functional types with two or more parameters to ease lambda completion.
...
#KT-13826
2017-01-27 14:46:29 +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
288e0b3c7e
Allow to use Regex matches CharSequence and CharSequence matches Regex in infix form
...
#KT-14279
2017-01-25 21:31:42 +03:00
Ilya Gorbunov
4e5e14c9a0
Provide string-to-number conversions in JS and common stdlib.
...
Relates to #KT-8286
#KT-4497 Fixed
2017-01-24 07:20:57 +03:00
Roman Elizarov
07dc937e2e
typo if start/createCoroutine docs fixed
2017-01-23 14:25:04 +03:00
Ilya Gorbunov
3a1ed41436
Create deprecated MutableList.sort extensions to guide how to replace them.
...
#KT-15790 Fixed
2017-01-21 03:14:42 +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
914c55b57f
Refactor: use new functions in stdlib code
2017-01-16 09:31:45 +03:00
Ilya Gorbunov
1ae56c374f
Introduce new function 'takeIf' to replace value with null if it doesn't match the predicate.
...
#KT-7858
2017-01-16 05:58:51 +03:00
Ilya Gorbunov
1ac9815d76
Introduce new scope function: 'also'. Works like 'apply' but with 'it' instead of 'this' inside lambda.
...
#KT-6903
2017-01-16 05:58:51 +03:00
Ilya Gorbunov
3d70d73964
Rename file class CoroutinesLibraryKt to CoroutinesKt
2017-01-15 20:57:11 +03:00
Ilya Gorbunov
9f303ed06e
Migrate to new coroutines API, rename Iterator implementation, annotate new API with SinceKotlin.
2017-01-14 20:14:06 +03:00
Ilya Gorbunov
ffb183a2f3
Move a bit of bytecode out of next()
2017-01-14 20:14:05 +03:00
Ilya Gorbunov
560c184fd4
Merge AbstractIterator and SequenceBuilder, remove hasNext call from next.
2017-01-14 20:14:03 +03:00
Ilya Gorbunov
141ad43039
Introduce buildSequence and buildIterator functions based on coroutines.
2017-01-14 20:14:01 +03:00
Denis Zharkov
14f942aca7
Refine ABI for coroutine lambdas
...
Make their invoke work in the same way as any other suspend function:
it should return SUSPENDED_MARKER iff. it indeed became suspended
2017-01-14 19:51:05 +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
Roman Elizarov
8d6a913cee
CoroutineContext and ContinuationInterceptor (instead of dispatcher)
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
80f2efb625
joinTo/joinToString: Do not call toString on elements that are already CharSequence or Char.
...
#KT-15557
2017-01-13 19:49:57 +03:00
Ilya Gorbunov
cdfb72ab76
Provide protected toArray implementation in AbstractCollection.
...
Relates to #KT-13898
2017-01-13 19:38:28 +03:00