dotty.tools.dotc.transform.localopt
Members list
Type members
Classlikes
class DropForMap extends MiniPhase
Drop unused trailing map calls in for comprehensions.
Drop unused trailing map calls in for comprehensions.
We can drop the map call if:
- it won't change the type of the expression, and
- the function is an identity function or a const function to unit.
The latter condition is checked in Desugar.scala#makeFor
Attributes
- Companion
- object
- Supertypes
object DropForMap
Attributes
- Companion
- class
- Supertypes
- Self type
-
DropForMap.type
class StringInterpolatorOpt extends MiniPhase
MiniPhase to transform s and raw string interpolators from using StringContext to string concatenation. Since string concatenation uses the Java String builder, we get a performance improvement in terms of these two interpolators.
MiniPhase to transform s and raw string interpolators from using StringContext to string concatenation. Since string concatenation uses the Java String builder, we get a performance improvement in terms of these two interpolators.
More info here: https://medium.com/@dkomanov/scala-string-interpolation-performance-21dc85e83afd
Attributes
- Companion
- object
- Supertypes
object StringInterpolatorOpt
Attributes
- Companion
- class
- Supertypes
- Self type
In this article