diff options
author | Martin Odersky <odersky@gmail.com> | 2013-02-27 16:27:26 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2013-02-27 16:27:26 +0100 |
commit | 62d0df5a8ef140a721e3e14d9dae34545ef9016d (patch) | |
tree | 07edc159ba9c359143ff7d3e3f5dbb701def636c /src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | |
parent | b1f0eaa41cdf0a6bbc37078f6580b04f85ad5079 (diff) | |
download | dotty-62d0df5a8ef140a721e3e14d9dae34545ef9016d.tar.gz dotty-62d0df5a8ef140a721e3e14d9dae34545ef9016d.tar.bz2 dotty-62d0df5a8ef140a721e3e14d9dae34545ef9016d.zip |
Cleaup of Contexts
Diffstat (limited to 'src/dotty/tools/dotc/core/pickling/ClassfileParser.scala')
-rw-r--r-- | src/dotty/tools/dotc/core/pickling/ClassfileParser.scala | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala index 8e34aa0a9..390aac890 100644 --- a/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala +++ b/src/dotty/tools/dotc/core/pickling/ClassfileParser.scala @@ -20,6 +20,7 @@ class ClassfileParser( import ClassfileConstants._ import cctx.base.{settings, loaders, definitions => defn} + import cctx.{debug, verbose} protected val in = new AbstractFileReader(classfile) @@ -48,7 +49,7 @@ class ClassfileParser( parseClass() } catch { case e: RuntimeException => - if (settings.debug.value) e.printStackTrace() + if (debug) e.printStackTrace() throw new IOException( s"""class file $classfile is broken, reading aborted with $e.getClass |${Option(e.getMessage).getOrElse("")}""".stripMargin) @@ -411,7 +412,7 @@ class ClassfileParser( // with a `FatalError` exception, handled above. Here you'd end up after a NPE (for example), // and that should never be swallowed silently. cctx.warning("Caught: " + ex + " while parsing annotations in " + in.file) - if (settings.debug.value) ex.printStackTrace() + if (debug) ex.printStackTrace() None // ignore malformed annotations } @@ -433,7 +434,7 @@ class ClassfileParser( case tpnme.SignatureATTR => val sig = pool.getExternalName(in.nextChar) newType = sigToType(sig, sym) - if (settings.debug.value && settings.verbose.value) + if (debug && verbose) println("" + sym + "; signature = " + sig + " type = " + newType) case tpnme.SyntheticATTR => sym.setFlag(Flags.SyntheticArtifact) |