WASM: NFC. Remove dead code
This commit is contained in:
committed by
TeamCityServer
parent
af865544ff
commit
d8569b6a03
@@ -98,36 +98,6 @@ fun WasmCompiledModuleFragment.generateJs(): String {
|
|||||||
var wasmInstance = null;
|
var wasmInstance = null;
|
||||||
|
|
||||||
const runtime = {
|
const runtime = {
|
||||||
String_getChar(str, index) {
|
|
||||||
return str.charCodeAt(index);
|
|
||||||
},
|
|
||||||
|
|
||||||
String_compareTo(str1, str2) {
|
|
||||||
if (str1 > str2) return 1;
|
|
||||||
if (str1 < str2) return -1;
|
|
||||||
return 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
String_equals(str, other) {
|
|
||||||
return str === other;
|
|
||||||
},
|
|
||||||
|
|
||||||
String_subsequence(str, startIndex, endIndex) {
|
|
||||||
return str.substring(startIndex, endIndex);
|
|
||||||
},
|
|
||||||
|
|
||||||
String_getLiteral(index) {
|
|
||||||
return runtime.stringLiterals[index];
|
|
||||||
},
|
|
||||||
|
|
||||||
coerceToString(value) {
|
|
||||||
return String(value);
|
|
||||||
},
|
|
||||||
|
|
||||||
Char_toString(char) {
|
|
||||||
return String.fromCharCode(char)
|
|
||||||
},
|
|
||||||
|
|
||||||
identity(x) {
|
identity(x) {
|
||||||
return x;
|
return x;
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -69,23 +69,3 @@ public class String internal constructor(internal val chars: CharArray) : Compar
|
|||||||
}
|
}
|
||||||
|
|
||||||
internal fun stringLiteral(startAddr: Int, length: Int) = String(unsafeRawMemoryToCharArray(startAddr, length))
|
internal fun stringLiteral(startAddr: Int, length: Int) = String(unsafeRawMemoryToCharArray(startAddr, length))
|
||||||
|
|
||||||
//@JsFun("(it, other) => it + String(other)")
|
|
||||||
//private fun stringPlusImpl(it: String, other: String): String =
|
|
||||||
// implementedAsIntrinsic
|
|
||||||
//
|
|
||||||
//@JsFun("(it) => it.length")
|
|
||||||
//private fun stringLengthImpl(it: String): Int =
|
|
||||||
// implementedAsIntrinsic
|
|
||||||
//
|
|
||||||
//@WasmImport("runtime", "String_getChar")
|
|
||||||
//private fun stringGetCharImpl(it: String, index: Int): Char =
|
|
||||||
// implementedAsIntrinsic
|
|
||||||
//
|
|
||||||
//@WasmImport("runtime", "String_compareTo")
|
|
||||||
//private fun stringCompareToImpl(it: String, other: String): Int =
|
|
||||||
// implementedAsIntrinsic
|
|
||||||
//
|
|
||||||
//@WasmImport("runtime", "String_subsequence")
|
|
||||||
//private fun stringSubSequenceImpl(string: String, startIndex: Int, endIndex: Int): String =
|
|
||||||
// implementedAsIntrinsic
|
|
||||||
|
|||||||
Reference in New Issue
Block a user