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

Atomics operations should use ToIndex, not ToInteger #807

Closed
lars-t-hansen opened this Issue Feb 9, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@lars-t-hansen
Contributor

lars-t-hansen commented Feb 9, 2017

(Moved from tc39/ecmascript_sharedmem#160)

Says @evilpie: We probably want to switch everything new to ToIndex instead of ToInteger. This affects at least ValidateAtomicAccess.

It appears that the current Atomics spec language is modeled on an older version of GetViewValue, which has since been changed to use ToIndex. I don't think there's any reason not to change the proposal to follow that change, as Tom says. Given the structure of the proposal text the only change should be in ValidateAtomicAccess, where steps 2-4 are replaced by a call to ToIndex and step 6 does not need to test for negative values.

Also see issue #410, which changed GetViewValue.

cc @leobalter

@syg

This comment has been minimized.

Show comment
Hide comment
@syg

syg Feb 9, 2017

Member

I audited all the ToInteger uses for the SAB+Atomics stuff and the only one I found is ValidateAtomicAccess.

Member

syg commented Feb 9, 2017

I audited all the ToInteger uses for the SAB+Atomics stuff and the only one I found is ValidateAtomicAccess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment