Skip to content

Commit bac96a3

Browse files
committed
Merge pull request scala#4602 from lrytz/yoptInScala
Fix optimizer bugs and enable -Yopt:l:classpath when building scala
2 parents b92c3af + cd87823 commit bac96a3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+260
-117
lines changed

build-ant-macros.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<attribute name="name"/>
77
<sequential>
88
<antcall target="@{name}">
9-
<param name="scalac.args.optimise" value="-optimise"/>
9+
<param name="scalac.args.optimise" value="-Yopt:l:classpath"/>
1010
</antcall>
1111
</sequential>
1212
</macrodef>

build.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ant $antArgs $scalacArgs $targets
1919
2020
antArgs tend to be:
2121
-Darchives.skipxz=true
22-
-Dscalac.args.optimise=-optimise
22+
-Dscalac.args.optimise=-Yopt:l:classpath
2323
2424
scalacArgs examples:
2525
"-Dscalac.args=\"-Yrangepos\" -Dpartest.scalac_opts=\"-Yrangepos\""
@@ -79,13 +79,13 @@ TODO:
7979
<target name="publish-opt-nodocs" description="Publishes Scala (optimized) without generating docs/testing (library/reflect/compiler/swing).">
8080
<antcall target="publish">
8181
<param name="docs.skip" value="1"/>
82-
<param name="scalac.args.optimise" value="-optimise"/>
82+
<param name="scalac.args.optimise" value="-Yopt:l:classpath"/>
8383
</antcall>
8484
</target>
8585
<target name="publish-core-opt-nodocs" description="Builds an untested, undocumented optimised core (library/reflect/compiler) and publishes to maven.">
8686
<antcall target="publish-core">
8787
<param name="docs.skip" value="1"/>
88-
<param name="scalac.args.optimise" value="-optimise"/>
88+
<param name="scalac.args.optimise" value="-Yopt:l:classpath"/>
8989
</antcall>
9090
</target>
9191
<target name="publish-core-local-nodocs" description="Builds an untested, undocumented core (library/reflect/compiler) and locally publishes to maven">
@@ -1042,7 +1042,7 @@ TODO:
10421042
<antcall target="publish-core-local">
10431043
<param name="maven.version.suffix" value="-STARR-${git.commit.sha}-SNAPSHOT"/>
10441044
<param name="docs.skip" value="1"/>
1045-
<param name="scalac.args.optimise" value="-optimise"/>
1045+
<param name="scalac.args.optimise" value="-Yopt:l:classpath"/>
10461046
<param name="update.starr.version" value="alright then"/>
10471047
</antcall>
10481048
</target>

