class VCElideAllocations
extends MiniPhaseTransform with IdentityDenotTransformer

This phase elides unnecessary value class allocations

For a value class V defined as: class V(val underlying: U) extends AnyVal we avoid unnecessary allocations: new V(u1) == new V(u2) => u1 == u2 (new V(u)).underlying() => u

Constructors

VCElideAllocations ( )

Members

[+] override def phaseName : String

A name given to the Phase that can be used to debug the compiler. For instance, it is possible to print trees after a given phase using:

A name given to the Phase that can be used to debug the compiler. For instance, it is possible to print trees after a given phase using:

$ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala
override def runsAfter : Set [ Class [ Nothing <: Phase ] ]

List of names of phases that should precede this phase

List of names of phases that should precede this phase

override def transformApply ( tree: Apply ) ( implicit ctx: Context , info: TransformerInfo ) : Tree