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.

Linear Supertypes
TranslationPhase[(SourceListing, Set[String]), SourceListing], ((SourceListing, Set[String])) => Result[SourceListing], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnusedVarRemove
  2. TranslationPhase
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def andThen[V](other: TranslationPhase[SourceListing, V]): TranslationPhase[(SourceListing, Set[String]), V]
    Definition Classes
    TranslationPhase
  5. def andThen[A](g: (Result[SourceListing]) => A): ((SourceListing, Set[String])) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  6. def apply(spec: (SourceListing, Set[String])): Result[SourceListing]
    Definition Classes
    TranslationPhase → Function1
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def compose[A](g: (A) => (SourceListing, Set[String])): (A) => Result[SourceListing]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  20. 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
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  23. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from TranslationPhase[(SourceListing, Set[String]), SourceListing]

Inherited from ((SourceListing, Set[String])) => Result[SourceListing]

Inherited from AnyRef

Inherited from Any

Ungrouped