diff options
author | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-26 12:42:12 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@epfl.ch> | 2010-11-26 12:42:12 +0000 |
commit | 088c19a13c799d577736eb37da3dcd9926d59f9b (patch) | |
tree | 50c2ecb28b18c732637dc3371302c4fa5792d84d /src/compiler | |
parent | cf8c15946e70fd0016f22de4811a2d44221ffd13 (diff) | |
download | scala-088c19a13c799d577736eb37da3dcd9926d59f9b.tar.gz scala-088c19a13c799d577736eb37da3dcd9926d59f9b.tar.bz2 scala-088c19a13c799d577736eb37da3dcd9926d59f9b.zip |
I keep forgeting which phase the browser is cur...
I keep forgeting which phase the browser is currently showing, so added
phase name. No review
Diffstat (limited to 'src/compiler')
4 files changed, 8 insertions, 9 deletions
diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index f8dd356937..1829c75b43 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -867,7 +867,7 @@ class Global(var settings: Settings, var reporter: Reporter) extends SymbolTable // browse trees with swing tree viewer if (opt.browsePhase) - treeBrowser browse units + treeBrowser browse (phase.name, units) // progress update informTime(globalPhase.description, startTime) diff --git a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala index 0555f6c035..a5bf1dfd0c 100644 --- a/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala +++ b/src/compiler/scala/tools/nsc/ast/TreeBrowsers.scala @@ -62,18 +62,18 @@ abstract class TreeBrowsers { t } - def browse(units: Iterator[CompilationUnit]): Unit = - browse(units.toList) + def browse(pName: String, units: Iterator[CompilationUnit]): Unit = + browse(pName, units.toList) /** print the whole program */ - def browse(units: List[CompilationUnit]): Unit = { + def browse(pName: String, units: List[CompilationUnit]): Unit = { var unitList: List[UnitTree] = Nil for (i <- units) unitList = UnitTree(i) :: unitList val tm = new ASTTreeModel(ProgramTree(unitList)) - val frame = new BrowserFrame() + val frame = new BrowserFrame(pName) frame.setTreeModel(tm) val lock = new Lock() @@ -131,8 +131,8 @@ abstract class TreeBrowsers { * @author Iulian Dragos * @version 1.0 */ - class BrowserFrame { - val frame = new JFrame("Scala AST") + class BrowserFrame(phaseName: String = "unknown") { + val frame = new JFrame("Scala AST [" + phaseName + "]") val topLeftPane = new JPanel(new BorderLayout()) val topRightPane = new JPanel(new BorderLayout()) val bottomPane = new JPanel(new BorderLayout()) diff --git a/src/compiler/scala/tools/nsc/symtab/Definitions.scala b/src/compiler/scala/tools/nsc/symtab/Definitions.scala index 47cd9bce86..4c7bc32c02 100644 --- a/src/compiler/scala/tools/nsc/symtab/Definitions.scala +++ b/src/compiler/scala/tools/nsc/symtab/Definitions.scala @@ -228,7 +228,6 @@ trait Definitions extends reflect.generic.StandardDefinitions { def Seq_length = getMember(SeqClass, nme.length) lazy val ListModule = getModule2("scala.List", "scala.collection.immutable.List") - def List_apply = getMember(ListModule, nme.apply) lazy val ListClass = getClass2("scala.List", "scala.collection.immutable.List") def List_isEmpty = getMember(ListClass, nme.isEmpty) def List_head = getMember(ListClass, nme.head) diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 47e3686592..0ead1f6eee 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -3335,7 +3335,7 @@ trait Typers { self: Analyzer => // TODO: In theory we should be able to call: //if (fun2.hasSymbol && fun2.symbol.name == nme.apply && fun2.symbol.owner == ArrayClass) { // But this causes cyclic reference for Array class in Cleanup. It is easy to overcome this - // by calling here ArrayClass.info here (or some other place before specialize). + // by calling ArrayClass.info here (or some other place before specialize). if (fun2.symbol == Array_apply) { val checked = gen.mkCheckInit(res) // this check is needed to avoid infinite recursion in Duplicators |