Skip to content

Commit

Permalink
Optimization in Uncurry
Browse files Browse the repository at this point in the history
Only perform HashMap lookup of a tree until after checking more
cheaply if it refers to a symbol with by-name parameter type.
  • Loading branch information
retronym committed Jan 31, 2014
1 parent 811e423 commit 86bc324
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/compiler/scala/tools/nsc/transform/UnCurry.scala
Expand Up @@ -105,12 +105,11 @@ abstract class UnCurry extends InfoTransform
*/
def isByNameRef(tree: Tree) = (
tree.isTerm
&& !byNameArgs(tree)
&& (tree.symbol ne null)
&& (isByName(tree.symbol))
&& !byNameArgs(tree)
)


// ------- Handling non-local returns -------------------------------------------------

/** The type of a non-local return expression with given argument type */
Expand Down

0 comments on commit 86bc324

Please sign in to comment.