Packages

sealed trait TACode[P <: AnyRef, V <: Var[V]] extends Attribute with CodeSequence[Stmt[V]]

Contains the 3-address code (like) representation of a method.

OPAL offers multiple 3-address code like representations. One that is a one-to-one conversion of the bytecode and which does not provide higher-level information. Additionally, the (Base)TACAI represtation is offered that is targeted towards static analyses. The base TACAI representation does not preserve all information which would be required to regenerate the original code, but which greatly facilitates static analysis by making the end-to-end def-use chains directly available.

V

The type of Vars used by the underlying code. Given that the stmts array is conceptually immutable - i.e., no client is allowed to change it(!) - the type V is actually co-variant, but we cannot express this.

Source
TACode.scala
Linear Supertypes
CodeSequence[Stmt[V]], Attribute, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TACode
  2. CodeSequence
  3. Attribute
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def cfg: CFG[Stmt[V], TACStmts[V]]
  2. abstract def exceptionHandlers: ExceptionHandlers
  3. abstract def params: Parameters[P]

    The variables which store the method's explicit and implicit (this in case of an instance method) parameters.

    The variables which store the method's explicit and implicit (this in case of an instance method) parameters. In case of the ai-based representation (TACAI - default representation), the variables are returned which store (the initial) parameters. If these variables are written and we have a loop which includes the very first instruction, the value will reflect this usage. In case of the naive representation it "just" contains the names of the registers which store the parameters.

  4. abstract def pcToIndex: Array[Int]

    The mapping between the pcs of the original bytecode instructions to the index of the first statement that was generated for the bytecode instruction - if any.

    The mapping between the pcs of the original bytecode instructions to the index of the first statement that was generated for the bytecode instruction - if any. For details see TACNaive and TACAI.

  5. abstract def stmts: Array[Stmt[V]]

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. final def equals(other: Any): Boolean
    Definition Classes
    TACode → AnyRef → Any
  8. def firstLineNumber(code: Code): Option[Int]
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final lazy val hashCode: Int
    Definition Classes
    TACode → AnyRef → Any
  11. def instructions: Array[Stmt[V]]
    Definition Classes
    TACodeCodeSequence
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def kindId: Int

    Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable, ...)

    Returns the unique ID that identifies this kind of attribute (Signature, LineNumberTable, ...)

    This id can then be used in a switch statement to efficiently identify the attribute.

    (attribute.id : @scala.annotation.switch) match {
         case Signature.Id => ...
    }

    Associating Unique Id

    The unique ids are manually associated with the attributes. The attributes use the following IDs:

    • (-1 Unknown Attribute)
    • 1-5 The ConstantValue Attribute
    • 6 The Code Attribute
    • 7 The StackMapTable Attribute
    • 8 The Exceptions Attribute
    • 9 The InnerClasses Attribute
    • 10 The EnclosingMethod Attribute
    • 11 The Synthetic Attribute
    • 12-16 The Signature Attribute
    • 17 The SourceFile Attribute
    • 18 The SourceDebugExtension Attribute
    • 19 The LineNumberTable Attribute
    • 20 The LocalVariableTable Attribute
    • 21 The LocalVariableTypeTable Attribute
    • 22 The Deprecated Attribute
    • 23 The RuntimeVisibleAnnotations Attribute
    • 24 The RuntimeInvisibleAnnotations Attribute
    • 25 The RuntimeVisibleParameterAnnotations Attribute
    • 26 The RuntimeInvisibleParameterAnnotations Attribute
    • 27 The RuntimeVisibleTypeAnnotations Attribute
    • 28 The RuntimeInvisibleTypeAnnotations Attribute
    • 29-41 The AnnotationDefault Attribute
    • 42 The BootstrapMethods Attribute
    • 43 The MethodParameters Attribute
    • 44 The Module Attribute (Java 9)
    • 45 The ModuleMainClass Attribute (Java 9)
    • 46 The ModulePackages Attribute (Java 9)
    • 47 The NestHost Attribute (Java 11)
    • 48 The NestMembers Attribute (Java 11)
    • 49 The Record Attribute (Java 16)
    • 1001 OPAL's VirtualTypeFlag Attribute
    • 1002 OPAL's SynthesizedClassFiles Attribute
    • 1003 OPAL's TACode Attribute (the 3-Address Code)
    Definition Classes
    TACodeAttribute
  14. def lineNumber(code: Code, index: Int): Option[Int]
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  18. def pcOfNextInstruction(pc: Int): Int
    Definition Classes
    TACodeCodeSequence
  19. def pcOfPreviousInstruction(pc: Int): Int

    Returns the pc of the previous instruction which is always the current pc - 1, because the representation is compact.

    Returns the pc of the previous instruction which is always the current pc - 1, because the representation is compact.

    Definition Classes
    TACodeCodeSequence
  20. def properStmtIndexForPC(pc: PC): Int

    Gives for a bytecode program counter the next index in this TACode that is *not* a CaughtException statement.

  21. def similar(other: Attribute, config: SimilarityTestConfiguration): Boolean

    Returns true if this attribute and the given one are guaranteed to be indistinguishable at runtime.

    Returns true if this attribute and the given one are guaranteed to be indistinguishable at runtime.

    Definition Classes
    TACodeAttribute
    Note

    If this class is implemented as a proper case class, this method can often be implemented by forwarding to the default equals method.

  22. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  23. def toString(taCodeType: String, additionalParameters: String): String
    Attributes
    protected[this]
  24. def toString(): String
    Definition Classes
    AnyRef → Any
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from CodeSequence[Stmt[V]]

Inherited from Attribute

Inherited from AnyRef

Inherited from Any

Ungrouped