dotty.tools.dotc.transform.localopt

Members list

Type members

Classlikes

class DropForMap extends MiniPhase

Drop unused trailing map calls in for comprehensions. We can drop the map call if:

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
class MiniPhase
class Phase
class Object
trait Matchable
class Any
object DropForMap

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
DropForMap.type

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

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
class MiniPhase
class Phase
class Object
trait Matchable
class Any

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class TypedFormatChecker(partsElems: List[Tree], parts: List[String], args: List[Tree])(using x$4: Context)

Formatter string checker.

Formatter string checker.

Attributes

Supertypes
class Object
trait Matchable
class Any