com.joanju.cg.bytecode
Class AddsuperInstr

java.lang.Object
  extended by com.joanju.cg.bytecode.Bytecode
      extended by com.joanju.cg.bytecode.AddsuperInstr

public class AddsuperInstr
extends Bytecode


Field Summary
static AddsuperInstr SAMPLE_OBJECT
          Used for passing to templated (generic) methods.
 
Fields inherited from class com.joanju.cg.bytecode.Bytecode
address, cuid, instrSet, nodeNum, xrefs
 
Constructor Summary
AddsuperInstr()
           
AddsuperInstr(int cuid, int address)
           
 
Method Summary
 void beforeWrite(boolean isNewBuild)
          Called when a build or checkval is done processing a CU, before writing the new/changed records.
 void calcValueSets()
          Calculate the value sets for the instruction.
 java.util.HashSet<java.lang.Integer> getLocalCUIDValues()
          Get the set of possible CUIDs for the local handle.
 Opcode getOpcode()
           
 java.util.HashSet<java.lang.Integer> getSuperCUIDValues()
          Get the set of possible CUIDs for the super handle.
 boolean isSearchTarget()
          Was this ADD-SUPER instruction specified with the SEARCH-TARGET flag?
 void setLocalHdlRValAddress(int subHdlRVal)
          Set by the codegenerator.
 void setSearchTarget()
          Indicate that this ADD-SUPER instruction was specified with the SEARCH-TARGET flag.
 void setSuperHdlRValAddress(int supHdlRVal)
           
protected  void setValuesFromByteStream(java.io.DataInputStream in)
           
 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, addWhereUsed, calcValuesAgain, compareTo, equals, fetchBytesFromDB, fetchInCu, generateDataForDB, getAddress, getCuID, getNodeNum, getSources, getValues, getValuesCalcLocal, getWhereUsed, getXrefs, hashCode, initData, isDataModified, isFromDB, setAddress, setCuID, setDataBytesFromDB, setDataModified, setFromDB, setInstructionSet, setNodeNum, shouldLoadData, sourcesForXrefTarget, storeIfModified, toString, toStringFromName, toStringFromSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

SAMPLE_OBJECT

public static final AddsuperInstr SAMPLE_OBJECT
Used for passing to templated (generic) methods.

Constructor Detail

AddsuperInstr

public AddsuperInstr()

AddsuperInstr

public AddsuperInstr(int cuid,
                     int address)
Method Detail

beforeWrite

public void beforeWrite(boolean isNewBuild)
                 throws java.sql.SQLException,
                        java.io.IOException
Description copied from class: Bytecode
Called when a build or checkval is done processing a CU, before writing the new/changed records. This base class implementation is a no-op.

Overrides:
beforeWrite in class Bytecode
Throws:
java.sql.SQLException
java.io.IOException

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

getLocalCUIDValues

public java.util.HashSet<java.lang.Integer> getLocalCUIDValues()
                                                        throws java.sql.SQLException,
                                                               java.io.IOException
Get the set of possible CUIDs for the local handle. If this instruction was on THIS-PROCEDURE, then this cuid is the only entry in the set. This is only to be called after local values for this CU have been calculated. The return set may contain the unresolved value. The return set will never contain zero.

Throws:
java.sql.SQLException
java.io.IOException

getSuperCUIDValues

public java.util.HashSet<java.lang.Integer> getSuperCUIDValues()
                                                        throws java.sql.SQLException,
                                                               java.io.IOException
Get the set of possible CUIDs for the super handle. This is only to be called after local values for this CU have been calculated. The return set may contain the unresolved value. The return set will never contain zero or this instructions's CUID.

Throws:
java.sql.SQLException
java.io.IOException

isSearchTarget

public boolean isSearchTarget()
                       throws java.sql.SQLException,
                              java.io.IOException
Was this ADD-SUPER instruction specified with the SEARCH-TARGET flag?

Throws:
java.sql.SQLException
java.io.IOException

setSearchTarget

public void setSearchTarget()
                     throws java.sql.SQLException,
                            java.io.IOException
Indicate that this ADD-SUPER instruction was specified with the SEARCH-TARGET flag.

Throws:
java.sql.SQLException
java.io.IOException

setLocalHdlRValAddress

public void setLocalHdlRValAddress(int subHdlRVal)
Set by the codegenerator. Is set to zero for hard-coded THIS-PROCEDURE:ADD-SUPER.


setSuperHdlRValAddress

public void setSuperHdlRValAddress(int supHdlRVal)

setValuesFromByteStream

protected void setValuesFromByteStream(java.io.DataInputStream in)
                                throws java.io.IOException
Specified by:
setValuesFromByteStream in class Bytecode
Throws:
java.io.IOException

toStringFromComments

public java.lang.String toStringFromComments(InstructionSet instrs)
Description copied from class: Bytecode
All Bytecode instruction subclasses should override this eventually.

Overrides:
toStringFromComments in class Bytecode
Returns:
"" if not overridden.

toStringFromData

public java.lang.String toStringFromData()
Description copied from class: Bytecode
All Bytecode instruction subclasses should override this eventually.

Overrides:
toStringFromData in class Bytecode
Returns:
"" if not overridden.

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.