aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/TastyPickler.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-02-10 12:39:15 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-03-18 11:09:43 +0100
commit1c5f3b75f7e70e8608d6be442087857bd4a6b2cc (patch)
tree26a197f56bfbd0a0ffa819cf68a730abd88a6260 /src/dotty/tools/dotc/core/pickling/TastyPickler.scala
parent41922c14bf1a45a3dcf7afca7719e0be84c2c29a (diff)
downloaddotty-1c5f3b75f7e70e8608d6be442087857bd4a6b2cc.tar.gz
dotty-1c5f3b75f7e70e8608d6be442087857bd4a6b2cc.tar.bz2
dotty-1c5f3b75f7e70e8608d6be442087857bd4a6b2cc.zip
Add TASTY readers and printers for TASTy info.
So far printing is the only reader, ie. deserializer. Numerous bugfixes to make first tests work.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/TastyPickler.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/TastyPickler.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/TastyPickler.scala b/src/dotty/tools/dotc/core/pickling/TastyPickler.scala
index 2ae6848e0..32cc1ae43 100644
--- a/src/dotty/tools/dotc/core/pickling/TastyPickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/TastyPickler.scala
@@ -9,7 +9,7 @@ import TastyBuffer._
class TastyPickler {
- private val sections = new mutable.ArrayBuffer[(TastyName.Ref, TastyBuffer)]
+ private val sections = new mutable.ArrayBuffer[(TastyName.NameRef, TastyBuffer)]
private val headerBuffer = {
val buf = new TastyBuffer(16)
@@ -24,7 +24,7 @@ class TastyPickler {
def newSection(name: String, buf: TastyBuffer) =
sections += ((nameBuffer.nameIndex(name), buf))
- def assembleParts: Array[Byte] = {
+ def assembleParts(): Array[Byte] = {
def lengthWithLength(buf: TastyBuffer) = {
buf.assemble()
buf.length + natSize(buf.length)
@@ -44,7 +44,7 @@ class TastyPickler {
all.writeNat(buf.length)
all.writeBytes(buf.bytes, buf.length)
}
- assert(all.length == totalSize && all.bytes.length == totalSize)
+ assert(all.length == totalSize && all.bytes.length == totalSize, s"totalSize = $totalSize, all.length = ${all.length}, all.bytes.length = ${all.bytes.length}")
all.bytes
}
}