implement native type compilation

This commit is contained in:
alex committed 2025-07-20 19:57:09 -07:00
1 parent f7ff896f81
commit 837e0c1b38
19 files changed
+133 -20

No files matched your search

@@ -69,7 +69,7 @@ class CompileCommand : CliktCommand("compile") {
annotation = " ; ${annotations.joinToString(", ") { it.text }}"
}
print(" ${symbol.offset + index.toUInt()} ${op}${annotation}")
if (op.code == Opcode.Constant || op.code == Opcode.Native) {
if (op.code == Opcode.Constant || op.code == Opcode.NativeFunction) {
val constant = compiledWorld.constantPool.constants[op.args[0].toInt()]
val constantString = when (constant.tag) {
ConstantTag.String -> "string = \"" + constant.readAsString() + "\""