diff options
Diffstat (limited to 'src')
3 files changed, 15 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala index 2593903b9d..7c4c02c2d3 100644 --- a/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala +++ b/src/compiler/scala/tools/nsc/backend/jvm/GenASM.scala @@ -104,12 +104,14 @@ abstract class GenASM extends SubComponent with BytecodeWriters with GenJVMASM { if (settings.debug) inform("[running phase " + name + " on icode]") - if (settings.Xdce) - for ((sym, cls) <- icodes.classes if inliner.isClosureClass(sym) && !deadCode.liveClosures(sym)) { + if (settings.Xdce) { + val classes = icodes.classes.keys.toList // copy to avoid mutating the map while iterating + for (sym <- classes if inliner.isClosureClass(sym) && !deadCode.liveClosures(sym)) { log(s"Optimizer eliminated ${sym.fullNameString}") deadCode.elidedClosures += sym icodes.classes -= sym } + } // For predictably ordered error messages. var sortedClasses = classes.values.toList sortBy (_.symbol.fullName) diff --git a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala index 681204172b..4962d80a8b 100644 --- a/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala +++ b/src/interactive/scala/tools/nsc/interactive/tests/core/TestSettings.scala @@ -4,7 +4,7 @@ import scala.tools.nsc.io.Path /** Common settings for the test. */ private[tests] trait TestSettings { - protected final val TIMEOUT = 10000 // timeout in milliseconds + protected final val TIMEOUT = 30000 // timeout in milliseconds /** The root directory for this test suite, usually the test kind ("test/files/presentation"). */ protected val outDir = Path(Option(System.getProperty("partest.cwd")).getOrElse(".")) diff --git a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala index 8d4c3f752f..5433bfad60 100644 --- a/src/reflect/scala/reflect/internal/pickling/UnPickler.scala +++ b/src/reflect/scala/reflect/internal/pickling/UnPickler.scala @@ -243,8 +243,14 @@ abstract class UnPickler { } getOrElse "") } + def localDummy = { + if (nme.isLocalDummyName(name)) + owner.newLocalDummy(NoPosition) + else NoSymbol + } + // (1) Try name. - fromName(name) orElse { + localDummy orElse fromName(name) orElse { // (2) Try with expanded name. Can happen if references to private // symbols are read from outside: for instance when checking the children // of a class. See #1722. @@ -298,6 +304,7 @@ abstract class UnPickler { * (.) ... * (1) `local child` represents local child classes, see comment in Pickler.putSymbol. * Since it is not a member, it should not be entered in the owner's scope. + * (2) Similarly, we ignore local dummy symbols, as seen in SI-8868 */ def shouldEnterInOwnerScope = { sym.owner.isClass && @@ -307,7 +314,8 @@ abstract class UnPickler { !sym.isRefinementClass && !sym.isTypeParameter && !sym.isExistentiallyBound && - sym.rawname != tpnme.LOCAL_CHILD // (1) + sym.rawname != tpnme.LOCAL_CHILD && // (1) + !nme.isLocalDummyName(sym.rawname) // (2) } markFlagsCompleted(sym)(mask = AllFlags) |