diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-06 22:42:20 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-01-31 22:16:27 +0100 |
commit | 86bc3249421cccdd9a9dd6a4b5ad352afbe2a620 (patch) | |
tree | c7a64fdc70e197a04e3304acb35606bb25efd7e9 | |
parent | 811e4232ae6b56a4ec72d5b26f11eb370e924a31 (diff) | |
download | scala-86bc3249421cccdd9a9dd6a4b5ad352afbe2a620.tar.gz scala-86bc3249421cccdd9a9dd6a4b5ad352afbe2a620.tar.bz2 scala-86bc3249421cccdd9a9dd6a4b5ad352afbe2a620.zip |
Optimization in Uncurry
Only perform HashMap lookup of a tree until after checking more
cheaply if it refers to a symbol with by-name parameter type.
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/UnCurry.scala | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala index e193cf3de2..e7ea686bc8 100644 --- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala +++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala @@ -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 */ |