-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Perform unaligned writes via FFI when necessary (#587)
* Perform unaligned writes via FFI when necessary * Be a bit less ignorant about the C preprocessor * Test unaligned uses of Builders a bit more * Attempt to remove Float-related unaligned accesses * fix new old-ghc stuff * todo: figure out how to get cpp to warn about this mistake * Fix CPP mistakes * Fix another stupid CPP mistake cpp-options: -Werror=undef is pulling its weight already. * Shut up cabal check about -Werror=undef * Omit conditionally-used C bindings when unused * Revert stimes-related changes * Add question about lowerTable * Revert "Omit conditionally-used C bindings when unused" This reverts commit 145cdac. * Lots of mostly Float/Double-related tweaks - Haskell unaligned write functions now live in a new module: Data.ByteString.Utils.UnalignedWrite - The word*HexFixed functions now use unaligned writes; likewise Data.ByteString.Builder.RealFloat.Internal.copyWord16. - An FFI workaround for unaligned Float/Double writes was added. - The data tables in Data.ByteString.Builder.Prim.Internal.Base16 and Data.ByteString.Builder.RealFloat.{D,F}2S now live in the new file cbits/aligned-static-hs-data.c so that we can fearlessly perform aligned reads from them. - The static Word64 data tables are now stored in host-byte-order instead of always little-endian. - Data.ByteString.Builder.RealFloat.Internal.digit_table is now a static data blob instead of a CAF. - All CPP around castFloatToWord32/castDoubleToWord64 now lives in Data.ByteString.Builder.Prim.Internal.Floating. * Update comment about locaiton of RealFloat tables * Remove useless temporary CPP guard * Re-add words "source code" in comment
- Loading branch information
Showing
16 changed files
with
1,085 additions
and
907 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.