Skip to content

Commit 3a1d7fa

Browse files
committed
Polishings
1 parent 6129cc0 commit 3a1d7fa

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
@@ -1134,7 +1134,7 @@ object SymDenotations {
11341134
/** The primary constructor of a class or trait, NoSymbol if not applicable. */
11351135
def primaryConstructor(implicit ctx: Context): Symbol = NoSymbol
11361136

1137-
/** The current declaration of this symbol's class owner that has the same name
1137+
/** The current declaration in this symbol's class owner that has the same name
11381138
* as this one, and, if there are several, also has the same signature.
11391139
*/
11401140
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
@@ -634,8 +634,9 @@ object Symbols {
634634
*/
635635
def tree(implicit ctx: Context): Tree = treeContaining("")
636636

637-
/** Same as `tree` but load only Tasty tree if the name table of the unpickler
638-
* contains `id`.
637+
/** Same as `tree` but load tree only if `id == ""` or the tree might contain `id`.
638+
* For Tasty trees this means consulting whether the name table defines `id`.
639+
* For already loaded trees, we maintain the referenced ids in an attachment.
639640
*/
640641
def treeContaining(id: String)(implicit ctx: Context): Tree = denot.infoOrCompleter match {
641642
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)