@@ -1500,8 +1500,7 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
15001500
15011501 /** Compile list of source files */
15021502 def compileSources (_sources : List [SourceFile ]) {
1503- val depSources = dependencyAnalysis calculateFiles _sources.distinct
1504- val sources = coreClassesFirst(depSources)
1503+ val sources = dependencyAnalysis calculateFiles _sources.distinct
15051504 // there is a problem already, e.g. a plugin was passed a bad option
15061505 if (reporter.hasErrors)
15071506 return
@@ -1661,46 +1660,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter)
16611660 }
16621661 if (! pclazz.isRoot) resetPackageClass(pclazz.owner)
16631662 }
1664-
1665- /**
1666- * Re-orders the source files to
1667- * 1. This Space Intentionally Left Blank
1668- * 2. LowPriorityImplicits / EmbeddedControls (i.e. parents of Predef)
1669- * 3. the rest
1670- *
1671- * 1 is to avoid cyclic reference errors.
1672- * 2 is due to the following. When completing "Predef" (*), typedIdent is called
1673- * for its parents (e.g. "LowPriorityImplicits"). typedIdent checks whether
1674- * the symbol reallyExists, which tests if the type of the symbol after running
1675- * its completer is != NoType.
1676- * If the "namer" phase has not yet run for "LowPriorityImplicits", the symbol
1677- * has a SourcefileLoader as type. Calling "doComplete" on it does nothing at
1678- * all, because the source file is part of the files to be compiled anyway.
1679- * So the "reallyExists" test will return "false".
1680- * Only after the namer, the symbol has a lazy type which actually computes
1681- * the info, and "reallyExists" behaves as expected.
1682- * So we need to make sure that the "namer" phase is run on predef's parents
1683- * before running it on predef.
1684- *
1685- * (*) Predef is completed early when calling "mkAttributedRef" during the
1686- * addition of "import Predef._" to sourcefiles. So this situation can't
1687- * happen for user classes.
1688- *
1689- */
1690- private def coreClassesFirst (files : List [SourceFile ]) = {
1691- val goLast = 4
1692- def rank (f : SourceFile ) = {
1693- if (f.file.container.name != " scala" ) goLast
1694- else f.file.name match {
1695- case " LowPriorityImplicits.scala" => 2
1696- case " StandardEmbeddings.scala" => 2
1697- case " EmbeddedControls.scala" => 2
1698- case " Predef.scala" => 3 /* Predef.scala before Any.scala, etc. */
1699- case _ => goLast
1700- }
1701- }
1702- files sortBy rank
1703- }
17041663 } // class Run
17051664
17061665 def printAllUnits () {
0 commit comments