Skip to content

Conversation

@MaxGraey
Copy link
Member

@MaxGraey MaxGraey commented Aug 7, 2022

  • Remove bswap from polyfills.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. Move bswap tests to tests/builtins
  • I've read the contributing guidelines
  • I've added my name and email to the NOTICE file

@MaxGraey
Copy link
Member Author

MaxGraey commented Aug 8, 2022

It might even be worth transferring this to builtins.ts and generating it immediately to binaryen IR.

@MaxGraey MaxGraey changed the title Refactor bswap. Remove bswap16 Move bswap to builtins. Remove bswap16 Aug 8, 2022
@MaxGraey MaxGraey requested a review from dcodeIO August 8, 2022 21:23
@MaxGraey MaxGraey merged commit afa0e2d into AssemblyScript:main Aug 15, 2022
@MaxGraey MaxGraey deleted the refactor-bswap branch August 15, 2022 17:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants