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

Attach proper location to return instructions #1094

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vbgl
Copy link
Member

@vbgl vbgl commented Mar 13, 2025

Partially addresses #777.

@@ -123,7 +123,7 @@ type ('len,'info,'asm) gfunc = {
f_body : ('len,'info,'asm) gstmt;
f_tyout : 'len gty list;
f_outannot : Annotations.annotations list; (* annotation attach to return type *)
f_ret : 'len gvar_i list
f_ret : 'len gvar_i list L.located
Copy link
Contributor

Choose a reason for hiding this comment

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

I have the impression that the change will be much smaller if you add the location in the field f_outannot.
Something like f_outannot : L.t * Annotations.annotations list;
This will allow to not have to patch all occurence of f_ret.
Then maybe f_outannot is not a good name anymore and can renamed.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for this good advice. I’ve just implemented it.

@vbgl vbgl force-pushed the add-iinfo-to-return branch from 93c733f to 857a1cb Compare March 14, 2025 11:38
@vbgl vbgl force-pushed the add-iinfo-to-return branch from 857a1cb to 8e9b2cd Compare March 14, 2025 11:47
@vbgl vbgl force-pushed the add-iinfo-to-return branch from 8e9b2cd to 373b423 Compare March 14, 2025 12:09
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.

2 participants