A couple of functions in stdlib are marked with @InlineExposed.
This commit is contained in:
committed by
alexander-gorshenev
parent
f959c4e43c
commit
d79875ac7c
+5
@@ -57,6 +57,9 @@ internal tailrec fun DeclarationDescriptor.isExported(): Boolean {
|
||||
if (this.annotations.hasAnnotation(publishedApiAnnotation)){
|
||||
return true
|
||||
}
|
||||
if (this.annotations.hasAnnotation(inlineExposedAnnotation)){
|
||||
return true
|
||||
}
|
||||
|
||||
|
||||
if (this is ConstructorDescriptor && constructedClass.kind.isSingleton) {
|
||||
@@ -87,6 +90,8 @@ private val exportForCompilerAnnotation = FqName("konan.internal.ExportForCompil
|
||||
|
||||
private val publishedApiAnnotation = FqName("kotlin.PublishedApi")
|
||||
|
||||
private val inlineExposedAnnotation = FqName("kotlin.internal.InlineExposed")
|
||||
|
||||
private fun acyclicTypeMangler(visited: MutableSet<TypeParameterDescriptor>, type: KotlinType): String {
|
||||
val descriptor = TypeUtils.getTypeParameterDescriptorOrNull(type)
|
||||
if (descriptor != null) {
|
||||
|
||||
@@ -21,6 +21,7 @@ package kotlin.collections
|
||||
* Attempts to read _uninitialized_ values from this array work in implementation-dependent manner,
|
||||
* either throwing exception or returning some kind of implementation-specific default value.
|
||||
*/
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun <E> arrayOfUninitializedElements(size: Int): Array<E> {
|
||||
// TODO: special case for size == 0?
|
||||
return Array<E>(size)
|
||||
@@ -306,4 +307,4 @@ internal fun <E> Collection<E>.collectionToString(): String {
|
||||
}
|
||||
sb.append("]")
|
||||
return sb.toString()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ public inline operator fun <K, V> MutableMap<in K, in V>.plusAssign(map: Map<K,
|
||||
putAll(map)
|
||||
}
|
||||
|
||||
// do not expose for now @kotlin.internal.InlineExposed
|
||||
@kotlin.internal.InlineExposed
|
||||
internal fun <K, V> Map<K, V>.optimizeReadOnlyMap() = when (size) {
|
||||
0 -> emptyMap()
|
||||
// 1 -> toSingletonMapOrSelf()
|
||||
|
||||
Reference in New Issue
Block a user