diff options
author | Lukas Rytz <lukas.rytz@gmail.com> | 2016-01-22 22:33:29 +0100 |
---|---|---|
committer | Lukas Rytz <lukas.rytz@gmail.com> | 2016-01-23 07:26:13 +0100 |
commit | 8d3be4dc79cb4679fc4994c32b21e10847e5518f (patch) | |
tree | 526242bc68fd901933a961dc14e55633129fb65d /src/compiler/scala/tools/nsc/transform/LambdaLift.scala | |
parent | 7443037a6d1376709b3d83f10e66c9155f76dbaa (diff) | |
download | scala-8d3be4dc79cb4679fc4994c32b21e10847e5518f.tar.gz scala-8d3be4dc79cb4679fc4994c32b21e10847e5518f.tar.bz2 scala-8d3be4dc79cb4679fc4994c32b21e10847e5518f.zip |
Harden methods to recognize method invocations to optimize
The previous methods to identify method invocations that can be
optimized, such as `isPredefAutoBox`, were String-based. Now we
obtain class and method signatures from symbols through the
BTypes infrastructure.
We also piggy-back on specialization's type transformer to create
all specialized subclasses of Tuple1/Tuple2. We'll do the same in
the future for FunctionN, but the current JFunctionN are written
in Java and specialized artisanally.
Diffstat (limited to 'src/compiler/scala/tools/nsc/transform/LambdaLift.scala')
-rw-r--r-- | src/compiler/scala/tools/nsc/transform/LambdaLift.scala | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala index d1be1558b9..43f698d7ba 100644 --- a/src/compiler/scala/tools/nsc/transform/LambdaLift.scala +++ b/src/compiler/scala/tools/nsc/transform/LambdaLift.scala @@ -31,11 +31,6 @@ abstract class LambdaLift extends InfoTransform { } } - /** scala.runtime.*Ref classes */ - private lazy val allRefClasses: Set[Symbol] = { - refClass.values.toSet ++ volatileRefClass.values.toSet ++ Set(VolatileObjectRefClass, ObjectRefClass) - } - /** Each scala.runtime.*Ref class has a static method `create(value)` that simply instantiates the Ref to carry that value. */ private lazy val refCreateMethod: Map[Symbol, Symbol] = { mapFrom(allRefClasses.toList)(x => getMemberMethod(x.companionModule, nme.create)) |