diff options
author | chmod222 <304922+chmod222@users.noreply.github.com> | 2023-04-03 05:22:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-03 05:22:31 +0200 |
commit | 31d3606fe82855dc63cb59fa509577ba1c3a3b86 (patch) | |
tree | f86f0ddfaa11f439fd85fe76074a904548b2e12b /ci | |
parent | 6ec9c7f683abd520ad70b7ca6fbee11312b5cf11 (diff) | |
download | Nim-31d3606fe82855dc63cb59fa509577ba1c3a3b86.tar.gz |
fixes #21564; std/bitops: Add explicit type masking for the JS target (#21598)
* std/bitops: Add explicit type masking for the JS target Typecasts on the JavaScript backend do not function the same way as they do on C and C++ backends, so for bitwise operations we may need to mask them back down into their allowed range when they get shifted outside it. Since they do work as expected on the other backends, a default bitmask of all 1's is casted down into the target type as an easily optimizable "& 0xFF" operation for these backends. * Fixup: this should still be a func * Run test case on js target * Adapt testcase to contributor guide and best practices * Simplify constrain logic and turn into actual no-op for the C side
Diffstat (limited to 'ci')
0 files changed, 0 insertions, 0 deletions