Skip to content

Commit

Permalink
[dart2wasm] Use Uint8List for representing bytes
Browse files Browse the repository at this point in the history
We should use `Uint8List` to represent bytes in the wasm serialization
code. For cases where we only write two fixed bytes, we use `writeByte`
instead (which is faster than `Uint8List.setRange(<int>[a, b])`. We use
a cached `ByteData` to write little-endian float32/float64.

Change-Id: Id5662c1b7a3ba15f087341b13a99bbfdfa37059e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403864
Reviewed-by: Slava Egorov <vegorov@google.com>
  • Loading branch information
mkustermann committed Jan 10, 2025
1 parent 5d3d965 commit d704828
Show file tree
Hide file tree
Showing 3 changed files with 192 additions and 79 deletions.
Loading

0 comments on commit d704828

Please sign in to comment.