@@ -41,14 +41,14 @@ trait BytecodeWriters {
41
41
def getFile (sym : Symbol , clsName : String , suffix : String ): AbstractFile =
42
42
getFile(outputDirectory(sym), clsName, suffix)
43
43
44
- def factoryNonJarBytecodeWriter (implicit ctx0 : Context ): BytecodeWriter = {
45
- val emitAsmp = ctx0.base .settings.Ygenasmp .isSetByUser
46
- val doDump = ctx0.base .settings.Ydumpclasses .isSetByUser
44
+ def factoryNonJarBytecodeWriter (implicit ctx : Context ): BytecodeWriter = {
45
+ val emitAsmp = ctx .settings.Ygenasmp .isSetByUser
46
+ val doDump = ctx .settings.Ydumpclasses .isSetByUser
47
47
(emitAsmp, doDump) match {
48
- case (false , false ) => new ClassBytecodeWriter { val ctx = ctx0 }
49
- case (false , true ) => new ClassBytecodeWriter with DumpBytecodeWriter { val ctx = ctx0 }
50
- case (true , false ) => new ClassBytecodeWriter with AsmpBytecodeWriter { val ctx = ctx0 }
51
- case (true , true ) => new ClassBytecodeWriter with AsmpBytecodeWriter with DumpBytecodeWriter { val ctx = ctx0 }
48
+ case (false , false ) => new ClassBytecodeWriter
49
+ case (false , true ) => new ClassBytecodeWriter with DumpBytecodeWriter
50
+ case (true , false ) => new ClassBytecodeWriter with AsmpBytecodeWriter
51
+ case (true , true ) => new ClassBytecodeWriter with AsmpBytecodeWriter with DumpBytecodeWriter
52
52
}
53
53
}
54
54
@@ -116,7 +116,7 @@ trait BytecodeWriters {
116
116
}
117
117
}
118
118
119
- trait ClassBytecodeWriter extends BytecodeWriter {
119
+ class ClassBytecodeWriter ( implicit protected val ctx : Context ) extends BytecodeWriter {
120
120
def writeClass (label : String , jclassName : String , jclassBytes : Array [Byte ], outfile : AbstractFile ): Unit = {
121
121
assert(outfile != null ,
122
122
" Precisely this override requires its invoker to hand out a non-null AbstractFile." )
0 commit comments