assemblyscript
assemblyscript copied to clipboard
Move bswap to builtins. Remove bswap16
- Remove
bswapfrompolyfills.tsand 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#toUnsignedhelper which try to force type to unsigned. Useful for sign agnostic operations, especially generic types, due to reduce polymorphic noise. - Remove
polyfills.tsand according tests. Movebswaptests 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.