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

Support arrays of GC-allocated objects #16

Closed
Techcable opened this issue Dec 29, 2020 · 0 comments · Fixed by #29
Closed

Support arrays of GC-allocated objects #16

Techcable opened this issue Dec 29, 2020 · 0 comments · Fixed by #29
Assignees
Labels
enhancement impl-simple The simple mark/sweep collector (our first one :D)
Milestone

Comments

@Techcable
Copy link
Member

This is related to #15 because [T] is unsized. Ideally, we would be able to have Gc<'gc, [i32]> without any indirection through a Box<[T]>.

The big problem here is that the simple collector expects Gc to have a statically-known size......

This is very important to actually properly implement any real-world use. In theory, arrays could just wrap Vec right now but that's not very elegant.

@Techcable Techcable added enhancement impl-simple The simple mark/sweep collector (our first one :D) labels Dec 29, 2020
@Techcable Techcable added this to the 0.2.0 milestone Dec 29, 2020
@Techcable Techcable self-assigned this Dec 29, 2020
@Techcable Techcable pinned this issue Dec 29, 2020
@Techcable Techcable linked a pull request Jul 4, 2021 that will close this issue
Techcable added a commit that referenced this issue Jul 6, 2021
Merges #29 
Closes #16

Right now, access to arrays doesn't trigger write barriers. I need to implement that before I can work on generational
or incremental collection......

The vector API is a little rough around the edges
because `GcVec` doesn't implement `Copy` as all the other `Gc` types do.
See #30 for more details
@Techcable Techcable unpinned this issue Jul 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement impl-simple The simple mark/sweep collector (our first one :D)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant