Repository navigation
[cDAC] Align data-contract docs with merged FieldDesc offset and HandleData changes - #130531
Merged
max-charlamb merged 3 commits intoJul 10, 2026
Merged
Conversation
PR dotnet#130501 masked the packed type bits before comparing FieldDesc::DWord2 against the FIELD_OFFSET_BIG_RVA sentinel, but left the RuntimeTypeSystem data-contract doc pseudocode showing the old unmasked comparison. Update the GetFieldDescOffset pseudocode to mask the offset before the sentinel check. Co-authored-by: Copilot <[email protected]>
PR dotnet#130448 removed the vestigial JupiterRefCount field from the cDAC HandleData contract, but left the GC data-contract doc pseudocode setting it. Remove the stale handleData.JupiterRefCount assignment from CreateHandleData. (The COM ABI struct still exposes the field and reports 0, unchanged.) Co-authored-by: Copilot <[email protected]>
Contributor
|
Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag |
max-charlamb
marked this pull request as ready for review
July 10, 2026 22:28
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates cDAC data-contract documentation to match recent implementation changes in the RuntimeTypeSystem and GC contracts, keeping the design docs’ pseudocode aligned with the shipped behavior.
Changes:
- Update
RuntimeTypeSystem.mdpseudocode forGetFieldDescOffsetto mask the packed offset bits fromFieldDesc::DWord2before comparing against the big-RVA sentinel. - Update
GC.mdpseudocode to remove the staleJupiterRefCountassignment inCreateHandleData.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/design/datacontracts/RuntimeTypeSystem.md | Updates FieldDesc offset pseudocode to reflect masking off packed type bits prior to big-RVA sentinel checks. |
| docs/design/datacontracts/GC.md | Removes the outdated JupiterRefCount assignment from HandleData creation pseudocode. |
…ull DWord2 Addresses review feedback: the pseudocode masks DWord2 to the offset bitfield before comparing FieldOffsetBigRVA, so the globals table should describe the sentinel as a value of the offset bitfield (m_dwOffset) rather than the full packed DWord2, matching the sibling FieldOffsetNewEnc entry. Co-authored-by: Copilot <[email protected]>
rcj1
approved these changes
Jul 10, 2026
eiriktsarpalis
pushed a commit
that referenced
this pull request
Jul 15, 2026
…leData changes (#130531) ## Summary Small docs-only follow-up aligning the cDAC data-contract documentation with two recently merged changes that updated the contract implementations but not their docs. ### 1. `RuntimeTypeSystem.md` -- big-RVA offset masking (follow-up to #130501) #130501 fixed big-RVA field-offset detection by masking the packed type bits before comparing `FieldDesc::DWord2` against the `FIELD_OFFSET_BIG_RVA` sentinel, but left the `GetFieldDescOffset` pseudocode showing the old unmasked comparison. Updated the pseudocode to mask the offset out of the packed `DWord2` (27-bit offset + 5-bit type) before the sentinel check, matching the shipped implementation and native `FieldDesc::GetOffset`. ### 2. `GC.md` -- `JupiterRefCount` removal (follow-up to #130448) #130448 removed the vestigial `JupiterRefCount` field from the cDAC `HandleData` contract, but left the `CreateHandleData` pseudocode setting it. Removed the stale `handleData.JupiterRefCount = 0;` assignment. (The COM ABI struct still exposes the field and reports `0`, unchanged.) Docs-only change. --------- Co-authored-by: Max Charlamb <[email protected]> Co-authored-by: Copilot <[email protected]>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Summary
Small docs-only follow-up aligning the cDAC data-contract documentation with two recently merged changes that updated the contract implementations but not their docs.
1.
RuntimeTypeSystem.md-- big-RVA offset masking (follow-up to #130501)#130501 fixed big-RVA field-offset detection by masking the packed type bits before comparing
FieldDesc::DWord2against theFIELD_OFFSET_BIG_RVAsentinel, but left theGetFieldDescOffsetpseudocode showing the old unmasked comparison. Updated the pseudocode to mask the offset out of the packedDWord2(27-bit offset + 5-bit type) before the sentinel check, matching the shipped implementation and nativeFieldDesc::GetOffset.2.
GC.md--JupiterRefCountremoval (follow-up to #130448)#130448 removed the vestigial
JupiterRefCountfield from the cDACHandleDatacontract, but left theCreateHandleDatapseudocode setting it. Removed the stalehandleData.JupiterRefCount = 0;assignment. (The COM ABI struct still exposes the field and reports0, unchanged.)Docs-only change.