Get rid of sort() and reverse() builtin functions.

Sort() had too many gotchas and reverse() is kinda redundant you can loop in decreasing order through an array too.
This commit is contained in:
Irmen de Jong
2024-07-06 17:07:58 +02:00
parent 0c053e4a2c
commit 25f25a8767
17 changed files with 217 additions and 12776 deletions

View File

@@ -688,18 +688,6 @@ main {
(statements[7] as Assignment).target.memoryAddress!!.addressExpression.constValue(result.compilerAst)!!.number shouldBe 53281.0
}
test("no crash on sorting unused array") {
val text="""
main {
ubyte[5] cards = [ 14, 6, 29, 16, 3 ]
sub start() {
sort(cards)
}
}"""
compileText(C64Target(), true, text, writeAssembly = false) shouldNotBe null
}
test("no string error when inlining") {
val text="""
main {