alias refactorings

This commit is contained in:
Irmen de Jong
2026-02-09 23:58:32 +01:00
parent 709ced1bca
commit d6c8fc0c61
12 changed files with 95 additions and 103 deletions
+1 -2
View File
@@ -13,7 +13,7 @@ Future Things and Ideas
- make builtin functions capable of returning multiple values, then make divmod() return the 2 results rather than accepting 2 extra variables as arguments
- then also introduce lmh(longvalue) -or whatever sensible name- builtin function that returns the low, mid, hi (bank) bytes of a long.
- and rewrite the divmod (and others?) function to just return the 2 results instead of taking target variables as arguments.
- allow alias to blocks?
- allow alias to blocks? There's some code look for "experimental code to be able to alias blocks"
- add a -profile option (for now X16 only) that instruments the start (and returns?) -of every prog8 subroutine with code that dumps to the X16 emulator debug console: name of sub, stack pointer (for call depth!), emudbg cycle count. Save/restore all used registers! Start of program must set cycle count to zero.
- add @private to variables and subroutines declared in a scope to make them invisible from outside that scope?
- when implementing unsigned longs: remove the (multiple) "TODO "hack" to allow unsigned long constants to be used as values for signed longs, without needing a cast"
@@ -31,7 +31,6 @@ Future Things and Ideas
- should we have a SourceStorageKind.POINTER? (there is one for TargetStorageKind...)
- make memory mapped variables support more constant expressions such as: &uword MyHigh = &mylong1+2 (see github issue #192)
- allow memory() to occur in array initializer (maybe needed for 2 dimensional arrays?) i.e. make it a constant (see github issue #192)
- handle alias in a general way in LiteralsToAutoVarsAndRecombineIdentifiers (or a whole separate ast processing step to avoid any replacement conflicts) instead of replacing it scattered over multiple functions
- allow the value of a memory mapped variable to be address-of another variable, not just a constant number
- implement for loops with long loopvar over long range expression
- Make all constants long by default? or not? (remove type name altogether), reduce to target type implictly if the actual value fits. Experiment is in branch 'long-consts'