scala.tools.nsc.backend.icode.GenICode.ICodePhase

DuplicateLabels

class DuplicateLabels extends Transformer

Tree transformer that duplicates code and at the same time creates fresh symbols for existing labels. Since labels may be used before they are defined (forward jumps), all labels found are mapped to fresh symbols. References to the same label (use or definition) will remain consistent after this transformation (both the use and the definition of some label l will be mapped to the same label l').

Note: If the tree fragment passed to the duplicator contains unbound label names, the bind to the outer labeldef will be lost! That's because a use of an unbound label l will be transformed to l', and the corresponding label def, being outside the scope of this transformation, will not be updated.

All LabelDefs are entered into the context label map, since it makes no sense to delay it any more: they will be used at some point.

Source
GenICode.scala
Linear Supertypes
Transformer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. DuplicateLabels
  2. Transformer
  3. AnyRef
  4. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new DuplicateLabels (boundLabels: Set[Symbol])

Value Members

  1. def != (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  2. def != (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  3. def ## (): Int

    Attributes
    final
    Definition Classes
    AnyRef → Any
  4. def == (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  5. def == (arg0: Any): Boolean

    Attributes
    final
    Definition Classes
    Any
  6. def apply (ctx: Context, t: Tree): Tree

  7. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  8. def atOwner [A] (owner: Symbol)(trans: ⇒ A): A

    Definition Classes
    Transformer
  9. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  10. var ctx : Context

  11. def currentClass : Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  12. def currentMethod : Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  13. var currentOwner : Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  14. def currentPackage : Symbol

    Attributes
    protected
    Definition Classes
    Transformer
  15. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  16. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  18. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef → Any
  19. def hashCode (): Int

    Definition Classes
    AnyRef → Any
  20. def isInstanceOf [T0] : Boolean

    Attributes
    final
    Definition Classes
    Any
  21. val labels : Map[Symbol, Symbol]

  22. var method : Symbol

  23. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  24. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  25. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  26. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  27. def toString (): String

    Definition Classes
    AnyRef → Any
  28. def transform (t: Tree): Tree

    Definition Classes
    DuplicateLabelsTransformer
  29. def transformCaseDefs (trees: List[CaseDef]): List[CaseDef]

    Definition Classes
    Transformer
  30. def transformIdents (trees: List[Ident]): List[Ident]

    Definition Classes
    Transformer
  31. def transformModifiers (mods: Modifiers): Modifiers

    Definition Classes
    Transformer
  32. def transformStats (stats: List[Tree], exprOwner: Symbol): List[Tree]

    Definition Classes
    Transformer
  33. def transformTemplate (tree: Template): Template

    Definition Classes
    Transformer
  34. def transformTrees (trees: List[Tree]): List[Tree]

    Definition Classes
    Transformer
  35. def transformTypeDefs (trees: List[TypeDef]): List[TypeDef]

    Definition Classes
    Transformer
  36. def transformUnit (unit: CompilationUnit): Unit

    Definition Classes
    Transformer
  37. def transformValDef (tree: ValDef): ValDef

    Definition Classes
    Transformer
  38. def transformValDefs (trees: List[ValDef]): List[ValDef]

    Definition Classes
    Transformer
  39. def transformValDefss (treess: List[List[ValDef]]): List[List[ValDef]]

    Definition Classes
    Transformer
  40. val treeCopy : TreeCopier

    Definition Classes
    Transformer
  41. def wait (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  42. def wait (arg0: Long, arg1: Int): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  43. def wait (arg0: Long): Unit

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Transformer

Inherited from AnyRef

Inherited from Any