diff options
author | Martin Odersky <odersky@gmail.com> | 2015-03-04 14:39:13 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:14:14 +0100 |
commit | a4b2a67fa5d58f7dbd34b8876e8a87e309524e22 (patch) | |
tree | 66c721ac1d151b0c3b640dffb56f647ebf727f4f /src/dotty/tools/dotc/core/pickling/TastyPrinter.scala | |
parent | 96fbd7bfe252026f59d1f5e8aa33f2d8fae65769 (diff) | |
download | dotty-a4b2a67fa5d58f7dbd34b8876e8a87e309524e22.tar.gz dotty-a4b2a67fa5d58f7dbd34b8876e8a87e309524e22.tar.bz2 dotty-a4b2a67fa5d58f7dbd34b8876e8a87e309524e22.zip |
Changes to Tasty format
Use fewer length fields in type encodings.
- create new category of tags that take exactly one argument tree.
- avoid using length where a tag fits in one of theopther categories.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/TastyPrinter.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/TastyPrinter.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala b/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala index 38dac2c32..3311fc683 100644 --- a/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala +++ b/src/dotty/tools/dotc/core/pickling/TastyPrinter.scala @@ -62,11 +62,9 @@ class TastyPrinter(bytes: Array[Byte])(implicit ctx: Context) { val end = currentAddr + len def printTrees() = until(end)(printTree()) tag match { - case IMPORTED => - printName() case RENAMED => printName(); printName() - case VALDEF | DEFDEF | TYPEDEF | TYPEPARAM | PARAM | NAMEDARG | SELFDEF | BIND => + case VALDEF | DEFDEF | TYPEDEF | TYPEPARAM | PARAM | NAMEDARG | BIND => printName(); printTrees() case REFINEDtype => printTree(); printName(); printTrees() @@ -87,14 +85,16 @@ class TastyPrinter(bytes: Array[Byte])(implicit ctx: Context) { } else if (tag >= firstNatASTTreeTag) { tag match { - case IDENT | SELECT | TERMREF | TYPEREF => printName() + case IDENT | SELECT | TERMREF | TYPEREF | SELFDEF => printName() case _ => printNat() } printTree() } + else if (tag >= firstASTTreeTag) + printTree() else if (tag >= firstNatTreeTag) tag match { - case TERMREFpkg | TYPEREFpkg | STRINGconst => printName() + case TERMREFpkg | TYPEREFpkg | STRINGconst | IMPORTED => printName() case _ => printNat() } indent -= 2 |