scala.tools.nsc.backend.icode.Linearizers

MSILLinearizer

class MSILLinearizer extends Linearizer

The MSIL linearizer is used only for methods with at least one exception handler. It makes sure that all the blocks belonging to a try, catch or finally block are emitted in an order that allows the lexical nesting of try-catch-finally, just like in the source code.

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

Instance Constructors

  1. new MSILLinearizer()

Value Members

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

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

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

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

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

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

    Definition Classes
    AnyRef → Any
  12. def groupBlocks(method: IMethod, blocks: List[BasicBlock], handlers: List[ExceptionHandler], frozen: HashSet[BasicBlock]): List[BasicBlock]

    handlers

    a list of handlers covering the same blocks (same try, multiple catches)

    frozen

    blocks can't be moved (fist block of a method, blocks directly following a try-catch)

  13. def hashCode(): Int

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

    Definition Classes
    Any
  15. def linearize(m: IMethod): List[BasicBlock]

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

    Definition Classes
    MSILLinearizerLinearizer
  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. val normalLinearizer: NormalLinearizer

    The MSIL linearizer first calls a NormalLInearizer.

    The MSIL linearizer first calls a NormalLInearizer. This is because the ILGenerator checks the stack size before emitting instructions. For instance, to emit a store, there needs to be some value on the stack. This can blow up in situations like this: ... jump 3 4: store_local 0 jump 5 3: load_value jump 4 5: ... here, 3 must be scheduled first.

    The NormalLinearizer also removes dead blocks (blocks without predecessor). This is important in the following example: try { throw new Exception } catch { case e => throw e } which adds a dead block containing just a "throw" (which, again, would blow up code generation because of the stack size; there's no value on the stack when emitting that throw)

  19. final def notify(): Unit

    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

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

    Definition Classes
    AnyRef
  22. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from Linearizer

Inherited from AnyRef

Inherited from Any