Closed zerbina closed 3 months ago
/merge
Merge requested by: @saem
Contents after the first section break of the PR description has been removed and preserved below:
## Notes for Reviewers * it's not feasible at the moment, but `var`/`lent` needs to be the same as pointers, for code reaching the code generators
Summary
Fix reading from a
var
/lent
view of an unsigned integer (with bit- width <= 32) producing incorrect values, when using the VM.Fixes https://github.com/nim-works/nimskull/issues/1407.
Details
genDerefView
to take thecnkDerefView
node as input, so that it has access to the type of the resultgenRegLoad
call, resulting in noNarrowU
instruction to be emitted for the memory access, and the value thus being sign-extended