public final class FieldAnalysis extends CompilerPhase
Modifier and Type | Field and Description |
---|---|
private static FieldDatabase |
db
The backing store
|
private static boolean |
DEBUG |
container
Constructor and Description |
---|
FieldAnalysis() |
Modifier and Type | Method and Description |
---|---|
static TypeReference |
getConcreteType(RVMField f)
Gets the a single concrete type for a field, if there is one.
|
String |
getName() |
private static boolean |
isCandidate(TypeReference tref)
Is a type a candidate for type analysis?
|
private static boolean |
isTrouble(RVMField f)
For some special classes, the flow-insensitive summaries
are INCORRECT due to using the wrong implementation
during boot image writing.
|
CompilerPhase |
newExecution(IR ir)
Return this instance of this phase.
|
void |
perform(IR ir)
Record field analysis information for an IR.
|
private static void |
recordBottom(RVMMethod m,
RVMField f)
Records that a method writes an unknown concrete type to a field.
|
private static void |
recordConcreteType(RVMMethod m,
RVMField f,
TypeReference t)
Record that a method stores an object of a particular concrete type
to a field.
|
boolean |
shouldPerform(OptOptions options)
This method determines if the phase should be run, based on the
Options object it is passed.
|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, printingEnabled, reportAdditionalStats, setContainer, verify
private static final boolean DEBUG
private static final FieldDatabase db
public FieldAnalysis()
public CompilerPhase newExecution(IR ir)
newExecution
in class CompilerPhase
ir
- not usedpublic boolean shouldPerform(OptOptions options)
CompilerPhase
shouldPerform
in class CompilerPhase
options
- the compiler options for the compilationpublic String getName()
getName
in class CompilerPhase
private static boolean isCandidate(TypeReference tref)
NO iff:
tref
- the typetrue
if the type is a candidate for
type analysis, i.e. if it's a non-final reference typepublic static TypeReference getConcreteType(RVMField f)
f
- the field that's of interestnull
otherwisepublic void perform(IR ir)
perform
in class CompilerPhase
ir
- the governing IRprivate static void recordBottom(RVMMethod m, RVMField f)
m
- the writing methodf
- the written fieldprivate static void recordConcreteType(RVMMethod m, RVMField f, TypeReference t)
m
- the writing methodf
- the written fieldt
- the concrete typeprivate static boolean isTrouble(RVMField f)
f
- the field to checktrue
if the field information may be incorrect