object UnusedVarRemove extends TranslationPhase[(SourceListing, Set[String]), SourceListing]
This class is used for removing unused variable declarations from the code. Therefore it first creates a map indicating which variable is used where and afterwards removes all variables which are not used in any expression. This phase is especially important since it also removes variables which are not used anymore since their usage was inlined due to lazy usage. Not removing them would probably cause errors because the evaluation of the expression is not possible.
- Alphabetic
- By Inheritance
- UnusedVarRemove
- TranslationPhase
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[V](other: TranslationPhase[SourceListing, V]): TranslationPhase[(SourceListing, Set[String]), V]
- Definition Classes
- TranslationPhase
- def andThen[A](g: (Result[SourceListing]) => A): ((SourceListing, Set[String])) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(spec: (SourceListing, Set[String])): Result[SourceListing]
- Definition Classes
- TranslationPhase → Function1
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def compose[A](g: (A) => (SourceListing, Set[String])): (A) => Result[SourceListing]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- def translate(extSource: (SourceListing, Set[String])): Result[SourceListing]
Function triggering the translation from a SourceListing to a SourceListing without unused variables
Function triggering the translation from a SourceListing to a SourceListing without unused variables
- extSource
The input source listing and a set of variables which are not removed even if they are unused
- returns
A source listing without unused variables
- Definition Classes
- UnusedVarRemove → TranslationPhase
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated