KT-31741: stdlib: DeepRecursiveFunction (#3398)
Introduces experimental coroutines-based framework to execute deeply recursive functions that utilities the heap and thus avoid StackOverflowError.
This commit is contained in:
@@ -50,6 +50,12 @@ public actual inline fun <R, T> (suspend R.() -> T).startCoroutineUninterceptedO
|
||||
completion: Continuation<T>
|
||||
): Any? = (this as Function2<R, Continuation<T>, Any?>).invoke(receiver, completion)
|
||||
|
||||
@InlineOnly
|
||||
internal actual inline fun <R, P, T> (suspend R.(P) -> T).startCoroutineUninterceptedOrReturn(
|
||||
receiver: R,
|
||||
param: P,
|
||||
completion: Continuation<T>
|
||||
): Any? = (this as Function3<R, P, Continuation<T>, Any?>).invoke(receiver, param, completion)
|
||||
|
||||
// JVM declarations
|
||||
|
||||
|
||||
Reference in New Issue
Block a user