This commit is contained in:
Irmen de Jong 2023-07-02 21:19:33 +02:00
parent acb2ee53bb
commit 0db141eeac
2 changed files with 7 additions and 1 deletions

View File

@ -134,7 +134,7 @@ class Program(val name: String,
.first { it.name == internedStringsModuleName }.statements .first { it.name == internedStringsModuleName }.statements
.first { it is Block && it.name == internedStringsModuleName } as Block .first { it is Block && it.name == internedStringsModuleName } as Block
removals.forEach { scopedname -> removals.forEach { scopedname ->
val decl = internedStringsBlock.statements.filterIsInstance<VarDecl>().single { decl -> decl.scopedName == scopedname } as VarDecl val decl = internedStringsBlock.statements.filterIsInstance<VarDecl>().single { decl -> decl.scopedName == scopedname }
val numRefs = program.internedStringsReferenceCounts.getValue(decl) - 1 val numRefs = program.internedStringsReferenceCounts.getValue(decl) - 1
program.internedStringsReferenceCounts[decl] = numRefs program.internedStringsReferenceCounts[decl] = numRefs
if(numRefs==0) if(numRefs==0)

View File

@ -2,6 +2,12 @@ TODO
==== ====
- fix type error with returning an array literal from a subroutine returning uword - fix type error with returning an array literal from a subroutine returning uword
- fix IR loading of romsubs
romsub $FFD2 = chrout(ubyte ch @ A)
sub start() {
ubyte ch = '\n'
chrout(ch)
}
... ...