Make arrayOf(...) intrinsic
This commit is contained in:
committed by
SvyatoslavScherbina
parent
f8f44533a4
commit
ba212bddba
@@ -11,6 +11,8 @@ package kotlin
|
|||||||
import kotlin.internal.PureReifiable
|
import kotlin.internal.PureReifiable
|
||||||
import kotlin.native.internal.ExportTypeInfo
|
import kotlin.native.internal.ExportTypeInfo
|
||||||
import kotlin.native.internal.InlineConstructor
|
import kotlin.native.internal.InlineConstructor
|
||||||
|
import kotlin.native.internal.IntrinsicType
|
||||||
|
import kotlin.native.internal.TypedIntrinsic
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An array of bytes.
|
* An array of bytes.
|
||||||
@@ -509,8 +511,8 @@ public inline fun <reified @PureReifiable T> arrayOfNulls(size: Int): Array<T?>
|
|||||||
/**
|
/**
|
||||||
* Returns an array containing the specified elements.
|
* Returns an array containing the specified elements.
|
||||||
*/
|
*/
|
||||||
@Suppress("UNCHECKED_CAST")
|
@TypedIntrinsic(IntrinsicType.IDENTITY)
|
||||||
public inline fun <reified @PureReifiable T> arrayOf(vararg elements: T): Array<T> = elements as Array<T>
|
public external inline fun <reified @PureReifiable T> arrayOf(vararg elements: T): Array<T>
|
||||||
|
|
||||||
@SymbolName("Kotlin_emptyArray")
|
@SymbolName("Kotlin_emptyArray")
|
||||||
external public fun <T> emptyArray(): Array<T>
|
external public fun <T> emptyArray(): Array<T>
|
||||||
|
|||||||
Reference in New Issue
Block a user