implement sqrt(long)

This commit is contained in:
Irmen de Jong
2026-02-15 17:11:31 +01:00
parent 07be7f0154
commit 6a0b22bb64
8 changed files with 298 additions and 116 deletions
@@ -48,6 +48,12 @@ class UnusedCodeRemover(private val program: Program,
.filter { s -> s.name == "internal_long_R1_to_float_AY" || s.name=="internal_long_AY_to_FAC" }
.forEach { sub -> neverRemoveSubroutines.add(sub) }
}
program.allBlocks.singleOrNull { it.name=="prog8_lib" } ?.let {
val subroutines = it.statements.filterIsInstance<Subroutine>()
subroutines.filter { s -> s.name=="sqrt_long" }
.forEach { sub -> neverRemoveSubroutines.add(sub) }
}
}
override fun before(program: Program): Iterable<IAstModification> {