Package

scala.tools.nsc.backend.jvm

analysis

Permalink

package analysis

Content Hierarchy
Visibility
  1. Public
  2. All

Type Members

  1. class AliasingAnalyzer[V <: Value] extends Analyzer[V]

    Permalink

    An analyzer that uses AliasingFrames instead of bare Frames.

    An analyzer that uses AliasingFrames instead of bare Frames. This can be used when an analysis needs to track aliases, but doesn't require a more specific Frame subclass.

  2. class AliasingFrame[V <: Value] extends Frame[V]

    Permalink
  3. case class ExceptionProducer(handlerFrame: Frame[_ <: Value]) extends InitialProducer with Product with Serializable

    Permalink
  4. abstract class InitialProducer extends AbstractInsnNode

    Permalink

    A class for pseudo-instructions representing the initial producers of local values that have no producer instruction in the method:

    A class for pseudo-instructions representing the initial producers of local values that have no producer instruction in the method:

    • parameters, including this
    • uninitialized local variables
    • exception values in handlers

    The ASM built-in SourceValue analysis yields an empty producers set for such values. This leads to ambiguities. Example (in Java one can re-assign parameter):

    void foo(int a) { if (a == 0) a = 1; return a; }

    In the first frame of the method, the SoruceValue for parameter a gives an empty set of producer instructions.

    In the frame of the IRETURN instruction, the SoruceValue for parameter a lists a single producer instruction: the ISTORE 1. This makes it look as if there was a single producer for a, where in fact it might still hold the parameter's initial value.

  5. class InitialProducerSourceInterpreter extends SourceInterpreter

    Permalink
  6. sealed trait Nullness extends AnyRef

    Permalink

    Type to represent nullness of values.

  7. class NullnessAnalyzer extends Analyzer[NullnessValue]

    Permalink

    This class is required to override the newFrame methods, which makes makes sure the analyzer uses NullnessFrames.

  8. class NullnessFrame extends AliasingFrame[NullnessValue]

    Permalink
  9. final class NullnessInterpreter extends Interpreter[NullnessValue]

    Permalink
  10. sealed trait NullnessValue extends Value

    Permalink

    Represents the nullness state for a local variable or stack value.

    Represents the nullness state for a local variable or stack value.

    Note that nullness of primitive values is not tracked, it will be always Unknown.

  11. case class ParameterProducer(local: Int) extends InitialProducer with Product with Serializable

    Permalink
  12. class ProdConsAnalyzer extends AnyRef

    Permalink

    This class provides additional queries over ASM's built-in SourceValue analysis.

    This class provides additional queries over ASM's built-in SourceValue analysis.

    The analysis computes for each value in a frame a set of source instructions, which are the potential producers. Most instructions produce either nothing or a stack value. For example, a LOAD instruction is the producer of the value pushed onto the stack. The exception are STORE instructions, which produce a new value for a local variable slot, so they are used as producers for the value they stored.

    Note that pseudo-instructions are used as initial producers for parameters and local variables. See the documentation on class InitialProducer.

    This class implements the following queries over the data computed by the SourceValue analysis:

    • producersForValueAt(insn, slot)
    • consumersOfValueAt(insn, slot)
    • producersForInputsOf(insn)
    • consumersOfOutputsFrom(insn)
    • initialProducersForValueAt(insn, slot)
    • ultimateConsumersOfValueAt(insn, slot)
    • initialProducersForInputsOf(insn)
    • ultimateConsumersOfOutputsFrom(insn)

    The following operations are considered as copying operations:

    • xLOAD, xSTORE
    • DUP, DUP2, DUP_X1, DUP_X2, DUP2_X1, DUP2_X2
    • SWAP
    • CHECKCAST

    If ever needed, we could introduce a mode where primitive conversions (l2i) are considered as copying operations.

  13. case class UninitializedLocalProducer(local: Int) extends InitialProducer with Product with Serializable

    Permalink

Value Members

  1. object AliasingFrame

    Permalink
  2. object InstructionStackEffect

    Permalink
  3. object NotNull extends Nullness with Product with Serializable

    Permalink
  4. object NotNullValue extends NullnessValue

    Permalink
  5. object Null extends Nullness with Product with Serializable

    Permalink
  6. object NullValue extends NullnessValue

    Permalink
  7. object NullnessValue

    Permalink
  8. object ProdConsAnalyzer

    Permalink
  9. object Unknown extends Nullness with Product with Serializable

    Permalink
  10. object UnknownValue1 extends NullnessValue

    Permalink
  11. object UnknownValue2 extends NullnessValue

    Permalink

Ungrouped