Skip to content

Graph improvements #72

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

Merged
merged 8 commits into from
May 1, 2025
Merged

Graph improvements #72

merged 8 commits into from
May 1, 2025

Conversation

dkcumming
Copy link
Collaborator

Some readability issues are fixed in this PR:

  • Deref projections are now wrapped in parenthesis e.g.(*4)
  • Constants are not longer separated by "::", e.g. const :: u32 is now const ?_u32, and const :: std::ops::ExitCode is now const std::ops::ExitCode. I do not like that there is "?" but I couldn't see a fast way to deal with the bytes in the Allocation, does anyone know how to parse that into the integer?
  • Changed Rvalue::AddressOf e.g. &Mut (*3) is now &raw mut (*3), which is less likely to be confused with a mutable borrow &mut (*3)
  • Added a node with all the locals and type information. Some formatting and placement issues with this. I would appreciate some feedback!

@dkcumming dkcumming self-assigned this Apr 29, 2025
@dkcumming dkcumming requested review from jberthold and gtrepta April 29, 2025 13:26
Copy link
Contributor

@gtrepta gtrepta left a comment

Choose a reason for hiding this comment

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

LGTM.

The MirConst from const ?_u32 appears to have a eval_target_usize method which might return the constant as a u64. I tried to add it in real quick but got a compiler panic, "expected int of size 8, but got size 4". It might be pretty sensitive to how it gets called, but I didn't mess with it any further.

@dkcumming dkcumming marked this pull request as ready for review May 1, 2025 15:15
@dkcumming dkcumming merged commit 0785fe0 into master May 1, 2025
3 checks passed
@dkcumming dkcumming deleted the dc/graph-improvements branch May 1, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants