com.joanju.cg.bytecode
Class PushonretInstr

java.lang.Object
  extended by com.joanju.cg.bytecode.Bytecode
      extended by com.joanju.cg.bytecode.PushInstr
          extended by com.joanju.cg.bytecode.PushonretInstr

public class PushonretInstr
extends PushInstr

Used in a procedure for OUTPUT and INPUT-OUTPUT parameters, and for the return value from functions and methods. A regular push instruction just pushes one rval onto the stack. A pushonret instruction is an aggregate of multiple possible rvalues.


Field Summary
 
Fields inherited from class com.joanju.cg.bytecode.PushInstr
paramNum, values
 
Fields inherited from class com.joanju.cg.bytecode.Bytecode
address, cuid, instrSet, nodeNum, xrefs
 
Constructor Summary
PushonretInstr()
           
PushonretInstr(int cuid, int address)
           
 
Method Summary
 void calcValueSets()
          Calculate the value sets for the instruction.
 Opcode getOpcode()
           
 java.util.HashSet<java.lang.Integer> getSources()
          Returns null.
protected  void setValuesFromByteStream(java.io.DataInputStream in)
           
 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.PushInstr
checkWhereUsed, getParamNum, getRVal, getValues, setParamNum, setRVal
 
Methods inherited from class com.joanju.cg.bytecode.Bytecode
addSource, addWhereUsed, beforeWrite, calcValuesAgain, compareTo, equals, fetchBytesFromDB, fetchInCu, generateDataForDB, getAddress, getCuID, getNodeNum, getValuesCalcLocal, getWhereUsed, getXrefs, hashCode, initData, isDataModified, isFromDB, setAddress, setCuID, setDataBytesFromDB, setDataModified, setFromDB, setInstructionSet, setNodeNum, shouldLoadData, sourcesForXrefTarget, storeIfModified, toString, toStringFromComments, toStringFromName, toStringFromSet
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PushonretInstr

public PushonretInstr()

PushonretInstr

public PushonretInstr(int cuid,
                      int address)
Method Detail

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.

Overrides:
calcValueSets in class PushInstr
Throws:
java.sql.SQLException
java.io.IOException

getOpcode

public Opcode getOpcode()
Overrides:
getOpcode in class PushInstr

getSources

public java.util.HashSet<java.lang.Integer> getSources()
                                                throws java.sql.SQLException,
                                                       java.io.IOException
Description copied from class: Bytecode
Returns null. May be overridden by subclasses.

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

setValuesFromByteStream

protected void setValuesFromByteStream(java.io.DataInputStream in)
                                throws java.io.IOException
Overrides:
setValuesFromByteStream in class PushInstr
Throws:
java.io.IOException

toStringFromData

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

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

writeValuesToByteStream

protected void writeValuesToByteStream(java.io.DataOutputStream out)
                                throws java.io.IOException
Overrides:
writeValuesToByteStream in class PushInstr
Throws:
java.io.IOException


Copyright © 2008 Joanju Software. All Rights Reserved.