WasmRunInterpreter

class WasmRunInterpreter(val module: WasmModule, memPages: Int = 10, maxMemPages: Int = 65536) : WasmRuntime

Constructors

Link copied to clipboard
constructor(module: WasmModule, memPages: Int = 10, maxMemPages: Int = 65536)

Types

Link copied to clipboard
Link copied to clipboard

Properties

Link copied to clipboard
open val exported: Set<String>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val MAX_STACK: Int = 2048
Link copied to clipboard
val memMax: Int
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun alloc(size: Int): Int
Link copied to clipboard
Link copied to clipboard
inline fun binopF32(func: (l: Float, r: Float) -> Float)
Link copied to clipboard
inline fun binopF32_bool(func: (l: Float, r: Float) -> Boolean): Boolean
Link copied to clipboard
inline fun binopF32_int(func: (l: Float, r: Float) -> Int)
Link copied to clipboard
inline fun binopF64(func: (l: Double, r: Double) -> Double)
Link copied to clipboard
inline fun binopF64_bool(func: (l: Double, r: Double) -> Boolean): Boolean
Link copied to clipboard
inline fun binopF64_int(func: (l: Double, r: Double) -> Int)
Link copied to clipboard
inline fun binopI32(func: (l: Int, r: Int) -> Int)
Link copied to clipboard
inline fun binopI32_bool(func: (l: Int, r: Int) -> Boolean): Boolean
Link copied to clipboard
inline fun binopI64(func: (l: Long, r: Long) -> Long)
Link copied to clipboard
inline fun binopI64_bool(func: (l: Long, r: Long) -> Boolean): Boolean
Link copied to clipboard
inline fun binopI64_int(func: (l: Long, r: Long) -> Int)
Link copied to clipboard
open fun close()
Link copied to clipboard
fun compile(func: WasmFunc, implicitReturn: Boolean, debug: WasmDebugContext): WasmInterpreterCode
Link copied to clipboard
Link copied to clipboard
fun free(ptr: Int)
fun free(vararg ptrs: Int)
Link copied to clipboard
fun getLocalF32(offset: Int): Float
Link copied to clipboard
fun getLocalF64(offset: Int): Double
Link copied to clipboard
fun getLocalI32(offset: Int): Int
Link copied to clipboard
fun getLocalI64(offset: Int): Long
Link copied to clipboard
Link copied to clipboard
fun invoke(func: WasmFunc)
open operator override fun invoke(funcName: String, vararg params: Any?): Any?
Link copied to clipboard
open override fun invokeIndirect(index: Int, vararg params: Any?): Any?
Link copied to clipboard
fun popF32(): Float
Link copied to clipboard
fun popF64(): Double
Link copied to clipboard
fun popI32(): Int
Link copied to clipboard
fun popI64(): Long
Link copied to clipboard
fun popType(type: WasmSType): Any?
Link copied to clipboard
fun pushF32(value: Float)
Link copied to clipboard
fun pushF64(value: Double)
Link copied to clipboard
fun pushI32(value: Int)
Link copied to clipboard
fun pushI64(value: Long)
Link copied to clipboard
fun pushType(type: WasmSType, value: Any?)
Link copied to clipboard
fun readBytes(ptr: Int, out: ByteArray): ByteArray
fun readBytes(ptr: Int, size: Int): ByteArray
Link copied to clipboard
fun readString(ptr: Int): String
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun readTypes(types: List<WasmType>): Array<Any?>
Link copied to clipboard
open fun register(moduleName: String, name: String, func: WasmRuntime.(Array<Any?>) -> Any?)
Link copied to clipboard
Link copied to clipboard
fun setGlobal(global: WasmGlobal, value: Any?)
Link copied to clipboard
fun setLocal(type: WasmSType, offset: Int, value: Any?)
Link copied to clipboard
fun setLocalF32(offset: Int, value: Float): Float
Link copied to clipboard
fun setLocalF64(offset: Int, value: Double): Double
Link copied to clipboard
fun setLocalI32(offset: Int, value: Int): Int
Link copied to clipboard
fun setLocalI64(offset: Int, value: Long): Long
Link copied to clipboard
fun stackAlloc(size: Int): Int
Link copied to clipboard
Link copied to clipboard
fun stackRestore(stack: Int)
Link copied to clipboard
fun stackSave(): Int
Link copied to clipboard
fun strlen(ptr: Int): Int
Link copied to clipboard
fun strlen16(ptr: Int): Int
Link copied to clipboard
inline fun unopF32(func: (it: Float) -> Float)
Link copied to clipboard
inline fun unopF32_bool(func: (it: Float) -> Boolean): Boolean
Link copied to clipboard
inline fun unopF64(func: (it: Double) -> Double)
Link copied to clipboard
inline fun unopF64_bool(func: (it: Double) -> Boolean): Boolean
Link copied to clipboard
inline fun unopI32(func: (it: Int) -> Int)
Link copied to clipboard
inline fun unopI32_bool(func: (it: Int) -> Boolean): Boolean
Link copied to clipboard
inline fun unopI64(func: (it: Long) -> Long)
Link copied to clipboard
inline fun unopI64_bool(func: (it: Long) -> Boolean): Boolean
Link copied to clipboard
fun writeBytes(ptr: Int, data: ByteArray)