summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-07-11 19:03:35 +0200
committerMartin Odersky <odersky@gmail.com>2012-07-11 19:35:55 +0200
commita9b85dbaad568b5c709a5eb6ab23907cdf4ee29e (patch)
tree56180948d8986aafa37e93e837db70c9106c2f6b /src/compiler
parent026a70d55591c3b5ee157e22998b62168afee686 (diff)
downloadscala-a9b85dbaad568b5c709a5eb6ab23907cdf4ee29e.tar.gz
scala-a9b85dbaad568b5c709a5eb6ab23907cdf4ee29e.tar.bz2
scala-a9b85dbaad568b5c709a5eb6ab23907cdf4ee29e.zip
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.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/symtab/classfile/Pickler.scala4
1 files changed, 2 insertions, 2 deletions
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)