scripts/jobs/integrate/bootstrap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ bootstrap() {
493493
-Dremote.snapshot.repository=NOPE\
494494
-Dremote.release.repository=$releaseTempRepoUrl\
495495
-Drepository.credentials.id=$releaseTempRepoCred\
496-
-Dscalac.args.optimise=-optimise\
496+
-Dscalac.args.optimise=-Yopt:l:classpath\
497497
-Ddocs.skip=1\
498498
-Dlocker.skip=1\
499499
$publishLockerPrivateTask >> $baseDir/logs/builds 2>&1
@@ -533,7 +533,7 @@ bootstrap() {
533533
-Dremote.snapshot.repository=NOPE\
534534
-Dremote.release.repository=$releaseTempRepoUrl\
535535
-Drepository.credentials.id=$releaseTempRepoCred\
536-
-Dscalac.args.optimise=-optimise\
536+
-Dscalac.args.optimise=-Yopt:l:classpath\
537537
$antBuildTask $publishPrivateTask
538538

539539
# clear ivy cache (and to be sure, local as well), so the next round of sbt builds sees the fresh scala

scripts/jobs/validate/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ case $prDryRun in
1010
# build quick using STARR built upstream, as specified by scalaVersion
1111
# (in that sense it's locker, since it was built with starr by that upstream job)
1212
ant -Dstarr.version=$scalaVersion \
13-
-Dscalac.args.optimise=-optimise \
13+
-Dscalac.args.optimise=-Yopt:l:classpath \
1414
-Dlocker.skip=1 -Dextra.repo.url=$prRepoUrl \
1515
$testExtraArgs ${testTarget-test.core docs.done}
1616
;;

src/compiler/scala/tools/nsc/Global.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
13731373
unitbuf += unit
13741374
compiledFiles += unit.source.file.path
13751375
}
1376-
private def checkDeprecatedSettings(unit: CompilationUnit) {
1376+
private def warnDeprecatedAndConflictingSettings(unit: CompilationUnit) {
13771377
// issue warnings for any usage of deprecated settings
13781378
settings.userSetSettings filter (_.isDeprecated) foreach { s =>
13791379
currentRun.reporting.deprecationWarning(NoPosition, s.name + " is deprecated: " + s.deprecationMessage.get)
@@ -1383,6 +1383,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
13831383
currentRun.reporting.deprecationWarning(NoPosition, settings.target.name + ":" + settings.target.value + " is deprecated and has no effect, setting to " + supportedTarget)
13841384
settings.target.value = supportedTarget
13851385
}
1386+
settings.conflictWarning.foreach(reporter.warning(NoPosition, _))
13861387
}
13871388

13881389
/* An iterator returning all the units being compiled in this run */
@@ -1473,7 +1474,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14731474
def compileSources(sources: List[SourceFile]) = if (!reporter.hasErrors) {
14741475

14751476
def checkDeprecations() = {
1476-
checkDeprecatedSettings(newCompilationUnit(""))
1477+
warnDeprecatedAndConflictingSettings(newCompilationUnit(""))
14771478
reporting.summarizeErrors()
14781479
}
14791480

@@ -1495,7 +1496,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
14951496
val startTime = currentTime
14961497

14971498
reporter.reset()
1498-
checkDeprecatedSettings(unitbuf.head)
1499+
warnDeprecatedAndConflictingSettings(unitbuf.head)
14991500
globalPhase = fromPhase
15001501

15011502
while (globalPhase.hasNext && !reporter.hasErrors) {

src/compiler/scala/tools/nsc/backend/jvm/AsmUtils.scala

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import java.io.{StringWriter, PrintWriter}
1010
import scala.tools.asm.util.{CheckClassAdapter, TraceClassVisitor, TraceMethodVisitor, Textifier}
1111
import scala.tools.asm.{ClassWriter, Attribute, ClassReader}
1212
import scala.collection.convert.decorateAsScala._
13+
import scala.tools.nsc.backend.jvm.analysis.InitialProducer
1314
import scala.tools.nsc.backend.jvm.opt.InlineInfoAttributePrototype
1415

1516
object AsmUtils {
@@ -81,13 +82,16 @@ object AsmUtils {
8182
/**
8283
* Returns a human-readable representation of the given instruction.
8384
*/
84-
def textify(insn: AbstractInsnNode): String = {
85-
val trace = new TraceMethodVisitor(new Textifier)
86-
insn.accept(trace)
87-
val sw = new StringWriter
88-
val pw = new PrintWriter(sw)
89-
trace.p.print(pw)
90-
sw.toString.trim
85+
def textify(insn: AbstractInsnNode): String = insn match {
86+
case _: InitialProducer =>
87+
insn.toString
88+
case _ =>
89+
val trace = new TraceMethodVisitor(new Textifier)
90+
insn.accept(trace)
91+
val sw = new StringWriter
92+
val pw = new PrintWriter(sw)
93+
trace.p.print(pw)
94+
sw.toString.trim
9195
}
9296

9397
/**

src/compiler/scala/tools/nsc/backend/jvm/BCodeBodyBuilder.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ abstract class BCodeBodyBuilder extends BCodeSkelBuilder {
843843
*
844844
* New (http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.10.1)
845845
* - Requires consistent stack map frames. GenBCode always generates stack frames.
846-
* or higher.
847846
* - In practice: the ASM library computes stack map frames for us (ClassWriter). Emitting
848847
* correct frames after an ATHROW is probably complex, so ASM uses the following strategy:
849848
* - Every time when generating an ATHROW, a new basic block is started.

src/compiler/scala/tools/nsc/backend/jvm/BCodeHelpers.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -728,11 +728,11 @@ abstract class BCodeHelpers extends BCodeIdiomatic with BytecodeWriters {
728728
mv.visitVarInsn(ALOAD, 1)
729729
mv.visitFieldInsn(PUTSTATIC, clazz.javaBinaryName.toString, "$deserializeLambdaCache$", "Ljava/util/Map;")
730730
mv.visitLabel(l0)
731-
mv.visitFrame(asm.Opcodes.F_APPEND,1, Array("java/util/Map"), 0, null)
731+
mv.visitFieldInsn(GETSTATIC, "scala/runtime/LambdaDeserializer$", "MODULE$", "Lscala/runtime/LambdaDeserializer$;")
732732
mv.visitMethodInsn(INVOKESTATIC, "java/lang/invoke/MethodHandles", "lookup", "()Ljava/lang/invoke/MethodHandles$Lookup;", false)
733733
mv.visitVarInsn(ALOAD, 1)
734734
mv.visitVarInsn(ALOAD, 0)
735-
mv.visitMethodInsn(INVOKESTATIC, "scala/runtime/LambdaDeserializer", "deserializeLambda", "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/util/Map;Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object;", false)
735+
mv.visitMethodInsn(INVOKEVIRTUAL, "scala/runtime/LambdaDeserializer$", "deserializeLambda", "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/util/Map;Ljava/lang/invoke/SerializedLambda;)Ljava/lang/Object;", false)
736736
mv.visitInsn(ARETURN)
737737
mv.visitEnd()
738738
}

src/compiler/scala/tools/nsc/backend/jvm/analysis/ProdConsAnalyzer.scala

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,11 @@ class ProdConsAnalyzer(methodNode: MethodNode, classInternalName: InternalName)
103103
def initialProducersForValueAt(insn: AbstractInsnNode, slot: Int): Set[AbstractInsnNode] = {
104104
def initialProducers(insn: AbstractInsnNode, producedSlot: Int): Set[AbstractInsnNode] = {
105105
if (isCopyOperation(insn)) {
106-
_initialProducersCache.getOrElseUpdate((insn, producedSlot), {
106+
val key = (insn, producedSlot)
107+
_initialProducersCache.getOrElseUpdate(key, {
108+
// prevent infinite recursion if an instruction is its own producer or consumer
109+
// see cyclicProdCons in ProdConsAnalyzerTest
110+
_initialProducersCache(key) = Set.empty
107111
val (sourceValue, sourceValueSlot) = copyOperationSourceValue(insn, producedSlot)
108112
sourceValue.insns.iterator.asScala.flatMap(initialProducers(_, sourceValueSlot)).toSet
109113
})
@@ -121,7 +125,11 @@ class ProdConsAnalyzer(methodNode: MethodNode, classInternalName: InternalName)
121125
def ultimateConsumersOfValueAt(insn: AbstractInsnNode, slot: Int): Set[AbstractInsnNode] = {
122126
def ultimateConsumers(insn: AbstractInsnNode, consumedSlot: Int): Set[AbstractInsnNode] = {
123127
if (isCopyOperation(insn)) {
124-
_ultimateConsumersCache.getOrElseUpdate((insn, consumedSlot), {
128+
val key = (insn, consumedSlot)
129+
_ultimateConsumersCache.getOrElseUpdate(key, {
130+
// prevent infinite recursion if an instruction is its own producer or consumer
131+
// see cyclicProdCons in ProdConsAnalyzerTest
132+
_ultimateConsumersCache(key) = Set.empty
125133
for {
126134
producedSlot <- copyOperationProducedValueSlots(insn, consumedSlot)
127135
consumer <- consumersOfValueAt(insn.getNext, producedSlot)

src/compiler/scala/tools/nsc/backend/jvm/opt/BytecodeUtils.scala

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import scala.collection.mutable
1212
import scala.reflect.internal.util.Collections._
1313
import scala.tools.asm.commons.CodeSizeEvaluator
1414
import scala.tools.asm.tree.analysis._
15-
import scala.tools.asm.{MethodWriter, ClassWriter, Label, Opcodes}
15+
import scala.tools.asm.{MethodWriter, ClassWriter, Label, Opcodes, Type}
1616
import scala.tools.asm.tree._
1717
import GenBCode._
1818
import scala.collection.convert.decorateAsScala._
@@ -330,6 +330,26 @@ object BytecodeUtils {
330330
)).toList
331331
}
332332

333+
/**
334+
* This method is used by optimizer components to eliminate phantom values of instruction
335+
* that load a value of type `Nothing$` or `Null$`. Such values on the stack don't interact well
336+
* with stack map frames.
337+
*
338+
* For example, `opt.getOrElse(throw e)` is re-written to an invocation of the lambda body, a
339+
* method with return type `Nothing$`. Similarly for `opt.getOrElse(null)` and `Null$`.
340+
*
341+
* During bytecode generation this is handled by BCodeBodyBuilder.adapt. See the comment in that
342+
* method which explains the issue with such phantom values.
343+
*/
344+
def fixLoadedNothingOrNullValue(loadedType: Type, loadInstr: AbstractInsnNode, methodNode: MethodNode, bTypes: BTypes): Unit = {
345+
if (loadedType == bTypes.coreBTypes.RT_NOTHING.toASMType) {
346+
methodNode.instructions.insert(loadInstr, new InsnNode(Opcodes.ATHROW))
347+
} else if (loadedType == bTypes.coreBTypes.RT_NULL.toASMType) {
348+
methodNode.instructions.insert(loadInstr, new InsnNode(Opcodes.ACONST_NULL))
349+
methodNode.instructions.insert(loadInstr, new InsnNode(Opcodes.POP))
350+
}
351+
}
352+
333353
/**
334354
* A wrapper to make ASM's Analyzer a bit easier to use.
335355
*/

src/compiler/scala/tools/nsc/backend/jvm/opt/ClosureOptimizer.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,10 @@ class ClosureOptimizer[BT <: BTypes](val btypes: BT) {
283283
val isInterface = bodyOpcode == INVOKEINTERFACE
284284
val bodyInvocation = new MethodInsnNode(bodyOpcode, lambdaBodyHandle.getOwner, lambdaBodyHandle.getName, lambdaBodyHandle.getDesc, isInterface)
285285
methodNode.instructions.insertBefore(invocation, bodyInvocation)
286+
287+
val returnType = Type.getReturnType(lambdaBodyHandle.getDesc)
288+
fixLoadedNothingOrNullValue(returnType, bodyInvocation, methodNode, btypes) // see comment of that method
289+
286290
methodNode.instructions.remove(invocation)
287291

288292
// update the call graph

src/compiler/scala/tools/nsc/settings/ScalaSettings.scala

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ trait ScalaSettings extends AbsScalaSettings
136136
val sourceReader = StringSetting ("-Xsource-reader", "classname", "Specify a custom method for reading source files.", "")
137137
val reporter = StringSetting ("-Xreporter", "classname", "Specify a custom reporter for compiler messages.", "scala.tools.nsc.reporters.ConsoleReporter")
138138
val strictInference = BooleanSetting ("-Xstrict-inference", "Don't infer known-unsound types")
139-
val source = ScalaVersionSetting ("-Xsource", "version", "Treat compiler input as Scala source for the specified version, see SI-8126.", initial = ScalaVersion("2.11"))
139+
val source = ScalaVersionSetting ("-Xsource", "version", "Treat compiler input as Scala source for the specified version, see SI-8126.", initial = ScalaVersion("2.12"))
140140

141141
val XnoPatmatAnalysis = BooleanSetting ("-Xno-patmat-analysis", "Don't perform exhaustivity/unreachability analysis. Also, ignore @switch annotation.")
142142
val XfullLubs = BooleanSetting ("-Xfull-lubs", "Retains pre 2.10 behavior of less aggressive truncation of least upper bounds.")
@@ -388,6 +388,23 @@ trait ScalaSettings extends AbsScalaSettings
388388
val Normal = "normal"
389389
val Discard = "discard"
390390
}
391+
392+
def conflictWarning: Option[String] = {
393+
def oldOptimiseFlagsInGenBCode: Option[String] = {
394+
val optFlags: List[Setting] = if (optimise.value) List(optimise) else optimiseSettings.filter(_.value)
395+
if (isBCodeActive && optFlags.nonEmpty) {
396+
val msg = s"""Compiler settings for the 2.11 optimizer (${optFlags.map(_.name).mkString(", ")}) are incompatible with -Ybackend:GenBCode (which is the default in 2.12).
397+
|The optimizer settings are ignored. See -Yopt:help for enabling the new optimizer in 2.12.""".stripMargin
398+
Some(msg)
399+
} else
400+
None
401+
}
402+
403+
List(oldOptimiseFlagsInGenBCode /*, moreToCome */).flatten match {
404+
case Nil => None
405+
case warnings => Some("Conflicting compiler settings were detected. Some settings will be ignored.\n" + warnings.mkString("\n"))
406+
}
407+
}
391408
}
392409

393410
object ClassPathRepresentationType {
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
warning: Conflicting compiler settings were detected. Some settings will be ignored.
2+
Compiler settings for the 2.11 optimizer (-optimise) are incompatible with -Ybackend:GenBCode (which is the default in 2.12).
3+
The optimizer settings are ignored. See -Yopt:help for enabling the new optimizer in 2.12.
4+
error: No warnings can be incurred under -Xfatal-warnings.
5+
one warning found
6+
one error found
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-optimise -Ybackend:GenBCode -Xfatal-warnings
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
class C

test/files/neg/sealed-final-neg.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Xfatal-warnings -Yinline-warnings -optimise
1+
-Xfatal-warnings -Ybackend:GenASM -Yinline-warnings -optimise

test/files/neg/t4425.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/files/neg/t5639b.flags

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Xsource:2.11
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise -Xfatal-warnings -Yinline-warnings
1+
-optimise -Ybackend:GenASM -Xfatal-warnings -Yinline-warnings

test/files/pos/inliner2.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise -Xfatal-warnings
1+
-optimise -Ybackend:GenASM -Xfatal-warnings

test/files/pos/sealed-final.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Xfatal-warnings -Yinline-warnings -optimise
1+
-Xfatal-warnings -Yinline-warnings -Ybackend:GenASM -optimise

test/files/pos/t3420.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise -Xfatal-warnings
1+
-optimise -Ybackend:GenASM -Xfatal-warnings

test/files/pos/t8410.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise -Xfatal-warnings -deprecation:false -Yinline-warnings:false
1+
-optimise -Ybackend:GenASM -Xfatal-warnings -deprecation:false -Yinline-warnings:false

test/files/presentation/t7678/Runner.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
* filter: inliner warnings; re-run with
3+
*/
14
import scala.tools.nsc.interactive.tests._
25
import scala.reflect.internal.util._
36

test/files/run/blame_eye_triple_eee-double.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/files/run/blame_eye_triple_eee-float.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/files/run/classfile-format-51.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import Opcodes._
1616
// verify. So the test includes a version check that short-circuites the whole test
1717
// on JDK 6
1818
object Test extends DirectTest {
19-
override def extraSettings: String = "-optimise -usejavacp -d " + testOutput.path + " -cp " + testOutput.path
19+
override def extraSettings: String = "-Yopt:l:classpath -usejavacp -d " + testOutput.path + " -cp " + testOutput.path
2020

2121
def generateClass() {
2222
val invokerClassName = "DynamicInvoker"

test/files/run/classfile-format-52.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import Opcodes._
1313
// By its nature the test can only work on JDK 8+ because under JDK 7- the
1414
// interface won't verify.
1515
object Test extends DirectTest {
16-
override def extraSettings: String = "-optimise -usejavacp -d " + testOutput.path + " -cp " + testOutput.path
16+
override def extraSettings: String = "-Yopt:l:classpath -usejavacp -d " + testOutput.path + " -cp " + testOutput.path
1717

1818
def generateInterface() {
1919
val interfaceName = "HasDefaultMethod"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise
1+
-optimise -Ybackend:GenASM
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimize
1+
-optimize -Ybackend:GenASM

test/files/run/elidable-opt.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise -Xelide-below 900
1+
-optimise -Ybackend:GenASM -Xelide-below 900

test/files/run/elidable-opt.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
/*
2+
* filter: inliner warnings; re-run with
3+
*/
14
import annotation._
25
import elidable._
36

test/files/run/finalvar.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-Yoverride-vars -Yinline
1+
-Yoverride-vars -Yinline -Ybackend:GenASM

test/files/run/icode-reader-dead-code.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ object Test extends DirectTest {
3636

3737
// If inlining fails, the compiler will issue an inliner warning that is not present in the
3838
// check file
39-
compileString(newCompiler("-usejavacp", "-optimise"))(bCode)
39+
compileString(newCompiler("-usejavacp", "-optimise", "-Ybackend:GenASM"))(bCode)
4040
}
4141

4242
def readClass(file: String) = {

test/files/run/macroPlugins-namerHooks.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ enterStat(<synthetic> val C$1: C = x$1.asInstanceOf[C])
2828
enterSym(def <init>() = { super.<init>(); () })
2929
enterSym(final override <synthetic> def toString() = "C")
3030
enterSym(case <synthetic> def apply(x: Int, y: Int): C = new C(x, y))
31-
enterSym(case <synthetic> def unapply(x$0: C) = if (x$0.==(null)) scala.this.None else Some(scala.Tuple2(x$0.x, x$0.y)))
31+
enterSym(case <synthetic> def unapply(x$0: C): _root_.scala.Option[scala.Tuple2[Int, Int]] = if (x$0.==(null)) scala.this.None else Some(scala.Tuple2(x$0.x, x$0.y)))
3232
enterStat(def <init>() = { super.<init>(); () })
3333
enterStat(final override <synthetic> def toString() = "C")
3434
enterSym(def <init>() = { super.<init>(); () })
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimise
1+
-optimise -Ybackend:GenASM

test/files/run/run-bug4840.flags

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/files/run/synchronized.flags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
-optimize
1+
-optimize -Ybackend:GenASM

0 commit comments

Comments
 (0)