From a9b85dbaad568b5c709a5eb6ab23907cdf4ee29e Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 11 Jul 2012 19:03:35 +0200 Subject: Pickled flag reorg Cleaned up and optimized code that maps between raw and pickled flags. Avoids mystery constants. Makes a whole bunch of new flags be pickled which were not pickled before (more precisely: Everything in InitialFlags with value greater than 1 << 31 which is not in FlagsNotPickled now gets pickled whereas before it wasn't. Among these: VARARGS, IMPLCLASS, SPECIALZED, DEFAULTINIT, SYNCHRONIZED. I am curious how many tickets will get fixed by this change. The first one I noted is t5504, which previously enforced the buggy behavior through a neg check! There are also some build manager check file changes that have to do with the fact that flags now print in a different order for performance reasons. --- src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala index 192cc94b90..cc5ed0f129 100644 --- a/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala +++ b/src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala @@ -503,7 +503,7 @@ abstract class Pickler extends SubComponent { private def writeSymInfo(sym: Symbol) { writeRef(sym.name) writeRef(localizedOwner(sym)) - writeLongNat((rawFlagsToPickled(sym.flags & PickledFlags))) + writeLongNat((rawToPickledFlags(sym.flags & PickledFlags))) if (sym.hasAccessBoundary) writeRef(sym.privateWithin) writeRef(sym.info) } @@ -966,7 +966,7 @@ abstract class Pickler extends SubComponent { TREE case Modifiers(flags, privateWithin, _) => - val pflags = rawFlagsToPickled(flags) + val pflags = rawToPickledFlags(flags) writeNat((pflags >> 32).toInt) writeNat((pflags & 0xFFFFFFFF).toInt) writeRef(privateWithin) -- cgit v1.2.3