|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.joanju.cg.bytecode.Bytecode com.joanju.cg.bytecode.BuiltinfuncInstr
public class BuiltinfuncInstr
Built-in functions (and operators).
Because there is a real danger of getting into a feedback loop, these instructions will not update if the new value set contains more entries than the previous value set. That results in the unresolved value being added to the value set, with no further additions.
See the notes at the end of this file for further thoughts and considerations.
Field Summary |
---|
Fields inherited from class com.joanju.cg.bytecode.Bytecode |
---|
address, cuid, instrSet, nodeNum, xrefs |
Constructor Summary | |
---|---|
BuiltinfuncInstr()
|
|
BuiltinfuncInstr(int cuid,
int address)
|
Method Summary | |
---|---|
void |
addWhereUsed(int addr)
Called by the code generator if this expression term is used by another instruction. |
void |
calcValueSets()
Calculate the value sets for the instruction. |
java.util.ArrayList<java.lang.Integer> |
getExpressionSources()
Get the addresses of the sources for the expressions used in this instruction. |
Opcode |
getOpcode()
|
java.util.HashSet<java.lang.Integer> |
getValues()
Get the set of values for this instruction. |
java.util.HashSet<java.lang.Integer> |
getWhereUsed()
As an expression term, this instruction's values are used by zero or one other instruction. |
void |
setInstructionSet(InstructionSet is)
At the time this is added to the InstructionSet, we determine if this instruction is recalcOK. |
protected void |
setValuesFromByteStream(java.io.DataInputStream in)
|
void |
stringConcat(Bytecode rval1,
Bytecode rval2)
Set the arguments for string concatenation. |
void |
substring(Bytecode stringSource,
java.util.ArrayList<JPNode> funcArgs)
Set the arguments for the SUBSTRING function. |
void |
ternaryIfOp(Bytecode rval1,
Bytecode rval2)
Set the arguments for the ternary IF operator. |
java.lang.String |
toStringFromComments(InstructionSet instrs)
All Bytecode instruction subclasses should override this eventually. |
java.lang.String |
toStringFromData()
All Bytecode instruction subclasses should override this eventually. |
protected void |
writeValuesToByteStream(java.io.DataOutputStream out)
|
Methods inherited from class com.joanju.cg.bytecode.Bytecode |
---|
addSource, beforeWrite, calcValuesAgain, compareTo, equals, fetchBytesFromDB, fetchInCu, generateDataForDB, getAddress, getCuID, getNodeNum, getSources, getValuesCalcLocal, getXrefs, hashCode, initData, isDataModified, isFromDB, setAddress, setCuID, setDataBytesFromDB, setDataModified, setFromDB, setNodeNum, shouldLoadData, sourcesForXrefTarget, storeIfModified, toString, toStringFromName, toStringFromSet |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BuiltinfuncInstr()
public BuiltinfuncInstr(int cuid, int address)
Method Detail |
---|
public void addWhereUsed(int addr) throws java.sql.SQLException, java.io.IOException
addWhereUsed
in class Bytecode
java.sql.SQLException
java.io.IOException
public void calcValueSets() throws java.sql.SQLException, java.io.IOException
Bytecode
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.
calcValueSets
in class Bytecode
java.sql.SQLException
java.io.IOException
public java.util.ArrayList<java.lang.Integer> getExpressionSources()
public Opcode getOpcode()
getOpcode
in class Bytecode
public java.util.HashSet<java.lang.Integer> getValues() throws java.sql.SQLException, java.io.IOException
Bytecode
getValues
in class Bytecode
java.sql.SQLException
java.io.IOException
public java.util.HashSet<java.lang.Integer> getWhereUsed() throws java.sql.SQLException, java.io.IOException
getWhereUsed
in class Bytecode
java.sql.SQLException
java.io.IOException
public void setInstructionSet(InstructionSet is)
setInstructionSet
in class Bytecode
protected void setValuesFromByteStream(java.io.DataInputStream in) throws java.io.IOException
setValuesFromByteStream
in class Bytecode
java.io.IOException
public void stringConcat(Bytecode rval1, Bytecode rval2)
public void substring(Bytecode stringSource, java.util.ArrayList<JPNode> funcArgs)
public void ternaryIfOp(Bytecode rval1, Bytecode rval2)
public java.lang.String toStringFromComments(InstructionSet instrs) throws java.sql.SQLException
Bytecode
toStringFromComments
in class Bytecode
java.sql.SQLException
public java.lang.String toStringFromData()
Bytecode
toStringFromData
in class Bytecode
protected void writeValuesToByteStream(java.io.DataOutputStream out) throws java.io.IOException
writeValuesToByteStream
in class Bytecode
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |