Record Class Instruction.Argument.BranchProfile

java.lang.Object
java.lang.Record
com.oracle.truffle.api.bytecode.Instruction.Argument.BranchProfile
Enclosing class:
Instruction.Argument

public static record Instruction.Argument.BranchProfile(int index, int trueCount, int falseCount) extends Record
Represents a branch profile.
Since:
24.2
  • Constructor Summary

    Constructors
    Constructor
    Description
    BranchProfile(int index, int trueCount, int falseCount)
    Creates an instance of a BranchProfile record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    int
    Returns the value of the falseCount record component.
    double
    Returns the frequency recorded by this profile.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the index record component.
    int
    Returns the value of the trueCount record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • BranchProfile

      public BranchProfile(int index, int trueCount, int falseCount)
      Creates an instance of a BranchProfile record class.
      Parameters:
      index - the value for the index record component
      trueCount - the value for the trueCount record component
      falseCount - the value for the falseCount record component
  • Method Details

    • getFrequency

      public double getFrequency()
      Returns the frequency recorded by this profile.
      Since:
      24.2
    • toString

      public String toString()
      Specified by:
      toString in class Record
      Since:
      24.2
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • index

      public int index()
      Returns the value of the index record component.
      Returns:
      the value of the index record component
    • trueCount

      public int trueCount()
      Returns the value of the trueCount record component.
      Returns:
      the value of the trueCount record component
    • falseCount

      public int falseCount()
      Returns the value of the falseCount record component.
      Returns:
      the value of the falseCount record component