Skip to content
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

Fix JS slices #372

Merged
merged 4 commits into from
Nov 28, 2023
Merged

Fix JS slices #372

merged 4 commits into from
Nov 28, 2023

Conversation

robertbastian
Copy link
Collaborator

@robertbastian robertbastian commented Nov 23, 2023

This is currently broken for element sizes > 1, as byte size and slice size are not distinguished.

I'm also removing the constraint that slices can only be constructed from the correct TypedArray, as it's easy enough to construct them from arbitrary arrays.

Fixes #339

tool/src/js/runtime.mjs Show resolved Hide resolved
tool/src/js/runtime.mjs Show resolved Hide resolved
Copy link
Contributor

@Manishearth Manishearth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great, thanks, this has been on my list to debug for a long time now

tool/src/js/runtime.mjs Show resolved Hide resolved
tool/src/js/runtime.mjs Show resolved Hide resolved
@robertbastian robertbastian merged commit 5e392d5 into main Nov 28, 2023
5 checks passed
robertbastian added a commit to robertbastian/diplomat that referenced this pull request Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JS runtime slice code truncates values
3 participants