diff options
author | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-07-06 17:20:27 +0200 |
---|---|---|
committer | Miguel Garcia <miguelalfredo.garcia@epfl.ch> | 2012-07-06 17:20:27 +0200 |
commit | 11765f150885f7b143c5fb493a7385927034fe68 (patch) | |
tree | 403be1a4e6fb3339d3418b92486d96ee9b97392d /src/compiler | |
parent | dc6a49337f072686516c14f50b847c38cbc6c225 (diff) | |
download | scala-11765f150885f7b143c5fb493a7385927034fe68.tar.gz scala-11765f150885f7b143c5fb493a7385927034fe68.tar.bz2 scala-11765f150885f7b143c5fb493a7385927034fe68.zip |
SI-6025 fix for GenASM, GenJVM-based fix pending
Diffstat (limited to 'src/compiler')
-rw-r--r-- | src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index 5ab8a3d751..49a3a13247 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -780,6 +780,12 @@ abstract class GenASM extends SubComponent with BytecodeWriters { /** functionality for building plain and mirror classes */
abstract class JCommonBuilder(wuQ: WorkUnitQueue, needsOutfileForSymbol: Boolean) extends JBuilder(wuQ, needsOutfileForSymbol) {
+ def debugLevel = settings.debuginfo.indexOfChoice
+
+ val emitSource = debugLevel >= 1
+ val emitLines = debugLevel >= 2
+ val emitVars = debugLevel >= 3
+
// -----------------------------------------------------------------------------------------
// more constants
// -----------------------------------------------------------------------------------------
@@ -1427,8 +1433,10 @@ abstract class GenASM extends SubComponent with BytecodeWriters { // typestate: entering mode with valid call sequences:
// [ visitSource ] [ visitOuterClass ] ( visitAnnotation | visitAttribute )*
- jclass.visitSource(c.cunit.source.toString,
- null /* SourceDebugExtension */)
+ if(emitSource) {
+ jclass.visitSource(c.cunit.source.toString,
+ null /* SourceDebugExtension */)
+ }
val enclM = getEnclosingMethodAttribute()
if(enclM != null) {
@@ -1556,12 +1564,6 @@ abstract class GenASM extends SubComponent with BytecodeWriters { jfield.visitEnd()
}
- def debugLevel = settings.debuginfo.indexOfChoice
-
- // val emitSource = debugLevel >= 1
- val emitLines = debugLevel >= 2
- val emitVars = debugLevel >= 3
-
var method: IMethod = _
var jmethod: asm.MethodVisitor = _
var jMethodName: String = _
@@ -2957,8 +2959,10 @@ abstract class GenASM extends SubComponent with BytecodeWriters { // typestate: entering mode with valid call sequences:
// [ visitSource ] [ visitOuterClass ] ( visitAnnotation | visitAttribute )*
- mirrorClass.visitSource("" + cunit.source,
- null /* SourceDebugExtension */)
+ if(emitSource) {
+ mirrorClass.visitSource("" + cunit.source,
+ null /* SourceDebugExtension */)
+ }
val ssa = getAnnotPickle(mirrorName, modsym.companionSymbol)
mirrorClass.visitAttribute(if(ssa.isDefined) pickleMarkerLocal else pickleMarkerForeign)
|