-
Notifications
You must be signed in to change notification settings - Fork 287
Notion of redundant visits to slowly move towards scanning everything #874
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
Conversation
|
This makes a little bit more sense. |
|
For visiting objects on the stack, I have another variant like this: The advantage is that it can be used for any kind of stack-bound lifetime, including pointers in unique_ptrs. So we would use this version also, for the rewriter. However, the We could keep both, or just the more general one. What you think? |
|
I'm +1 on the variant you posted in your comment -- it seems similar to what other VMs use for their precise stack scanning and seems like it could be a step towards that for us. I think the extra-object issue can be resolved by making the handle the only object; ie for the rewrite case do something like gc::RootingHandler<std::unique_ptr<Rewriter>> rewriter(createRewriter());
rewriter->commit();Well, it might be tricky specifically in the case of unique_ptr. |
|
I'm a bit confused about the last commit in this PR -- were we not already scanning interpreter references? |
|
I was concerned about |
b2e16eb to
3b888a6
Compare
|
Ok I've removed the commit that deals with ASTInterpreter. As far as the calling gc handler on stack objects is concerned, I'll put that in another commit when I scan the rewriter. |
3b888a6 to
1d63c9d
Compare
For marking collectors, the redudant visits no-op to avoid the performance hit.
218c35e to
d80c374
Compare
d80c374 to
592f854
Compare
Notion of redundant visits to slowly move towards scanning everything
|
cool :) |
Not all references in the program are being scanned, but we get away with it for now. Until we having a moving collector, don't actually scan those references, but make note that they are there.
I have no idea how the extra code I added ended up making things faster, it's probably a fluke, but at least it's not slower.