Skip to content

Model function ABI in the Rust IR #481

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 3 commits into from
Jun 10, 2020
Merged

Model function ABI in the Rust IR #481

merged 3 commits into from
Jun 10, 2020

Conversation

AzureMarker
Copy link
Member

Closes #460

Only tracks function calling convention based on the discussion in the issue (though the interner could put more data in the FnAbi type).

Copy link
Contributor

@nikomatsakis nikomatsakis left a comment

Choose a reason for hiding this comment

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

Can we add an abi field to the Fn type as well?

(Also, maybe we can rename that type to FnPointer, but that is I guess a distinct PR.)

@AzureMarker AzureMarker requested a review from nikomatsakis May 29, 2020 22:35
Copy link
Member

@jackh726 jackh726 left a comment

Choose a reason for hiding this comment

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

This looks good to me. Just waiting for @nikomatsakis

@nikomatsakis
Copy link
Contributor

One other thing, apparently a extern "C" fn() doesn't implement the Fn trait, so we have to fix that too -- this is kind of growing the scope of this PR a lot, I think if you want to back out the extensions to the Fn trait, we could move them instead into a follow-up PR (actually they would fit neatly into #507, which @mental32 was going to tackle)

@AzureMarker
Copy link
Member Author

I kept the Fn ABI commit in the PR so the changes can be reused/referenced for future PRs.

@AzureMarker AzureMarker requested a review from nikomatsakis June 9, 2020 22:06
@nikomatsakis nikomatsakis merged commit bf33634 into rust-lang:master Jun 10, 2020
@AzureMarker AzureMarker deleted the feature/function-abi branch June 10, 2020 21:39
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.

Track function ABI information
5 participants