| 109 | } |
| 110 | |
| 111 | static void fillBitWindow(State s) { |
| 112 | if (BIT_READER_DEBUG != 0) { |
| 113 | assertAccumulatorHealthy(s); |
| 114 | } |
| 115 | if (s.bitOffset >= HALF_BITNESS) { |
| 116 | // Same as doFillBitWindow. JVM fails to inline it. |
| 117 | if (BITNESS == 64) { |
| 118 | s.accumulator64 = ((long) s.intBuffer[s.halfOffset++] << HALF_BITNESS) |
| 119 | | Utils.shr64(s.accumulator64, HALF_BITNESS); |
| 120 | } else { |
| 121 | s.accumulator32 = ((int) s.shortBuffer[s.halfOffset++] << HALF_BITNESS) |
| 122 | | Utils.shr32(s.accumulator32, HALF_BITNESS); |
| 123 | } |
| 124 | s.bitOffset -= HALF_BITNESS; |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | static void doFillBitWindow(State s) { |
| 129 | if (BIT_READER_DEBUG != 0) { |