-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tag pointers, not scalars #217
Conversation
to make life easier for arithmetic on Word8/Word16 (#216) (This is with GC disabled.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, naming seems to be already established. I only found nits, and have just one question inside.
Also, do we have heavy-duty GC tests?
Some of the tests in |
Co-Authored-By: nomeata <[email protected]>
and improve comments a bit.
Hm, why do you need to shift pointers? Usually, pointer tagging just sets the LSB to 1 by exploiting the invariant that all pointers are aligned, so the lower bits carry no information. |
The wording “shift“ is unfortunate, and we avoid it in the code actually: A pointer to position |
Ah, okay, thanks for the clarification. Why not simply call it "tagged"? |
Maybe to avoid confusion with the tagged heap objects? |
which is somewhat hairy to implement (one has to mentally keep track what are actual pointers, and what are shifted pointers), but maybe as we work on the code over time some good practices will emerge.