aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/pickling/TreePickler.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-02-19 12:20:20 +0100
committerDmitry Petrashko <dmitry.petrashko@gmail.com>2015-03-18 11:14:08 +0100
commited986b5256a535a50fe3c6095fe7a93376edb0fc (patch)
tree1e6d1035687c421a6fc83314fb28a2182f104084 /src/dotty/tools/dotc/core/pickling/TreePickler.scala
parentf922a46b09cd65a421f8a61eb1979e651a8e8110 (diff)
downloaddotty-ed986b5256a535a50fe3c6095fe7a93376edb0fc.tar.gz
dotty-ed986b5256a535a50fe3c6095fe7a93376edb0fc.tar.bz2
dotty-ed986b5256a535a50fe3c6095fe7a93376edb0fc.zip
Add INSUPERCALL flag to pickle format.
Reason: It is really hard to establish when a context is a inSuperCall context when unpickling trees. The unpickler does not have the ability to look inside (untyped) trees, so it is tricky/messy to detect a super.<init> or this.<init> Apply in a constructor body. Also: Always pickle template constructors.
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/TreePickler.scala')
-rw-r--r--src/dotty/tools/dotc/core/pickling/TreePickler.scala3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/TreePickler.scala b/src/dotty/tools/dotc/core/pickling/TreePickler.scala
index 7855f5d3e..801d3edb6 100644
--- a/src/dotty/tools/dotc/core/pickling/TreePickler.scala
+++ b/src/dotty/tools/dotc/core/pickling/TreePickler.scala
@@ -366,7 +366,7 @@ class TreePickler(pickler: TastyPickler, picklePositions: Boolean) {
tree.parents.foreach(pickleTree)
if (!tree.self.isEmpty)
pickleDef(PARAM, tree.self.symbol, tree.self.tpt, EmptyTree)
- pickleTreeIfNonEmpty(tree.constr)
+ pickleTree(tree.constr)
tree.body.foreach(pickleTree)
}
case Import(expr, selectors) =>
@@ -433,6 +433,7 @@ class TreePickler(pickler: TastyPickler, picklePositions: Boolean) {
if (flags is Synthetic) writeByte(SYNTHETIC)
if (flags is Artifact) writeByte(ARTIFACT)
if (flags is Scala2x) writeByte(SCALA2X)
+ if (flags is InSuperCall) writeByte(INSUPERCALL)
if (sym.isTerm) {
if (flags is Implicit) writeByte(IMPLICIT)
if (flags is Lazy) writeByte(LAZY)