Added @FixmeInline and commented some inline functions

This commit is contained in:
Igor Chevdar
2017-04-19 18:01:39 +03:00
parent 2b92b1d880
commit 366e28775f
3 changed files with 7 additions and 3 deletions
@@ -80,6 +80,8 @@ public annotation class FixmeReflection
*/
public annotation class FixmeConcurrency
public annotation class FixmeInline
/**
* Need to be fixed.
*/
@@ -90,9 +90,11 @@ public fun <R, T> (suspend R.() -> T).createCoroutineUnchecked(
(this.create(receiver, completion) as CoroutineImpl).facade
// INTERNAL DEFINITIONS
private inline fun <T> buildContinuationByInvokeCall(
// TODO: uncomment as soon as inlining works for stdlib.
@FixmeInline
private /*inline*/ fun <T> buildContinuationByInvokeCall(
completion: Continuation<T>,
crossinline block: () -> Any?
/*crossinline*/ block: () -> Any?
): Continuation<Unit> {
val continuation =
object : Continuation<Unit> {
@@ -314,7 +314,7 @@ public inline fun String.subSequence(start: Int, end: Int): CharSequence = subSe
* @param endIndex the end index (exclusive). If not specified, the length of the char sequence is used.
*/
// TODO: uncomment as soon as inlining works for stdlib.
@Fixme
@FixmeInline
@kotlin.internal.InlineOnly
public /*inline*/ fun CharSequence.substring(startIndex: Int, endIndex: Int = length): String = subSequence(startIndex, endIndex).toString()