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

inline asm!: support writing _ in lieu of return types, for basic inference. #376

Merged
merged 4 commits into from
Jan 20, 2021
Merged

Conversation

eddyb
Copy link
Contributor

@eddyb eddyb commented Jan 14, 2021

The bulk of this PR is the first commit, containing a basic type constraint system for SPIR-V instructions, which I've been working on as a prerequisite for #300 (see module-scope doc comment for its limitations).

What I've done with inline asm! is demonstrate the use of those constraints to alleviate the need to write some typeof*{...}, letting the user write just _ instead, and having the type be inferred automatically.

However, asm! inference is merely a potential usecase I thought of while working on the type constraint system, and I don't have a strong opinion on keeping it (this is partly the reason why I haven't made it fully-featured yet).

@eddyb eddyb requested a review from khyperia January 14, 2021 17:51
@eddyb eddyb marked this pull request as ready for review January 20, 2021 08:59
Copy link
Contributor

@khyperia khyperia left a comment

Choose a reason for hiding this comment

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

🎉

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