-
Notifications
You must be signed in to change notification settings - Fork 56
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
checking of constant/writable arguments #178
Conversation
853e657
to
d03e62c
Compare
This example is artificial, but do we want to accept such things?
|
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.
This is not ready. The following program is now rejected:
fn zerofill(reg mut ptr u64[1] x) -> reg ptr u64[1] {
x[0] = 0;
return x;
}
export
fn main() -> reg u64 {
stack u64[1] s;
s = zerofill(s);
reg u64 r;
r = s[0];
return r;
}
With @bgregoir, we are not sure what to do exactly, so let's postpone this a bit. |
IMHO, it is OK to reject the artificial example above. |
I did not see your last commit and I did the same patch. inline fn zerofill(stack u64[1] x) -> stack u64[1] { export |
Fix printing of #inline function calls
Unless someone wants to implement a more precise check, I recommend to merge this PR as is. |
Ok with this. |
Apparently I can't merge it myself. |
You have to accept it first (i.e. add a positive review). |
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.
@bgregoir accepts his own PR
No description provided.