public class OPunary extends OP
| Modifier and Type | Field and Description | 
|---|---|
| int | codecode of this operation | 
| protected static byte[] | unary_prmtnsunary promotions of base types | 
chi, resID, resType, specialTypes, unwrapType| Constructor and Description | 
|---|
| OPunary(java.util.Stack<OP> paramOPs,
       int code)Constructs a new unary operation. | 
| OPunary(java.util.Stack<OP> paramOPs,
       int targetID,
       java.lang.Class<?> targetClass,
       boolean allownarrowing)Creates conversion operation to the given class. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | compile(ClassFile cf)Called to generate the code implementing this OP. | 
| java.lang.Object | eval()Called to evaluate this node and all its sub-nodes. | 
isWidening, isWidening, narrow, typeID, typeIDObject, widenpublic int code
protected static final byte[] unary_prmtns
public OPunary(java.util.Stack<OP> paramOPs, int code) throws CompilationException
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
paramOPs - stack holding the operandscode - operation codeCompilationExceptionpublic OPunary(java.util.Stack<OP> paramOPs, int targetID, java.lang.Class<?> targetClass, boolean allownarrowing) throws CompilationException
paramOPs - stack holding the operandstargetID - ID of primitive type to convert to.targetClass - the class to convert to, in case cldID=8allownarrowing - if narrowing conversions are allowed.CompilationExceptionpublic void compile(ClassFile cf)
OPpublic java.lang.Object eval()
                      throws java.lang.Exception
OPUpon success this node is to be replaced by the constant node holding the returned object.
Copyright © 1998-2016 Konstantin L. Metlov All Rights Reserved.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the JEL manual.