Skip to content

Adding GetNumLocalVariables and GetNumArguments cDAC APIs#120064

Merged
rcj1 merged 8 commits intodotnet:mainfrom
rcj1:signature-stuff
Oct 11, 2025
Merged

Adding GetNumLocalVariables and GetNumArguments cDAC APIs#120064
rcj1 merged 8 commits intodotnet:mainfrom
rcj1:signature-stuff

Conversation

@rcj1
Copy link
Contributor

@rcj1 rcj1 commented Sep 24, 2025

No description provided.

Copy link
Contributor

Copilot AI left a comment

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 implements cDAC APIs for retrieving method argument and local variable counts from IL method headers. The changes add support for parsing ECMA-335 compliant method signatures and IL headers to determine the number of arguments and local variables in a method.

  • Adds GetNumArguments API that reads method signature headers to count parameters
  • Adds GetNumLocalVariables API that parses IL headers to extract local variable counts
  • Introduces helper method IsIL to check if a method is IL-backed

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
IXCLRData.cs Adds CorILMethodFlags enum for parsing IL method header formats
ClrDataFrame.cs Implements GetNumArguments and GetNumLocalVariables methods with metadata parsing logic
RuntimeTypeSystem_1.cs Adds IsIL helper method implementation
IRuntimeTypeSystem.cs Adds IsIL method declaration to interface
RuntimeTypeSystem.md Documents the IsIL API and its implementation algorithm

@dotnet-policy-service
Copy link
Contributor

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

@rcj1
Copy link
Contributor Author

rcj1 commented Oct 2, 2025

diagnostics fails unrelated

Copy link
Member

@max-charlamb max-charlamb left a comment

Choose a reason for hiding this comment

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

lgtm modulo single comment

@rcj1 rcj1 merged commit 9aa3e11 into dotnet:main Oct 11, 2025
48 checks passed
@rcj1 rcj1 deleted the signature-stuff branch October 11, 2025 01:48
@github-actions github-actions bot locked and limited conversation to collaborators Nov 10, 2025
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.

6 participants