+ // Line and column values are encoded in 1 of 3 modes depending on the size
+ // of their values. These modes are:
+ //
+ // 1. FatLine: 22-bit line, 8-bit column.
+ // 2. FatColumn: 8-bit line, 22-bit column.
+ // 3. FatLineAndColumn: 32-bit line, 32-bit column.
+ //
+ // For the first 2 modes, the line and column will be encoded in the 30-bit
+ // position field in the ExpressionRangeInfo. For the FatLineAndColumn mode,
+ // the position field will hold an index into a FatPosition vector which
+ // holds the FatPosition records with the full 32-bit line and column values.
+
+ enum {
+ FatLineMode,
+ FatColumnMode,
+ FatLineAndColumnMode
+ };
+
+ struct FatPosition {
+ uint32_t line;
+ uint32_t column;
+ };
+
+ enum {
+ FatLineModeLineShift = 8,
+ FatLineModeLineMask = (1 << 22) - 1,
+ FatLineModeColumnMask = (1 << 8) - 1,
+ FatColumnModeLineShift = 22,
+ FatColumnModeLineMask = (1 << 8) - 1,
+ FatColumnModeColumnMask = (1 << 22) - 1
+ };
+