summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/PhaseAssembly.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2009-11-25 16:41:47 +0000
committerPaul Phillips <paulp@improving.org>2009-11-25 16:41:47 +0000
commit7f3922f39ab597c4a4fb87acdfdc6c8eb30c3ba3 (patch)
tree6a8c3d5b63f5866a7b4d913f7296c6fa4f51ebc1 /src/compiler/scala/tools/nsc/PhaseAssembly.scala
parent1f162e940c373007be2d24c36b6f6bfe49cb1486 (diff)
downloadscala-7f3922f39ab597c4a4fb87acdfdc6c8eb30c3ba3.tar.gz
scala-7f3922f39ab597c4a4fb87acdfdc6c8eb30c3ba3.tar.bz2
scala-7f3922f39ab597c4a4fb87acdfdc6c8eb30c3ba3.zip
Updating deprecated usages in new scaladoc code.
as inspiration to chase down a few spots using get and getOrElse in suboptimal fashion.
Diffstat (limited to 'src/compiler/scala/tools/nsc/PhaseAssembly.scala')
-rw-r--r--src/compiler/scala/tools/nsc/PhaseAssembly.scala9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/compiler/scala/tools/nsc/PhaseAssembly.scala b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
index 958bef5652..ab0b2cd26e 100644
--- a/src/compiler/scala/tools/nsc/PhaseAssembly.scala
+++ b/src/compiler/scala/tools/nsc/PhaseAssembly.scala
@@ -66,13 +66,8 @@ trait PhaseAssembly { self: Global =>
/* Given the name of a phase object, get the node for that name. If the
* node object does not exits, then create it.
*/
- def getNodeByPhase(name: String): Node = {
- nodes.get(name).getOrElse {
- val node = new Node(name)
- nodes += (name -> node)
- node
- }
- }
+ def getNodeByPhase(name: String): Node =
+ nodes.getOrElseUpdate(name, new Node(name))
/* Connect the frm and to nodes with an edge and make it soft.
* Also add the edge object to the set of edges, and to the dependency