Implement HandleSet overflow via tagged heap chunks#2
Open
TriedAngle wants to merge 3 commits intomasterfrom
Open
Implement HandleSet overflow via tagged heap chunks#2TriedAngle wants to merge 3 commits intomasterfrom
TriedAngle wants to merge 3 commits intomasterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
HandleSetexceeds its inline capacity by supporting overflow storage allocated on the heap.Description
OverflowChunkstruct and pointer-tag helpers (is_heap_tagged,tag_heap_ptr,untag_heap_ptr) and use the LSB tag convention to mark heap pointers.HandleSetwithoverflow_headandpush_overflow_slotsopin_valuespills into chained overflow chunks once the inlineHANDLESET_CAPACITY(20) is exhausted.visit_rootsto traverse inline slots and overflow chunks so GC/root rewrites update overflow handles, and addeddrop_overflow_chainto reclaim boxed chunks viaBox::from_rawduringDrop.handle_roots_headandnew_handleset()toVMProxy, initializinghandle_roots_headin the bootstrap path, and addedvm/HANDLESET_SKETCH.mddocumentation.Testing
cargo test -p vm handles_are_and the handle-related tests passed.cargo test -p vm handles::tests:: -- --nocaptureand all three handle tests (including the new overflow regression) passed.cargo test -p vm interpreter::tests::proxy_generic_field_access_uses_ctype_layout -- --nocaptureand it still fails at the same site, confirming the failure is independent of these changes.Codex Task