Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASTStore: Add UD functionality #188

Open
jubnzv opened this issue Oct 19, 2024 · 1 comment
Open

ASTStore: Add UD functionality #188

jubnzv opened this issue Oct 19, 2024 · 1 comment
Assignees
Labels
area:ir Everything related to the IR and corresponding internals blocked enhancement New feature or request
Milestone

Comments

@jubnzv
Copy link
Member

jubnzv commented Oct 19, 2024

We could store UD relations in the AstStore by introducing some kind of definition IDs that refer to the node IDs present in the AstStore.

Since we don't have any special IR nodes for this (#74) yet, we could design it in AstStore:

  • Store function/method arguments in the AstStore, as we need them to define local variables
  • Create a type alias, similar to rustc's DefId
  • Create a mapping from most of the AstId.id to these DefIds
  • Fill the mappings using AST traversals at the top level and UD analysis at the function level
  • Create a public API to access this information

Depends on #186; otherwise, it will be unreadable.

@jubnzv jubnzv added enhancement New feature or request blocked labels Oct 19, 2024
@jubnzv jubnzv added this to the v0.5 milestone Oct 19, 2024
@jubnzv jubnzv self-assigned this Oct 19, 2024
@jubnzv jubnzv modified the milestones: v0.5, v0.6 Oct 19, 2024
@jubnzv jubnzv added the area:ir Everything related to the IR and corresponding internals label Oct 19, 2024
@jubnzv jubnzv mentioned this issue Oct 19, 2024
7 tasks
@jubnzv
Copy link
Member Author

jubnzv commented Oct 20, 2024

Also useful in UnusedExpressionResult (#83) since we can combine UDs with ASTStore.getReturnTypes()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:ir Everything related to the IR and corresponding internals blocked enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant