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

Add metadata to while conditions #969

Merged
merged 1 commit into from
Dec 10, 2024
Merged

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented Dec 2, 2024

Fixes #902.

Needs:

  • cleaning + squashing
  • changelog
  • rebase on top on recent main

@vbgl vbgl added the bug label Dec 2, 2024
@MrDaiki MrDaiki self-assigned this Dec 4, 2024
@vbgl vbgl marked this pull request as ready for review December 4, 2024 15:57
@vbgl
Copy link
Member Author

vbgl commented Dec 4, 2024

In addition to improving location information on guards of while loops and instructions emitted by lowering to implement them, this change allows to easily attach fixed points on while loops when doing analyses.

Copy link
Contributor

@eponier eponier left a comment

Choose a reason for hiding this comment

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

I did not spot anything fishy except one thing.

And can you mention in the commit message the part about the two infos for while?

let c0' := conc_map lower_i c0 in
let c1' := conc_map lower_i c1 in
[:: MkI ii (Cwhile a (c0' ++ map (MkI ii) pre) e' c1') ]
[:: MkI ii (Cwhile a (c0' ++ map (MkI ii) pre) e' info c1') ]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
[:: MkI ii (Cwhile a (c0' ++ map (MkI ii) pre) e' info c1') ]
[:: MkI ii (Cwhile a (c0' ++ map (MkI info) pre) e' info c1') ]

I think it should be info like was done for x86?

Copy link
Member Author

Choose a reason for hiding this comment

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

Well spotted. Fixed.

@vbgl
Copy link
Member Author

vbgl commented Dec 8, 2024

Thanks Jean-Christophe for your review. I’ve rephrased the changelog message and rebased on top of recent main to address merge conflicts.

adding a new parameter to Prog.While to include an i_loc (useful for bug fixes)
@eponier eponier merged commit 5ef25d8 into jasmin-lang:main Dec 10, 2024
1 check passed
@vbgl vbgl deleted the while-expr-iloc branch December 10, 2024 12:12
@vbgl vbgl added this to the 2024.07.3 milestone Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Reporting of while condition doesn't save line
3 participants