Type-checking pointer offsets completely
Closed this issue · 1 comments
-
This function handles pointers to simply sized types (pointers of the form
*t
wheret
is not a structure type), but does not handle stack pointers offsets.
https://github.com/zilch-lang/nsc/blob/4c1fcc20dcaef6aebb3fe0c2532722efdda5da58/lib/nsc-typechecker/src/Language/NStar/Typechecker/Instructions.hs#L338-L350 -
pop
is only type-checked when the destination expression is a register.
https://github.com/zilch-lang/nsc/blob/4c1fcc20dcaef6aebb3fe0c2532722efdda5da58/lib/nsc-typechecker/src/Language/NStar/Typechecker/Instructions.hs#L309-L317 -
mov
is only type-checked when the destination expression is a register, but should work for any kind of source expression (as long as the first quoted code works for any pointer offset).
https://github.com/zilch-lang/nsc/blob/4c1fcc20dcaef6aebb3fe0c2532722efdda5da58/lib/nsc-typechecker/src/Language/NStar/Typechecker/Instructions.hs#L115-L129