summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/transform/UnCurry.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-12-23 03:52:03 -0800
committerPaul Phillips <paulp@improving.org>2011-12-30 23:41:52 -0800
commit82c793a438c7bd802daf96c8b2012f54fbd737ba (patch)
tree3bed6b8cc121a17e54529f312edcf6c2058453c4 /src/compiler/scala/tools/nsc/transform/UnCurry.scala
parent6150b589993fc58817d6d1d2e4326c8ff135a0ea (diff)
downloadscala-82c793a438c7bd802daf96c8b2012f54fbd737ba.tar.gz
scala-82c793a438c7bd802daf96c8b2012f54fbd737ba.tar.bz2
scala-82c793a438c7bd802daf96c8b2012f54fbd737ba.zip
More performance work.
Custom versions of collections which methods which operate on 2 or 3 collections. Eliminated most users of zip/zipped. Cleaned up the kinds checking code somewhat. Reduced the number of silent typechecks being performed at named argument sites.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/UnCurry.scala')
-rw-r--r--src/compiler/scala/tools/nsc/transform/UnCurry.scala8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/UnCurry.scala b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
index 90f46206c5..13516037f5 100644
--- a/src/compiler/scala/tools/nsc/transform/UnCurry.scala
+++ b/src/compiler/scala/tools/nsc/transform/UnCurry.scala
@@ -461,7 +461,7 @@ abstract class UnCurry extends InfoTransform
val args1 = if (isVarArgTypes(formals)) transformVarargs(formals.last.typeArgs.head) else args
- (formals, args1).zipped map { (formal, arg) =>
+ map2(formals, args1) { (formal, arg) =>
if (!isByNameParamType(formal)) {
arg
} else if (isByNameRef(arg)) {
@@ -771,7 +771,7 @@ abstract class UnCurry extends InfoTransform
case p => p.symbol.tpe
}
val forwresult = dd.symbol.tpe.finalResultType
- val forwformsyms = (forwformals, flatparams).zipped map ((tp, oldparam) =>
+ val forwformsyms = map2(forwformals, flatparams)((tp, oldparam) =>
currentClass.newValueParameter(oldparam.symbol.pos, oldparam.name).setInfo(tp)
)
def mono = MethodType(forwformsyms, forwresult)
@@ -789,7 +789,7 @@ abstract class UnCurry extends InfoTransform
// create the tree
val forwtree = theTyper.typedPos(dd.pos) {
- val locals = (forwsym ARGS, flatparams).zipped map {
+ val locals = map2(forwsym ARGS, flatparams) {
case (_, fp) if !rpsymbols(fp.symbol) => null
case (argsym, fp) =>
Block(Nil,
@@ -799,7 +799,7 @@ abstract class UnCurry extends InfoTransform
)
)
}
- val seqargs = (locals, forwsym ARGS).zipped map {
+ val seqargs = map2(locals, forwsym ARGS) {
case (null, argsym) => Ident(argsym)
case (l, _) => l
}