diff options
author | Martin Odersky <odersky@gmail.com> | 2015-02-19 12:20:20 +0100 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-03-18 11:14:08 +0100 |
commit | ed986b5256a535a50fe3c6095fe7a93376edb0fc (patch) | |
tree | 1e6d1035687c421a6fc83314fb28a2182f104084 /src/dotty/tools/dotc/core/pickling/TreePickler.scala | |
parent | f922a46b09cd65a421f8a61eb1979e651a8e8110 (diff) | |
download | dotty-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.scala | 3 |
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) |