Skip to content

Commit 6569812

Browse files
committed
Polishings
1 parent fc6c2af commit 6569812

File tree

6 files changed

+6
-7
lines changed

6 files changed

+6
-7
lines changed

compiler/src/dotty/tools/dotc/Run.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,6 @@ class Run(comp: Compiler, ictx: Context) extends ImplicitRunInfo with Constraint
214214
}
215215
process()(runContext.fresh.setCompilationUnit(unit))
216216
}
217-
else None
218217

219218
private sealed trait PrintedTree
220219
private /*final*/ case class SomePrintedTree(phase: String, tree: String) extends PrintedTree

compiler/src/dotty/tools/dotc/ast/tpd.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -873,7 +873,7 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
873873
def tpes: List[Type] = xs map (_.tpe)
874874
}
875875

876-
/** A trait for loaders that compute trees. Common base trait for DottyUnpickler and SymbolLoader */
876+
/** A trait for loaders that compute trees. Currently implemented just by DottyUnpickler. */
877877
trait TreeProvider {
878878
protected def computeTrees(implicit ctx: Context): List[Tree]
879879

compiler/src/dotty/tools/dotc/config/Config.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ object Config {
160160
final val showCompletions = false
161161

162162
/** If set, enables tracing */
163-
final val tracingEnabled = true
163+
final val tracingEnabled = false
164164

165165
/** Initial capacity of uniques HashMap.
166166
* Note: This MUST BE a power of two to work with util.HashSet

compiler/src/dotty/tools/dotc/core/SymDenotations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1133,7 +1133,7 @@ object SymDenotations {
11331133
/** The primary constructor of a class or trait, NoSymbol if not applicable. */
11341134
def primaryConstructor(implicit ctx: Context): Symbol = NoSymbol
11351135

1136-
/** The current declaration of this symbol's class owner that has the same name
1136+
/** The current declaration in this symbol's class owner that has the same name
11371137
* as this one, and, if there are several, also has the same signature.
11381138
*/
11391139
def currentSymbol(implicit ctx: Context): Symbol = {

compiler/src/dotty/tools/dotc/core/Symbols.scala

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -632,8 +632,9 @@ object Symbols {
632632
*/
633633
def tree(implicit ctx: Context): Tree = treeContaining("")
634634

635-
/** Same as `tree` but load only Tasty tree if the name table of the unpickler
636-
* contains `id`.
635+
/** Same as `tree` but load tree only if `id == ""` or the tree might contain `id`.
636+
* For Tasty trees this means consulting whether the name table defines `id`.
637+
* For already loaded trees, we maintain the referenced ids in an attachment.
637638
*/
638639
def treeContaining(id: String)(implicit ctx: Context): Tree = denot.infoOrCompleter match {
639640
case _: NoCompleter =>

compiler/src/dotty/tools/dotc/interactive/InteractiveDriver.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ class InteractiveDriver(settings: List[String]) extends Driver {
7171
clsd.ensureCompleted()
7272
SourceTree.fromSymbol(clsd.symbol.asClass, id)
7373
case _ =>
74-
//sys.error(s"class not found: $className")
7574
None
7675
}
7776
}

0 commit comments

Comments
 (0)