Skip to content

Implement null collector for lifetime branded GC#89

Merged
nekevss merged 2 commits into
boa-dev:mainfrom
shruti2522:null-branded
Jun 18, 2026
Merged

Implement null collector for lifetime branded GC#89
nekevss merged 2 commits into
boa-dev:mainfrom
shruti2522:null-branded

Conversation

@shruti2522

Copy link
Copy Markdown
Contributor

No description provided.

@shruti2522 shruti2522 marked this pull request as ready for review June 17, 2026 16:10

@nekevss nekevss left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At a high level, I think this is fine and we can move forward with it. I did leave one non-blocking comment that should ideally be addressed in quick follow up PR at some point in the future.

_cx: &crate::collectors::null_collector_branded::MutationContext<'id, 'gc>,
) -> Option<Gc<'gc, T>> {
// In the null collector, everything stays alive until context drops.
Some(Gc {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit(non-blocking): one point that applies here and elsewhere in the branded code

We should really have some proper constructors rather than relying on struct expressions. What should the name of that ctor be? Probably up for debate. We could call it with_pointer or just new.

Either way, this should really be returning something like:

Some(Gc::with_pointer(self.ptr))

It conveys a little bit better.

@nekevss nekevss merged commit c0c2fb2 into boa-dev:main Jun 18, 2026
4 checks passed
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.

2 participants