diff options
author | Martin Odersky <odersky@gmail.com> | 2012-08-18 11:02:06 +0200 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-08-20 08:11:11 +0100 |
commit | bc4e1442b4f7942ffb64bdcc15ce93600611576b (patch) | |
tree | d1fecac3eeb4877f254003e8db66c446faf1acfc /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | |
parent | d7b73d439249cdac7b4c6c0624b18da40abdd580 (diff) | |
download | scala-bc4e1442b4f7942ffb64bdcc15ce93600611576b.tar.gz scala-bc4e1442b4f7942ffb64bdcc15ce93600611576b.tar.bz2 scala-bc4e1442b4f7942ffb64bdcc15ce93600611576b.zip |
Reverted closure hoisting except for functions returning a Boolean result
If our theory wrt map is correct (i.e. that it gets inlined by JVM), then closure hoisting is counter-productive because it migh well prevent the closure from being inlined. This commit removes all hoisted closures that are passed to map and leaves only those boolean closures that are passed to exists and forall.
I should have split the early optimizations including closures into separate commits. As that train has left, I am now reverting some bits to see whether the reverts affect performance at all, and in what direction.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/RefChecks.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/RefChecks.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala index f87ca4997d..9201981635 100644 --- a/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala +++ b/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala @@ -1677,7 +1677,7 @@ abstract class RefChecks extends InfoTransform with reflect.internal.transform.R tree case TypeApply(fn, args) => - checkBounds(tree, NoPrefix, NoSymbol, fn.tpe.typeParams, args map tpeOfTree) + checkBounds(tree, NoPrefix, NoSymbol, fn.tpe.typeParams, args map (_.tpe)) transformCaseApply(tree, ()) case x @ Apply(_, _) => |