diff options
Diffstat (limited to 'test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala')
-rw-r--r-- | test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala index 941a167114..8d4bc19ec3 100644 --- a/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala +++ b/test/junit/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzerTest.scala @@ -14,18 +14,10 @@ import scala.tools.testing.ClearAfterClass import CodeGenTools._ import AsmUtils._ -object ProdConsAnalyzerTest extends ClearAfterClass.Clearable { - var noOptCompiler = newCompiler(extraArgs = "-Ybackend:GenBCode -Yopt:l:none") - - def clear(): Unit = { - noOptCompiler = null - } -} - @RunWith(classOf[JUnit4]) class ProdConsAnalyzerTest extends ClearAfterClass { - ClearAfterClass.stateToClear = ProdConsAnalyzerTest - val noOptCompiler = ProdConsAnalyzerTest.noOptCompiler + val noOptCompiler =cached("compiler", () => newCompiler(extraArgs = "-Yopt:l:none")) + import noOptCompiler.genBCode.bTypes.backendUtils._ def prodToString(producer: AbstractInsnNode) = producer match { case p: InitialProducer => p.toString |