private static final class WeightedCallTargets.SingleTarget extends WeightedCallTargets
WeightedCallTargets.Visitor| Modifier and Type | Field and Description |
|---|---|
private RVMMethod |
target |
private float |
weight |
| Constructor and Description |
|---|
SingleTarget(RVMMethod t,
double w) |
| Modifier and Type | Method and Description |
|---|---|
WeightedCallTargets |
augmentCount(RVMMethod t,
double v)
Augment the weight associated with the argument method by the argument amount.
|
void |
decay(double rate)
Decay the weights of all call targets by the specified amount
|
WeightedCallTargets |
filter(RVMMethod goal,
boolean isPrecise) |
double |
totalWeight() |
void |
visitTargets(WeightedCallTargets.Visitor func)
Iterate over all of the targets, evaluating the argument function on each edge.
|
create, incrementCountSingleTarget(RVMMethod t, double w)
public void visitTargets(WeightedCallTargets.Visitor func)
WeightedCallTargetsNOTE: We guarantee that the targets will be iterated in monotonically decreasing edge weight. This simplifies the coding of the inlining clients that consume this information.
visitTargets in class WeightedCallTargetsfunc - the function to evaluate on each targetpublic WeightedCallTargets augmentCount(RVMMethod t, double v)
WeightedCallTargetsaugmentCount in class WeightedCallTargetst - the method whose count is to be incrementedv - amount to increment bypublic void decay(double rate)
WeightedCallTargetsdecay in class WeightedCallTargetsrate - the value to decay bypublic double totalWeight()
totalWeight in class WeightedCallTargetspublic WeightedCallTargets filter(RVMMethod goal, boolean isPrecise)
filter in class WeightedCallTargetsgoal - RVMMethod that is the statically possible targetisPrecise - whether or not goal is a precise target, or should be
interpreted as being the root of a virtual method family, any of which
are statically possible.null if no such target exists