diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-01 13:04:14 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2014-02-01 09:52:38 +0100 |
commit | 1623c62b67efeb1dc87825731b88a0294a3c3488 (patch) | |
tree | b8886eefcff2f0370640b36b7391f858dd928e09 | |
parent | d607009532ccb1fcbf91ceca6021f4e09d61672f (diff) | |
download | scala-1623c62b67efeb1dc87825731b88a0294a3c3488.tar.gz scala-1623c62b67efeb1dc87825731b88a0294a3c3488.tar.bz2 scala-1623c62b67efeb1dc87825731b88a0294a3c3488.zip |
Optimization in InstantiateDependentMap
Avoid creating a throwaway array in existentialsNeeded.
-rw-r--r-- | src/reflect/scala/reflect/internal/tpe/TypeMaps.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala b/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala index 09f4389b82..f427813c01 100644 --- a/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala +++ b/src/reflect/scala/reflect/internal/tpe/TypeMaps.scala @@ -861,7 +861,7 @@ private[internal] trait TypeMaps { class InstantiateDependentMap(params: List[Symbol], actuals0: List[Type]) extends TypeMap with KeepOnlyTypeConstraints { private val actuals = actuals0.toIndexedSeq private val existentials = new Array[Symbol](actuals.size) - def existentialsNeeded: List[Symbol] = existentials.filter(_ ne null).toList + def existentialsNeeded: List[Symbol] = existentials.iterator.filter(_ ne null).toList private object StableArg { def unapply(param: Symbol) = Arg unapply param map actuals filter (tp => |