com.joanju.cg.bytecode
Class UnknownvalInstr
java.lang.Object
com.joanju.cg.bytecode.Bytecode
com.joanju.cg.bytecode.UnknownvalInstr
public class UnknownvalInstr
- extends Bytecode
There is one of these in a fixed position in the compile unit's header, and it is referenced
when the unknown value (?) is assigned to a variable.
The value it returns is "", and as such, it is ignored by Callgraph.
It is common in code to assign handleVar=?, once the handle is no longer valid.
We don't want those to be treated as unresolved.
Methods inherited from class com.joanju.cg.bytecode.Bytecode |
addSource, addWhereUsed, beforeWrite, calcValuesAgain, compareTo, equals, fetchBytesFromDB, fetchInCu, generateDataForDB, getAddress, getCuID, getNodeNum, getSources, getValuesCalcLocal, getWhereUsed, getXrefs, hashCode, initData, isDataModified, isFromDB, setAddress, setCuID, setDataBytesFromDB, setDataModified, setFromDB, setInstructionSet, setNodeNum, shouldLoadData, sourcesForXrefTarget, storeIfModified, toString, toStringFromComments, toStringFromData, toStringFromName, toStringFromSet |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
UnknownvalInstr
public UnknownvalInstr()
UnknownvalInstr
public UnknownvalInstr(int cuid,
int address)
calcValueSets
public void calcValueSets()
throws java.sql.SQLException,
java.io.IOException
- Description copied from class:
Bytecode
- Calculate the value sets for the instruction.
Called during build, build-recalc, checkvals, and checkvals-recalc.
Implementations should only build from external values once.
Calculates which xref records are needed as well.
IMPORTANT: Should only ever be called for instructions belonging to an InstructionSet.
- Specified by:
calcValueSets
in class Bytecode
- Throws:
java.sql.SQLException
java.io.IOException
getOpcode
public Opcode getOpcode()
- Specified by:
getOpcode
in class Bytecode
getValues
public java.util.HashSet<java.lang.Integer> getValues()
throws java.sql.SQLException,
java.io.IOException
- Description copied from class:
Bytecode
- Get the set of values for this instruction.
Should be overridden by most subclasses.
This default implementation returns a set containing one Layout.UNRESOLVED_VALUE.
- Overrides:
getValues
in class Bytecode
- Throws:
java.sql.SQLException
java.io.IOException
setValuesFromByteStream
protected void setValuesFromByteStream(java.io.DataInputStream in)
throws java.io.IOException
- Specified by:
setValuesFromByteStream
in class Bytecode
- Throws:
java.io.IOException
writeValuesToByteStream
protected void writeValuesToByteStream(java.io.DataOutputStream out)
throws java.io.IOException
- Specified by:
writeValuesToByteStream
in class Bytecode
- Throws:
java.io.IOException
Copyright © 2008 Joanju Software. All Rights Reserved.