summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2012-08-18 11:02:06 +0200
committerGrzegorz Kossakowski <grzegorz.kossakowski@gmail.com>2012-08-20 08:11:11 +0100
commitbc4e1442b4f7942ffb64bdcc15ce93600611576b (patch)
treed1fecac3eeb4877f254003e8db66c446faf1acfc /src/compiler/scala/tools/nsc/typechecker/RefChecks.scala
parentd7b73d439249cdac7b4c6c0624b18da40abdd580 (diff)
downloadscala-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.scala2
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(_, _) =>