Skip to content
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

Merged
merged 7 commits into from
Mar 7, 2019
Merged

Tag pointers, not scalars #217

merged 7 commits into from
Mar 7, 2019

Conversation

nomeata
Copy link
Collaborator

@nomeata nomeata commented Mar 6, 2019

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.

@nomeata nomeata requested a review from ggreif March 6, 2019 19:28
Copy link
Contributor

@ggreif ggreif left a 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?

src/compile.ml Outdated Show resolved Hide resolved
src/compile.ml Outdated Show resolved Hide resolved
src/compile.ml Outdated Show resolved Hide resolved
src/compile.ml Outdated Show resolved Hide resolved
src/compile.ml Show resolved Hide resolved
src/compile.ml Outdated Show resolved Hide resolved
@nomeata
Copy link
Collaborator Author

nomeata commented Mar 6, 2019

Also, do we have heavy-duty GC tests?

Some of the tests in run-dfinity run GC relatively often. But some more adverserial testing might be welcome :-)

@nomeata nomeata merged commit 989f0bb into master Mar 7, 2019
@nomeata nomeata deleted the joachim/tag-pointers branch March 7, 2019 10:09
@rossberg
Copy link
Contributor

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.

@nomeata
Copy link
Collaborator Author

nomeata commented Mar 18, 2019

The wording “shift“ is unfortunate, and we avoid it in the code actually: A pointer to position x is represented as x-1 (so a shift of one byte, but no bit-shift).

@rossberg
Copy link
Contributor

Ah, okay, thanks for the clarification. Why not simply call it "tagged"?

@nomeata
Copy link
Collaborator Author

nomeata commented Mar 18, 2019

Maybe to avoid confusion with the tagged heap objects?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants