nim-works / nimskull

An in development statically typed systems programming language; with sustainability at its core. We, the community of users, maintain it.
https://nim-works.github.io/nimskull/index.html
Other
279 stars 39 forks source link

vmgen: fix incorrect code generation for `lent`/`var` deref #1409

Closed zerbina closed 3 months ago

zerbina commented 3 months ago

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

saem commented 3 months ago

/merge

github-actions[bot] commented 3 months ago

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