Skip to content

Conversation

@wks
Copy link
Collaborator

@wks wks commented Dec 17, 2025

We use the RefScanPolicy type to tell the object-scanning methods what to do with strong and weak reference fields, respectively, and whether they should "discover" weak reference fields (or objects that contain them) in VM-specific ways if the VM chooses to discover weak fields during tracing (instead of pre-registering all such fields (or objects that contain them) upon construction).

This PR is intended to pave a path for porting the OpenJDK-style reference processing from the lxr branch and eventually supporting LXR.

TODO:

  • Check what's missing by comparing with the lxr branch.
  • Fix bindings.
  • Decide whether we should add a RefScanPolicy implementation for barriers.

Fixes: #1376

wks added 2 commits December 17, 2025 19:54
The VM binding only needs to know the `RefScanPolicy` trait but not its
implementations.
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.

Communicate intention for weak references when scanning objects

1 participant