All files / types IBitmapFieldLayout.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30                                                           
/**
 * The bit region one bitmap field occupies (ADR-034).
 *
 * The projected, name-free view of `IBitmapFieldSymbol` that codegen and the
 * header writer consume -- #1318 chose projection over handing those layers a
 * symbol, deliberately, so this is the shape that projection produces.
 *
 * It exists because the same two fields were written out inline at every site
 * that touched a bitmap field -- the consumers (`ICodeGenSymbols`,
 * `IHeaderTypeInput`, `BitmapAccessHelper`, `BitmapHandlers`), the PRODUCER that
 * builds the map (`TSymbolInfoAdapter`), and two file-local duplicates named
 * `IBitmapFieldInfo` and `BitmapFieldInfo` in `BitmapCommentUtils` and
 * `AccessExprGenerator`. Adding a third property meant editing all of them in
 * lockstep -- the duplicate-path shape this project forbids outright (#1486).
 *
 * The producer matters most: converting only the consumers would have left the
 * lockstep intact and made the converted maps flow into unconverted signatures,
 * type-checking by structural typing alone -- agreement by coincidence, which is
 * what this type exists to stop.
 */
interface IBitmapFieldLayout {
  /** Bit offset from LSB */
  readonly offset: number;
 
  /** Width in bits */
  readonly width: number;
}
 
export default IBitmapFieldLayout;