You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following program is rejected by the compiler:
param int N = 4;
#[stacksize = N]
export fn xor(reg u32 x y) -> reg u32 {
stack u8[N] s;
s[u32 0] = x;
x = y;
y = s[u32 0];
x ^= y;
return x;
}
I think it would be nice to be able to use parameters in annotations. It might be necessary to provide means to disambiguate identifiers (e.g., here N could be the name of a function).
The text was updated successfully, but these errors were encountered:
This will be clearly nice to have. How will you do the change in the annotations ?
By doing a global string replacement ?
#[s1 = ... @param(N) ... ] --> #[s1 = ... 4 ...]
I don't say that we should use this syntax. I just want to understand how we can do it ?
The following program is rejected by the compiler:
I think it would be nice to be able to use parameters in annotations. It might be necessary to provide means to disambiguate identifiers (e.g., here
N
could be the name of a function).The text was updated successfully, but these errors were encountered: