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 aBranchProfile
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.int
Returns the value of thefalseCount
record component.double
Returns the frequency recorded by this profile.final int
hashCode()
Returns a hash code value for this object.int
index()
Returns the value of theindex
record component.toString()
int
Returns the value of thetrueCount
record component.
-
Constructor Details
-
BranchProfile
public BranchProfile(int index, int trueCount, int falseCount) Creates an instance of aBranchProfile
record class.- Parameters:
index
- the value for theindex
record componenttrueCount
- the value for thetrueCount
record componentfalseCount
- the value for thefalseCount
record 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 thecompare
method from their corresponding wrapper classes. -
index
public int index()Returns the value of theindex
record component.- Returns:
- the value of the
index
record component
-
trueCount
public int trueCount()Returns the value of thetrueCount
record component.- Returns:
- the value of the
trueCount
record component
-
falseCount
public int falseCount()Returns the value of thefalseCount
record component.- Returns:
- the value of the
falseCount
record component
-