opt - Scala Compiler 2.11.6 - scala.tools.nsc.backend.jvm.opt
Keywords: opt Scala Compiler 2.11.6 scala.tools.nsc.backend.jvm.opt

scala.tools.nsc.backend.jvm

# opt

#### package opt

Visibility

1. Public
2. All

### Type Members

1. #### class ByteCodeRepository extends AnyRef

   The ByteCodeRepository provides utilities to read the bytecode of classfiles from the compilation classpath.

   The ByteCodeRepository provides utilities to read the bytecode of classfiles from the compilation classpath. Parsed classes are cached in the `classes` map.

2. #### class LocalOpt extends AnyRef

   Optimizations within a single method.

   Optimizations within a single method.

   unreachable code

   - removes instructions of basic blocks to which no branch instruction points + enables eliminating some exception handlers and local variable descriptors > eliminating them is required for correctness, as explained in `removeUnreachableCode`

   empty exception handlers

   - removes exception handlers whose try block is empty + eliminating a handler where the try block is empty and reachable will turn the catch block unreachable. in this case "unreachable code" is invoked recursively until reaching a fixpoint. > for try blocks that are unreachable, "unreachable code" removes also the instructions of the catch block, and the recursive invocation is not necessary.

   simplify jumps

   - various simplifications, see doc domments of individual optimizations + changing or eliminating jumps may render some code unreachable, therefore "simplify jumps" is executed in a loop with "unreachable code"

   empty local variable descriptors

   - removes entries from the local variable table where the variable is not actually used + enables eliminating labels that the entry points to (if they are not otherwise referenced)

   empty line numbers

   - eliminates line number nodes that describe no executable instructions + enables eliminating the label of the line number node (if it's not otherwise referenced)

   stale labels

   - eliminate labels that are not referenced, merge sequences of label definitions.

### Value Members

1. #### object ByteCodeRepository

2. #### object BytecodeUtils

### Ungrouped