Dynamic subarray offset
Feature request: subarrays with a dynamic starting index. Note that Jasmin already supports dynamic indexes for array access. For subarrays, the syntax might look like this:
reg u64 i;
reg ptr u8[N*M] arr;
reg ptr u8[N] sub;
...
i = 0;
while (i < N * M)
{
sub = arr[i:N];
...
i += M;
}
I have a branch somewhere, let me resurrect it.
I have just rebased the branch: subarray_unknown_index.
@defund I know the branch is a bit buggy, but please try it and report whether it suits your needs or if it has limitations. And please check whether it generates the right assembly. I am not confident that even this part is right.
Ping @defund. Have you tried the branch?
This feature is now available since 2025.06.0.