-
Notifications
You must be signed in to change notification settings - Fork 40
Disallow block parameters on extern forever #1254
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
base: main
Are you sure you want to change the base?
Conversation
|
We should also change the source and core representation. However, it would be good to do this after merging #1219 |
|
Note that there are specific use cases for external block parameters:
That is why I fixed the captures for them in #448 . |
|
Otherwise, is there a reason they won't be supported? Apart from having to pass them through? |
| def transform(extern: core.Extern)(using BlocksParamsContext, ErrorReporter): Declaration = extern match { | ||
| case core.Extern.Def(name, tps, cparams, vparams, bparams, ret, capture, body) => | ||
| if bparams.nonEmpty then ErrorReporter.abort("Foreign functions currently cannot take block arguments.") | ||
| if bparams.nonEmpty then ErrorReporter.abort("Foreign functions cannot take block arguments.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given that this error message will only show up on LLVM (i.e. machine-based backends), maybe we'd want to specify this in the error message?
|
We can also just support it, if you tell me what the semantics should be. |
|
@phischu I would assume that the block parameters are also passed as parameters (of type |
Previously there was an error message stating that block parameters are currently not supported, but they most probably never will be (@phischu)