WASM: Crude println implementation with the wasm-native strings

This commit is contained in:
Igor Laevsky
2021-07-23 20:42:48 +03:00
committed by TeamCityServer
parent fc0ae851a2
commit ebde1e5491
3 changed files with 17 additions and 15 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ public actual fun println() {
/** Prints the given [message] and the line separator to the standard output stream. */
public actual fun println(message: Any?) {
printlnImpl(message.toString())
printlnImpl(exportStringRet(message.toString()))
}
/** Prints the given [message] to the standard output stream. */
@@ -27,5 +27,5 @@ public actual fun print(message: Any?) {
internal actual interface Serializable
@WasmImport("runtime", "println")
private fun printlnImpl(message: String): Unit =
private fun printlnImpl(messageAddr: Int): Unit =
implementedAsIntrinsic