start implementing ptr deref augmented assigns

This commit is contained in:
Irmen de Jong
2025-05-08 23:43:52 +02:00
parent 8353c689ca
commit 506062c6b6
5 changed files with 132 additions and 73 deletions

View File

@@ -36,9 +36,10 @@ STRUCTS and TYPED POINTERS
- DONE: start by making ptr.value++ work , and ptr.value = ptr.value+20, and ptr.value = cx16.r0L+20+ptr.value Likewise for subtraction. DON'T FORGET C POINTER SEMANTICS. Other operators are nonsensical for ptr arith
- DONE: support @dirty on pointer vars -> uninitialized pointer placed in BSS_noclear segment
- DONE: support comparison operators on pointers
- implement augmented assignment on pointer dereference; ptr^^ *= 5
- optimize augmented assignment on pointer dereference; ptr^^ += value (and -=) to avoid dereferencing calculation twice
- implement augmented assignment on pointer dereference; remaining operators
- pointer types in subroutine signatures (both normal and asm-subs, paramters and return values)
- fix actual _msb/_lsb storage of the split-words pointer-arrays
- pointer types in subroutine signatures (both normal and asm-subs)
- support chaining pointer dereference on function calls that return a pointer. (type checking now fails on stuff like func().field and func().next.field)
- make typeForAddressOf() be even more specific about the typed pointers it returns for the address-of operator. + unit test.
- are the ARRAY_POINTER and ARRAY_STRUCT data type enums realy needed? can't we just use ARRAY?