scala.tools.nsc.backend.icode.Linearizers

NormalLinearizer

class NormalLinearizer extends Linearizer with WorklistAlgorithm

A simple linearizer which predicts all branches to take the 'success' branch and tries to schedule those blocks immediately after the test. This is in sync with how 'while' statements are translated (if the test is 'true', the loop continues).

Source
Linearizers.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. NormalLinearizer
  2. WorklistAlgorithm
  3. Linearizer
  4. AnyRef
  5. Any
Visibility
  1. Public
  2. All

Instance Constructors

  1. new NormalLinearizer ()

Type Members

  1. type Elem = BasicBlock

    Definition Classes
    NormalLinearizerWorklistAlgorithm
  2. type WList = Stack[Elem]

    Definition Classes
    WorklistAlgorithm

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 add (bs: List[BasicBlock]): Unit

  7. def add (b: BasicBlock): Unit

    Prepend b to the list, if not already scheduled.

    Prepend b to the list, if not already scheduled. TODO: use better test than linear search

  8. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  9. var blocks : List[BasicBlock]

  10. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  11. def dequeue : Elem

    Remove and return the first element to be processed from the worklist.

    Remove and return the first element to be processed from the worklist.

    Definition Classes
    NormalLinearizerWorklistAlgorithm
  12. def eq (arg0: AnyRef): Boolean

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  18. def linearize (startBlock: BasicBlock): List[BasicBlock]

    Linearize another subtree and append it to the existing blocks.

  19. def linearize (m: IMethod): List[BasicBlock]

    Definition Classes
    NormalLinearizerLinearizer
  20. def linearizeAt (m: IMethod, start: BasicBlock): List[BasicBlock]

    Definition Classes
    NormalLinearizerLinearizer
  21. def ne (arg0: AnyRef): Boolean

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

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

    Attributes
    final
    Definition Classes
    AnyRef
  24. def processElement (b: BasicBlock): Unit

    Process the current element from the worklist.

    Process the current element from the worklist.

    Definition Classes
    NormalLinearizerWorklistAlgorithm
  25. def run (initWorklist: ⇒ Unit): Unit

    Run the iterative algorithm until the worklist remains empty.

    Run the iterative algorithm until the worklist remains empty. The initializer is run once before the loop starts and should initialize the worklist.

    initWorklist

    ...

    Definition Classes
    WorklistAlgorithm
  26. def synchronized [T0] (arg0: ⇒ T0): T0

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

    Definition Classes
    AnyRef → Any
  28. def wait (): Unit

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. val worklist : WList

    Definition Classes
    NormalLinearizerWorklistAlgorithm

Inherited from WorklistAlgorithm

Inherited from Linearizer

Inherited from AnyRef

Inherited from Any