We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9177303 commit 550f697Copy full SHA for 550f697
src/dotty/tools/dotc/core/tasty/NameBuffer.scala
@@ -42,11 +42,13 @@ class NameBuffer extends TastyBuffer(10000) {
42
43
private def withLength(op: => Unit): Unit = {
44
val lengthAddr = currentAddr
45
- writeByte(0)
+ val lengthFieldLength = 2
46
+ for (i <- 0 until lengthFieldLength)
47
+ writeByte(0)
48
op
- val length = currentAddr.index - lengthAddr.index - 1
- assert(length < 128)
49
- putNat(lengthAddr, length, 1)
+ val length = currentAddr.index - lengthAddr.index - lengthFieldLength
50
+ assert(length < (1 << (7 * lengthFieldLength)))
51
+ putNat(lengthAddr, length, lengthFieldLength)
52
}
53
54
def writeNameRef(ref: NameRef) = writeNat(ref.index)
0 commit comments