Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upAtomics operations should use ToIndex, not ToInteger #807
Comments
This was referenced Feb 9, 2017
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
Show comment
Hide comment
syg
Feb 9, 2017
Member
I audited all the ToInteger uses for the SAB+Atomics stuff and the only one I found is ValidateAtomicAccess.
|
I audited all the ToInteger uses for the SAB+Atomics stuff and the only one I found is ValidateAtomicAccess. |
added a commit
to syg/ecma262
that referenced
this issue
Feb 9, 2017
syg
referenced this issue
Feb 9, 2017
Merged
Normative: use ToIndex instead of ToInteger in ValidateAtomicAccess #811
bterlson
closed this
in
111c0a6
Feb 13, 2017
lars-t-hansen
added
the
needs tests
label
Feb 23, 2017
lars-t-hansen
referenced this issue
Feb 23, 2017
Merged
Account for the use of ToIndex in Atomic operations #870
added a commit
to tc39/test262
that referenced
this issue
Mar 2, 2017
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
lars-t-hansen commentedFeb 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