Ilmir Usmanov
4a7703ed66
Implement correct is check for SuspendFunction
...
Let callable references implement SuspendFunction
Do not generate CHECKCAST SuspendFunction when LV is 1.2
#KT-25825: Fixed
2018-08-22 16:21:27 +03:00
Roman Elizarov
4fe2730f4a
SuccessOrFailure.getOrDefault
2018-08-21 17:07:20 +03:00
Denis Zharkov
d35e73d29b
Get rid of COROUTINE_SUSPENDED replacement in SuspendFunction wrappers
2018-08-21 13:46:01 +03:00
Denis Zharkov
ca39cc47c9
Support calling experimental coroutines API in JVM
...
The support is very limited, though
#KT-25683 Fixed
2018-08-21 13:46:01 +03:00
Denis Zharkov
20c7a97bcd
Make experimental/release COROUTINE_SUSPENDED reference the same instance
...
It's necessary when mixing experimental/release coroutines together
#KT-25683 In Progress
2018-08-21 13:44:02 +03:00
Denis Zharkov
db34555800
Use package property COROUTINE_SUSPENDED instead of enum entry
...
For sake of encapsulation: actual property content might be
different from the entry
2018-08-21 13:44:02 +03:00
Roman Elizarov
819ffe7117
Remove suspending function migration adapters for 1.3-M1
2018-07-20 16:57:42 +03:00
Roman Elizarov
f5193802fc
Uncommented coroutines tests that were failing due to inline class bugs
2018-07-19 10:32:55 +03:00
Roman Elizarov
20c255948a
Coroutines migration adapters
2018-07-18 12:29:17 +03:00
Ilmir Usmanov
991b4251f3
Remove redundant RequireKotlin annotations from coroutines' stdlib.
2018-07-17 17:31:03 +03:00
Roman Elizarov
2236049341
Wrapper for suspend fun main and @Test suspend fun testXXX functions.
2018-07-17 12:15:02 +03:00
Roman Elizarov
d33d21907d
SuccessOrFailure test on JVM added
2018-07-17 12:15:01 +03:00
Roman Elizarov
0b59061bfe
Coroutines debug probes
2018-07-17 12:15:01 +03:00
Roman Elizarov
78192ea712
Fixed createCoroutineFromSuspendFunction
...
Passes an object that extends BaseContinuationImpl to the
suspend function invocation, so that it can use .intercepted on it.
This requires implementation to track its state via label variable.
2018-07-17 12:14:59 +03:00
Roman Elizarov
d3982472a4
Explanatory comment to createCoroutineFromSuspendFunction
2018-07-17 11:28:48 +03:00
Roman Elizarov
96b5bb1b31
Fixed JVM Serialization problems:
...
* EmptyCoroutineContext readResolve fixed
* CombinedContext.writeReplace serializes all context elements
2018-07-17 11:28:38 +03:00
Roman Elizarov
e0f6165f10
Updated SuccessOrFailure:
...
* Parameter names for lambda
* getOrElse takes exception parameters
* fold added
* Improved docs
2018-07-17 11:26:49 +03:00
Anton Bannykh
99ac43eb84
JS: implement release coroutines in stdlib
2018-07-12 14:18:34 +03:00
Ilmir Usmanov
6ba2baa9da
Deserialize constructors and properties with version requirement 1.3
...
if they have suspend function type in their descriptors.
Also, review fixes.
#KT-25256: Fixed
2018-07-11 14:20:46 +03:00
Ilmir Usmanov
5b7e099842
Read old suspend functions in 1.3
2018-07-11 14:20:41 +03:00
Roman Elizarov
3aa76c58fc
Updated SuccessOrFailure class corresponding to KEEP-127 and docs.
2018-07-09 15:27:19 +03:00
Roman Elizarov
33f4a3fcbf
Extracted BaseContinuationImpl
2018-07-09 15:27:19 +03:00
Roman Elizarov
38c17249b9
releaseInterceptedContinuation clarified and ref check in impl fixed
2018-07-09 15:27:19 +03:00
Roman Elizarov
d33409ff8a
Fixed boxing of SuccessOrFailure inside SafeContinuation impl
2018-07-09 15:27:19 +03:00
Roman Elizarov
0370fac0b6
Further design improvements for coroutines 1.3 APIs
...
* Documentation improvements and clarification
* Dropped legacy intrinsic functions
* Remove context parameter default from Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov
719d45510a
Continuation builder function
2018-07-09 15:27:19 +03:00
Roman Elizarov
0b17c619bc
Fixed ContinuationImpl.intercepted
2018-07-09 15:27:19 +03:00
Roman Elizarov
7513557315
Unroll recursion in resumeWith
...
Fixes KT-18987
2018-07-09 15:27:19 +03:00
Roman Elizarov
af9743709c
Implement COROUTINE_SUSPENDED as a property with getter
2018-07-09 15:27:19 +03:00
Roman Elizarov
aaabfa6382
Missing SinceKotlin declarations added for resume extensions
2018-07-09 15:27:19 +03:00
Roman Elizarov
b06d626b21
releaseInterceptedContinuation and few other minor fixes
2018-07-09 15:27:19 +03:00
Roman Elizarov
8e2fae3322
More work on draft coroutines 1.3 ABI & API:
...
* SuspendFunction[01] interfaces removed, moved to RestrictedContinuationImpl
* validateContext introduced to check restricted coroutines
* Distinguish SuspendLambda as being lambda/coroutine and provide a separate
toString implementation (draft) in its coroutine incarnation.
2018-07-09 15:27:19 +03:00
Roman Elizarov
8bbd78ca9a
Draft Kotlin Coroutines 1.3 ABI & API:
...
* SuccessOrFailure inline class is introduced
* Continuation.resumeWith(SuccessOrFailure)
* createCoroutineUnintercepted
* [Restricted]ContinuationImpl as named suspending function base
* [Restricted]SuspendLambda as suspending lambda base
* SuspendFunction[01] interfaces for efficient createCoroutine
* Serializable coroutine classes
2018-07-09 15:27:19 +03:00
Ilya Gorbunov
2c9c6eb746
Reformat stdlib: new coroutines
2018-04-28 18:58:56 +03:00
Ilmir Usmanov
39f4a449ad
Remove JvmVersion from kotlin-stdlib-coroutines
2018-04-23 22:20:41 +03:00
Ilmir Usmanov
30ab1e2b35
Move coroutines to kotlin.coroutines package: stdlib
...
Copy everything from kotlin.coroutines.experimental to
kotlin.coroutines. The latter is separate source set to be packed into
separate kotlin-stdlib-coroutines.jar
#KT-23362
2018-04-23 21:51:58 +03:00