diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-12-20 15:35:05 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-12-20 15:45:05 +0100 |
commit | a3b10d134401f21c33ce51abd65d3404700ed479 (patch) | |
tree | ae1be596e48c97c2d0d1a4479cb7ded026fa23fc /src/dotty/tools/dotc/core/tasty/TastyPickler.scala | |
parent | 68ce6e764db1e41408fcc3ad7c9874836874cd94 (diff) | |
download | dotty-a3b10d134401f21c33ce51abd65d3404700ed479.tar.gz dotty-a3b10d134401f21c33ce51abd65d3404700ed479.tar.bz2 dotty-a3b10d134401f21c33ce51abd65d3404700ed479.zip |
Postpone tree compaction till all phases finish operating TASTY.
Linker adds new sections. Wait for sections to be added and then compact.
Diffstat (limited to 'src/dotty/tools/dotc/core/tasty/TastyPickler.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/tasty/TastyPickler.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/tasty/TastyPickler.scala b/src/dotty/tools/dotc/core/tasty/TastyPickler.scala index e4f9a3092..83e6020d5 100644 --- a/src/dotty/tools/dotc/core/tasty/TastyPickler.scala +++ b/src/dotty/tools/dotc/core/tasty/TastyPickler.scala @@ -13,13 +13,13 @@ import ast.tpd class TastyPickler { private val sections = new mutable.ArrayBuffer[(TastyName.NameRef, TastyBuffer)] + val uuid = UUID.randomUUID() private val headerBuffer = { val buf = new TastyBuffer(24) for (ch <- header) buf.writeByte(ch.toByte) buf.writeNat(MajorVersion) buf.writeNat(MinorVersion) - val uuid = UUID.randomUUID() buf.writeUncompressedLong(uuid.getMostSignificantBits) buf.writeUncompressedLong(uuid.getLeastSignificantBits) buf @@ -31,6 +31,7 @@ class TastyPickler { sections += ((nameBuffer.nameIndex(name), buf)) def assembleParts(): Array[Byte] = { + treePkl.compactify() def lengthWithLength(buf: TastyBuffer) = { buf.assemble() buf.length + natSize(buf.length) |