Slight API change, finalization of (desktop) UI (gotta do mobile web view still)

This commit is contained in:
2025-04-27 17:58:36 +02:00
parent 67577a9197
commit 073048f7b3
42 changed files with 133 additions and 501 deletions

View File

@ -1,6 +1,7 @@
package com.jaytux.simd.data
import com.fleeksoft.ksoup.Ksoup
import com.fleeksoft.ksoup.parser.Parser
import com.jaytux.simd.data.IntrinsicInstructions.xed
import kotlinx.coroutines.coroutineScope
import kotlinx.datetime.*
@ -84,6 +85,7 @@ object Loader {
suspend fun loadXml(xmlFile: String): XmlData = coroutineScope {
val xml = Ksoup.parseXml(File(xmlFile).readText(Charsets.UTF_8))
Parser.xmlParser()
val cppTypes = mutableSetOf<String>()
val techs = mutableSetOf<String>()
@ -158,13 +160,13 @@ object Loader {
args += argName to type
}
val desc = it.getElementsByTag("description").firstOrNull()?.text()
val desc = it.getElementsByTag("description").firstOrNull()?.wholeText()?.trim()
if(desc == null) {
errors += "Missing description element for intrinsic $name"
return@forEachIndexed
}
val op = it.getElementsByTag("operation").firstOrNull()?.text()
val op = it.getElementsByTag("operation").firstOrNull()?.wholeText()?.trim()
val insn = mutableListOf<Triple<String, String, String?>>()
it.getElementsByTag("instruction").forEachIndexed { i, ins ->