gnu.jel
Class  OPunary
java.lang.Object
  |
  +--gnu.jel.OP
        |
        +--gnu.jel.OPfunction
              |
              +--gnu.jel.OPunary
- public class OPunary- extends OPfunction
 
 
| Constructor Summary | 
| OPunary(TypesStack typesStk,
        int code)Constructs a new unary operation.
 | 
| OPunary(TypesStack typesStk,
        int targetID,
        java.lang.Class targetClass,
        boolean allownarrowing)Creates conversion operation to the given class.
 | 
 
| Method Summary | 
| protected  void | compile_pre(ClassFile cf)Called to generate the code before the parameters processing starts.
 | 
| protected  void | compile(ClassFile cf)Called to generate the code implementing this OP.
 | 
| protected  void | eval(OPlist list)Attempts to perform this operation.
 | 
|  int | getNParams()Returns number of parameters for this function.
 | 
|  java.lang.String | toString()
 | 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
 
code
protected int code
uwrpCode
protected int uwrpCode
implCode
protected int implCode
uwrpsTo
protected int uwrpsTo
unary_prmtns
protected static final byte[] unary_prmtns
OPunary
public OPunary(TypesStack typesStk,
               int code)
        throws CompilationException
- Constructs a new unary operation.
 Codes are following:
  
 0  -- negation (applicable to anything except boolean)
 1  -- bitwise not (applicable to all integral types)
 2  -- logical not (applicable to booleans only)
 3  -- return the type in stack
  
- 
- Parameters:
- typesStk- stack holding the current types (will be updated)
- code- operation code
- cls- class to convert to (used only if code==11)
 
OPunary
public OPunary(TypesStack typesStk,
               int targetID,
               java.lang.Class targetClass,
               boolean allownarrowing)
        throws CompilationException
- Creates conversion operation to the given class.- 
- Parameters:
- typesStk- stack holding the current types (will be updated)
- targetID- ID of primitive type to convert to.
- targetClass- the class to convert to, in case cldID=8
- allownarrowing- if narrowing conversions are allowed.
 
getNParams
public int getNParams()
- Returns number of parameters for this function.- 
- Overrides:
- getNParamsin class- OPfunction
 
compile_pre
protected void compile_pre(ClassFile cf)
- Description copied from class: OPfunction
- Called to generate the code before the parameters processing starts.- 
- Overrides:
- compile_prein class- OPfunction
 
- Following copied from class: gnu.jel.OPfunction
- 
- Parameters:
- cf- class file to write the code into.
 
compile
protected void compile(ClassFile cf)
- Description copied from class: OP
- Called to generate the code implementing this OP.- 
- Overrides:
- compilein class- OP
 
- Following copied from class: gnu.jel.OP
- 
- Parameters:
- cf- class file to write the code into.
 
eval
protected void eval(OPlist list)
- Attempts to perform this operation.- 
- Overrides:
- evalin class- OPfunction
 
- 
- Parameters:
- list- is the list of OPs this one belong to, 
             if eval is unsuccessful this list is not modified.
 
toString
public java.lang.String toString()
- 
- Overrides:
- toStringin class- java.lang.Object