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

Added GC Tracing Infrastructure #352

Merged
merged 13 commits into from
Jun 20, 2023

Conversation

Redfire75369
Copy link
Contributor

@Redfire75369 Redfire75369 commented Apr 10, 2023

Fixes #346
Moved mozjs::rust::Trace to mozjs::gc::trace::Traceable, and added more implementations for smart pointers, wrappers, and collections.
Added mozjs::gc::trace::RootedTraceableSet, mozjs::gc::collections::RootableVec and mozjs::gc::collections::RootedVec.
Added rooted_vec! macro.
Reorganised GC-related code in mozjs.

I'm not too sure about the file structure change, but I think it's fine.
If there's any more high-level rooted structures I can add, please do inform me.

@Redfire75369
Copy link
Contributor Author

Redfire75369 commented May 4, 2023

After doing some testing on spiderfire, particularly with this code, it seems that this rooting works properly. I haven't tested RootedVec, but RootedTraceableSet at least works fine.

Implemented Traceable for Integers, Floats and Atomic Integers
Implemented Traceable with Macro for Tuples up to Length 12
Implemented Traceable with Macro for Function Pointers with up to 12 arguments
@Redfire75369
Copy link
Contributor Author

@jdm Could I get a review on this?

@jdm
Copy link
Member

jdm commented Jun 20, 2023

This looks good to merge!

@jdm
Copy link
Member

jdm commented Jun 20, 2023

@bors-servo r+

@bors-servo
Copy link
Contributor

📌 Commit c216686 has been approved by jdm

@bors-servo
Copy link
Contributor

⌛ Testing commit c216686 with merge c200e36...

@bors-servo
Copy link
Contributor

☀️ Test successful - checks-github
Approved by: jdm
Pushing c200e36 to master...

@bors-servo bors-servo merged commit c200e36 into servo:master Jun 20, 2023
@Redfire75369 Redfire75369 deleted the gc/root-infrastructure branch August 16, 2023 10:34
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.

Add safe GC rooting infrastructure
3 participants