[Wasm] Support enumValues and enumValueOf functions

^KT-57276 Fixed

Merge-request: KT-MR-9169
Merged-by: Svyatoslav Kuzmich <svyatoslav.kuzmich@jetbrains.com>
This commit is contained in:
Svyatoslav Kuzmich
2023-03-13 14:13:31 +00:00
committed by Space Team
parent bcf7c38288
commit a99ea1d3ce
22 changed files with 37 additions and 26 deletions
@@ -0,0 +1,16 @@
/*
* Copyright 2010-2023 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package kotlin.wasm.internal
@PublishedApi
@ExcludedFromCodegen
internal fun <T : Enum<T>> enumValuesIntrinsic(): Array<T> =
implementedAsIntrinsic
@PublishedApi
@ExcludedFromCodegen
internal fun <T : Enum<T>> enumValueOfIntrinsic(@Suppress("UNUSED_PARAMETER") name: String): T =
implementedAsIntrinsic