-
Notifications
You must be signed in to change notification settings - Fork 201
verifier: Diagnose incorrect uses of INVALID #493
Comments
Returning VOID is equal to diverging isn't it? |
Cranelift's VOID isn't actually used to indicate any actual typing concept, it's just a placeholder for IR data structures that have a type field but don't always need it. To hopefully clear up some of the understandable confusion, I've now renamed VOID to INVALID and updated the comments accordingly. This issue can remain open, as we should still implement more verifier checks to ensure that INVALID doesn't appear in the IR, such as in function signatures. |
Where should the verifier checks to ensure that INVALID doesn't appear in the IR be implemented? I mean in terms of the files. Is it all in |
Yes, this can be done entirely in |
Cranelift has a VOID type but it's only used in a few contexts, because in general Cranelift prefers to use an array or vector of types which can be empty. As an example, it's particularly confusing that one can create a function with a return type of VOID, which turns out to be impossible to actually use. We should add verifier checks for this and other possible misuses of VOID.
The text was updated successfully, but these errors were encountered: