[Wasm] Wasi stdlib implementation

KT-56608
This commit is contained in:
Igor Yakovlev
2023-07-31 14:27:09 +02:00
committed by Zalim Bashorov
parent 090f393f97
commit 8cc0660693
61 changed files with 817 additions and 103 deletions
@@ -0,0 +1,21 @@
/*
* Copyright 2010-2021 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
@Suppress("UNUSED_PARAMETER")
@ExcludedFromCodegen
/*
* Compiler generates inplace next code:
* ```
* block (result anyref) {
* local.get 0
* extern.internalize
* br_on_cast_fail 0000_0011b 0 (type any) (type $kotlin.Any)
* return
* }
* ```
*/
internal fun returnArgumentIfItIsKotlinAny(): Unit = implementedAsIntrinsic