Skip to content

[cDAC] Align data-contract docs with merged FieldDesc offset and HandleData changes - #130531

Merged
max-charlamb merged 3 commits into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/cdac-bigrva-docs
Jul 10, 2026
Merged

max-charlamb merged 3 commits into
dotnet:mainfrom
max-charlamb:dev/max-charlamb/cdac-bigrva-docs

Conversation

@max-charlamb

@max-charlamb max-charlamb commented Jul 10, 2026 •

Copy link
Copy Markdown
Member

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.

Max Charlamb and others added 2 commits July 10, 2026 18:23
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]>
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @steveisok, @tommcdon, @dotnet/dotnet-diag
See info in area-owners.md if you want to be subscribed.

@max-charlamb
max-charlamb marked this pull request as ready for review July 10, 2026 22:28

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.md pseudocode for GetFieldDescOffset to mask the packed offset bits from FieldDesc::DWord2 before comparing against the big-RVA sentinel.
  • Update GC.md pseudocode to remove the stale JupiterRefCount assignment in CreateHandleData.

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]>
Copilot AI review requested due to automatic review settings July 10, 2026 22:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

@max-charlamb
max-charlamb merged commit 248d767 into dotnet:main Jul 10, 2026
27 checks passed
@max-charlamb
max-charlamb deleted the dev/max-charlamb/cdac-bigrva-docs branch July 11, 2026 00:00
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 11, 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]>
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 11, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants