assemblyscript
assemblyscript copied to clipboard
Move bswap to builtins. Remove bswap16
- Remove
bswap
frompolyfills.ts
and expose it as compiler's builtin. - Remove
bswap16
. We didn't use it and I can't imagine where it would be needed. So removing it and don't mark this PR as breaking changed due to its mostly internal change. - Add
Type#toUnsigned
helper which try to force type to unsigned. Useful for sign agnostic operations, especially generic types, due to reduce polymorphic noise. - Remove
polyfills.ts
and according tests. Movebswap
tests totests/builtins
- [x] I've read the contributing guidelines
- [x] I've added my name and email to the NOTICE file
It might even be worth transferring this to builtins.ts and generating it immediately to binaryen IR.