We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The pointer arithmetic example at https://www.assemblyscript.org/introduction.html#low-level-perspective seems incorrect:
store<i32>(ptr, load<i32>(ptr) + load<i32>(ptr, 4), 8)
But to match the C example it should be:
store<i32>(ptr, load<i32>(ptr) + load<i32>(ptr, 16), 32)
It looks like load/store offsets are implemented in bytes, but it would be really handy if it used the element size for parity with C.
The text was updated successfully, but these errors were encountered:
I moved this issue to website issues. Regarding snippet. Yes it should be fixed but in C example:
- *(ptr + 8) = *ptr + *(ptr + 4) + *(ptr + 2) = *ptr + *(ptr + 1)
offsets should in bytes due to this wasm intrinsics and we can't change original semantics
PR is welcomed
Sorry, something went wrong.
No branches or pull requests
The pointer arithmetic example at https://www.assemblyscript.org/introduction.html#low-level-perspective seems incorrect:
But to match the C example it should be:
It looks like load/store offsets are implemented in bytes, but it would be really handy if it used the element size for parity with C.
The text was updated successfully, but these errors were encountered: