From cd0fa9405a868e6d5942840034085f0ef5725669 Mon Sep 17 00:00:00 2001 From: Irmen de Jong Date: Fri, 12 Apr 2019 00:54:04 +0200 Subject: [PATCH] comments --- compiler/src/prog8/ast/AstChecker.kt | 3 +-- examples/tehtriz.p8 | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/compiler/src/prog8/ast/AstChecker.kt b/compiler/src/prog8/ast/AstChecker.kt index 58f022792..a6bb7e5ac 100644 --- a/compiler/src/prog8/ast/AstChecker.kt +++ b/compiler/src/prog8/ast/AstChecker.kt @@ -333,8 +333,7 @@ private class AstChecker(private val namespace: INameScope, if(subroutine.asmClobbers.intersect(regCounts.keys).isNotEmpty()) err("a return register is also in the clobber list") } else { - // TODO: non-asm subroutines can only take numeric arguments for now. (not strings and arrays) - // TODO: AddressOf: can this be improved now that we have '&' ? + // TODO: non-asm subroutines can only take numeric arguments for now. (not strings and arrays) Maybe this can be improved now that we have '&' ? // the way string params are treated is almost okay (their address is passed) but the receiving subroutine treats it as an integer rather than referring back to the original string. // the way array params are treated is buggy; it thinks the subroutine needs a byte parameter in place of a byte[] ... // This is not easy to fix because strings and arrays are treated a bit simplistic (a "virtual" pointer to the value on the heap) diff --git a/examples/tehtriz.p8 b/examples/tehtriz.p8 index 7fdfb68c5..85fc7a8a7 100644 --- a/examples/tehtriz.p8 +++ b/examples/tehtriz.p8 @@ -416,7 +416,7 @@ waitkey: 0,0,0,0, 0,0,0,0] - ; @todo would be nice to have a pointer type, like so: + ; @todo use the '&' operator to create an array of pointers and use that, like so: ; uword[7] blocks = [&blockI, &blockJ, &blockL, &blockO, &blockS, &blockT, &blockZ] sub newCurrentBlock(ubyte block) {