public final class InlineDecision extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
InlineDecision.Code |
Modifier and Type | Field and Description |
---|---|
private InlineDecision.Code |
code
Holds characterization of this decision.
|
private byte[] |
guards
The set of guards to use (only valid when code == GUARDED_YES)
|
private String |
rationale
Rationale for this decision
|
private RVMMethod[] |
targets
The set of methods to inline.
|
private boolean |
testFailedOSR
Should the test-failed block be replaced with an OSR point?
|
Modifier | Constructor and Description |
---|---|
private |
InlineDecision(RVMMethod[] targets,
byte[] guards,
InlineDecision.Code code,
String reason) |
Modifier and Type | Method and Description |
---|---|
byte[] |
getGuards() |
int |
getNumberOfTargets() |
RVMMethod[] |
getTargets() |
static InlineDecision |
guardedYES(RVMMethod[] targets,
byte[] guards,
String reason)
Return a decision YES to do a guarded inline.
|
static InlineDecision |
guardedYES(RVMMethod target,
byte guard,
String reason)
Return a decision YES to do a guarded inline.
|
boolean |
isNO() |
boolean |
isYES() |
boolean |
needsGuard() |
static InlineDecision |
NO(RVMMethod target,
String reason)
Return a decision NOT to inline.
|
static InlineDecision |
NO(String reason)
Return a decision NOT to inline.
|
boolean |
OSRTestFailed() |
void |
setOSRTestFailed() |
String |
toString() |
static InlineDecision |
YES(RVMMethod target,
String reason)
Return a decision to inline without a guard.
|
private final InlineDecision.Code code
private final byte[] guards
private boolean testFailedOSR
private InlineDecision(RVMMethod[] targets, byte[] guards, InlineDecision.Code code, String reason)
targets
- The methods to inlineguards
- the chosen guards. will be null
if no guards are necessarycode
- the decision codereason
- a string rationalepublic static InlineDecision NO(RVMMethod target, String reason)
target
- the method that is not being inlined.reason
- a rationale for not inliningpublic static InlineDecision NO(String reason)
reason
- a rationale for not inliningpublic static InlineDecision YES(RVMMethod target, String reason)
target
- the method to inlinereason
- a rationale for inliningpublic static InlineDecision guardedYES(RVMMethod target, byte guard, String reason)
target
- the method to inlineguard
- the type of guard to usereason
- a rationale for inliningpublic static InlineDecision guardedYES(RVMMethod[] targets, byte[] guards, String reason)
targets
- The methods to inlineguards
- the types of guard to usereason
- A rationale for inliningpublic boolean isYES()
public boolean isNO()
public boolean needsGuard()
public RVMMethod[] getTargets()
public byte[] getGuards()
public int getNumberOfTargets()
public void setOSRTestFailed()
public boolean OSRTestFailed()