Skip to content

prototype: enforce single-realm invariants for roots and weak pointers#73

Merged
nekevss merged 1 commit intoboa-dev:mainfrom
shruti2522:prototype-2
Apr 16, 2026
Merged

prototype: enforce single-realm invariants for roots and weak pointers#73
nekevss merged 1 commit intoboa-dev:mainfrom
shruti2522:prototype-2

Conversation

@shruti2522
Copy link
Copy Markdown
Contributor

As mentioned by @jedel1043 in #68 :

We might have some ways to statically ensure Root is not used with a different realm, like relating them to the GcContext itself by some invariant lifetime, but that's a future improvement that we can do while iterating on this

updates the API to use compile time lifetime checks ('id) to ensure
that GC pointers, Root and WeakGc can never cross into a different GcContext

@shruti2522 shruti2522 force-pushed the prototype-2 branch 3 times, most recently from 99ecb62 to 9f64bff Compare April 5, 2026 21:14
@shruti2522 shruti2522 marked this pull request as ready for review April 5, 2026 21:14
@shruti2522 shruti2522 force-pushed the prototype-2 branch 2 times, most recently from 4b56dca to 5f0f495 Compare April 5, 2026 21:27
Copy link
Copy Markdown
Member

@nekevss nekevss left a comment

Choose a reason for hiding this comment

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

LGTM

@nekevss nekevss merged commit ef6ff06 into boa-dev:main Apr 16, 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