Commit c8f2aae
authored
Use little-endian byte ordering for internal conversions. (#343)
When implementing reinterpret-cast functions, use `python.struct`'s
`<` (little-endian) instead of `!` (network byte order).
This has no effective semantic change, because the conversions are
just converting between i32/f32 and i64/f64 and are always done in
pairs, so it's only required that the decoding match the encoding.
However, using little-endian more clearly describes the behavior as
corresponding to a Wasm store followed by a Wasm load, which would
both be little-endian.
In theory this could become significant in the future if we add SIMD
values where endianness conversions are partitioned by SIMD lanes,
or other complex types.1 parent 444b0f4 commit c8f2aae
2 files changed
+8
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
500 | 500 | | |
501 | 501 | | |
502 | 502 | | |
503 | | - | |
| 503 | + | |
504 | 504 | | |
505 | 505 | | |
506 | | - | |
| 506 | + | |
507 | 507 | | |
508 | 508 | | |
509 | 509 | | |
| |||
760 | 760 | | |
761 | 761 | | |
762 | 762 | | |
763 | | - | |
| 763 | + | |
764 | 764 | | |
765 | 765 | | |
766 | | - | |
| 766 | + | |
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
435 | 435 | | |
436 | 436 | | |
437 | 437 | | |
438 | | - | |
| 438 | + | |
439 | 439 | | |
440 | 440 | | |
441 | | - | |
| 441 | + | |
442 | 442 | | |
443 | 443 | | |
444 | 444 | | |
| |||
611 | 611 | | |
612 | 612 | | |
613 | 613 | | |
614 | | - | |
| 614 | + | |
615 | 615 | | |
616 | 616 | | |
617 | | - | |
| 617 | + | |
618 | 618 | | |
619 | 619 | | |
620 | 620 | | |
| |||
0 commit comments