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
ConstructorsConstructorDescriptionBranchProfile(int index, int trueCount, int falseCount) Creates an instance of aBranchProfilerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.intReturns the value of thefalseCountrecord component.doubleReturns the frequency recorded by this profile.final inthashCode()Returns a hash code value for this object.intindex()Returns the value of theindexrecord component.toString()intReturns the value of thetrueCountrecord component.
-
Constructor Details
-
BranchProfile
public BranchProfile(int index, int trueCount, int falseCount) Creates an instance of aBranchProfilerecord class.- Parameters:
index- the value for theindexrecord componenttrueCount- the value for thetrueCountrecord componentfalseCount- the value for thefalseCountrecord component
-
-
Method Details
-
getFrequency
public double getFrequency()Returns the frequency recorded by this profile.- Since:
- 24.2
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
index
public int index()Returns the value of theindexrecord component.- Returns:
- the value of the
indexrecord component
-
trueCount
public int trueCount()Returns the value of thetrueCountrecord component.- Returns:
- the value of the
trueCountrecord component
-
falseCount
public int falseCount()Returns the value of thefalseCountrecord component.- Returns:
- the value of the
falseCountrecord component
-