Skip to content
This repository was archived by the owner on Oct 31, 2025. It is now read-only.

Comments

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

Merged
mergify[bot] merged 4 commits intoEmbarkStudios:mainfrom
LykenSol:asm-infer
Jan 20, 2021
Merged

inline asm!: support writing _ in lieu of return types, for basic inference.#376
mergify[bot] merged 4 commits intoEmbarkStudios:mainfrom
LykenSol:asm-infer

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants