Wolfgang Jeltsch pushed to branch wip/jeltsch/portable-bco-byte-array-serialization at Glasgow Haskell Compiler / GHC
Commits:
-
14010b37
by Wolfgang Jeltsch at 2026-11-24T22:00:31+02:00
-
176ff991
by Wolfgang Jeltsch at 2026-11-24T22:00:57+02:00
1 changed file:
Changes:
| ... | ... | @@ -215,7 +215,7 @@ getBCOByteArrayDirectly @a = do |
| 215 | 215 | |
| 216 | 216 | #endif
|
| 217 | 217 | |
| 218 | --- See [BCOByteArray serialization].
|
|
| 218 | +-- See Note [BCOByteArray serialization].
|
|
| 219 | 219 | instance Binary (BCOByteArray Word16) where
|
| 220 | 220 | |
| 221 | 221 | #if defined(WORDS_BIGENDIAN)
|
| ... | ... | @@ -226,7 +226,7 @@ instance Binary (BCOByteArray Word16) where |
| 226 | 226 | get = getBCOByteArrayDirectly
|
| 227 | 227 | #endif
|
| 228 | 228 | |
| 229 | --- See [BCOByteArray serialization].
|
|
| 229 | +-- See Note [BCOByteArray serialization].
|
|
| 230 | 230 | instance Binary (BCOByteArray Word) where
|
| 231 | 231 | |
| 232 | 232 | #if defined(WORDS_BIGENDIAN) || SIZEOF_HSWORD == 4
|
| ... | ... | @@ -253,10 +253,8 @@ instance Binary (BCOByteArray Word) where |
| 253 | 253 | -- native bit size.
|
| 254 | 254 | --
|
| 255 | 255 | -- Whenever the encoding of the payload matches its representation in main
|
| 256 | --- memory, the whole payload is transferred verbatim (`putBCOByteArrayDirectly`,
|
|
| 257 | --- `getBCOByteArrayDirectly`). Otherwise, the elements are serialized or
|
|
| 258 | --- deserialized individually (`putBCOByteArrayPortably`,
|
|
| 259 | --- `getBCOByteArrayPortably`).
|
|
| 256 | +-- memory, the whole payload is transferred verbatim. Otherwise, the elements
|
|
| 257 | +-- are serialized or deserialized individually.
|
|
| 260 | 258 | |
| 261 | 259 | data ResolvedBCOPtr
|
| 262 | 260 | = ResolvedBCORef {-# UNPACK #-} !Int
|