public abstract class FieldInstruction extends JVMInstruction implements VariableAccessor
Modifier and Type | Field and Description |
---|---|
protected String |
className |
protected FieldInfo |
fi |
protected String |
fname |
protected boolean |
isReferenceField |
protected long |
lastValue |
protected int |
size |
protected String |
varId |
attr, insnIndex, mi, position
Modifier | Constructor and Description |
---|---|
protected |
FieldInstruction() |
protected |
FieldInstruction(String name,
String clsName,
String fieldDescriptor) |
Modifier and Type | Method and Description |
---|---|
void |
accept(InstructionVisitor insVisitor) |
protected boolean |
createAndSetSharedFieldAccessCG(ElementInfo eiFieldOwner,
ThreadInfo ti) |
protected boolean |
createAndSetSharedObjectExposureCG(ElementInfo eiFieldValue,
ThreadInfo ti) |
String |
getClassName() |
abstract FieldInfo |
getFieldInfo() |
String |
getFieldName() |
int |
getFieldSize() |
String |
getId(ElementInfo ei) |
abstract ElementInfo |
getLastElementInfo() |
long |
getLastValue()
only defined in instructionExecuted() notification context
|
String |
getVariableId() |
static void |
init(Config config) |
protected boolean |
isLockProtected(ThreadInfo ti,
ElementInfo ei)
is this field supposed to be protected by a lock?
this only gets called if on-the-fly POR is in effect
NOTE this has the side effect of setting FieldLockInfos, which
in turn can be heuristic and volatile (i.e.
|
protected boolean |
isMonitorEnterPrologue()
do a little bytecode pattern analysis on the fly, to find out if a
GETFIELD or GETSTATIC is just part of a "..synchronized (obj) {..} .."
pattern, which usually translates into some
...
|
abstract boolean |
isRead() |
boolean |
isReferenceField() |
protected abstract boolean |
isSkippedFinalField(ElementInfo ei) |
abstract ElementInfo |
peekElementInfo(ThreadInfo ti) |
protected abstract void |
popOperands1(StackFrame frame) |
protected abstract void |
popOperands2(StackFrame frame) |
protected Instruction |
put(ThreadInfo ti,
StackFrame frame,
ElementInfo eiFieldOwner) |
protected Instruction |
put1(ThreadInfo ti,
StackFrame frame,
ElementInfo eiFieldOwner) |
protected Instruction |
put2(ThreadInfo ti,
StackFrame frame,
ElementInfo eiFieldOwner) |
void |
setField(String fname,
String fclsName)
for explicit construction
|
addAttr, attrIterator, attrIterator, cleanupTransients, execute, getAttr, getAttr, getByteCode, getFileLocation, getFilePos, getInstructionIndex, getLength, getLineNumber, getMethodInfo, getMnemonic, getNext, getNext, getNextAttr, getPosition, getPrev, getSourceLine, getSourceLocation, getSourceOrLocation, hasAttr, hasAttr, init, isBackJump, isCompleted, isExtendedInstruction, isFirstInstruction, isSchedulingRelevant, removeAttr, replaceAttr, requiresClinitExecution, setAttr, setContext, setLocation, setMethodInfo, toString, typeSafeClone
protected String fname
protected String className
protected String varId
protected FieldInfo fi
protected int size
protected boolean isReferenceField
protected long lastValue
public static void init(Config config)
public String getClassName()
public String getFieldName()
public long getLastValue()
public abstract boolean isRead()
public abstract FieldInfo getFieldInfo()
public abstract ElementInfo getLastElementInfo()
public abstract ElementInfo peekElementInfo(ThreadInfo ti)
protected abstract void popOperands1(StackFrame frame)
protected abstract void popOperands2(StackFrame frame)
protected abstract boolean isSkippedFinalField(ElementInfo ei)
public boolean isReferenceField()
protected Instruction put1(ThreadInfo ti, StackFrame frame, ElementInfo eiFieldOwner)
protected Instruction put2(ThreadInfo ti, StackFrame frame, ElementInfo eiFieldOwner)
protected Instruction put(ThreadInfo ti, StackFrame frame, ElementInfo eiFieldOwner)
public int getFieldSize()
public String getId(ElementInfo ei)
public String getVariableId()
getVariableId
in interface VariableAccessor
protected boolean isLockProtected(ThreadInfo ti, ElementInfo ei)
protected boolean isMonitorEnterPrologue()
protected boolean createAndSetSharedFieldAccessCG(ElementInfo eiFieldOwner, ThreadInfo ti)
protected boolean createAndSetSharedObjectExposureCG(ElementInfo eiFieldValue, ThreadInfo ti)
public void accept(InstructionVisitor insVisitor)
accept
in interface InstructionVisitorAcceptor