changed the data type system to composite types

This commit is contained in:
Irmen de Jong
2024-12-05 21:48:51 +01:00
parent ba8c3d14f7
commit 1a1ab0dac6
99 changed files with 3466 additions and 3084 deletions
@@ -400,5 +400,24 @@ label:
errors.errors[0] shouldContain "contains non-constant"
errors.errors[1] shouldContain "contains non-constant"
}
test("memsizing in codegen of array return values") {
val src="""
main {
sub start() {
cx16.r1 = give_array1()
cx16.r2 = give_array2()
}
sub give_array1() -> uword {
return [1,2,3,4]
}
sub give_array2() -> uword {
return [1000,2000,3000,4000]
}
}"""
compileText(VMTarget(), false, src, writeAssembly = true) shouldNotBe null
compileText(C64Target(), false, src, writeAssembly = true) shouldNotBe null
}
})