gnu.jel
Class OPcondtnl
java.lang.Object
|
+--gnu.jel.OP
|
+--gnu.jel.OPfunction
|
+--gnu.jel.OPcondtnl
- public class OPcondtnl
- extends OPfunction
Method Summary |
protected void |
compile(ClassFile cf)
Called to generate the code implementing this OP. |
protected void |
eval(OPlist list)
Attempts to evaluate this function. |
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 |
OPcondtnl
public OPcondtnl(TypesStack typesStk,
OPlist trueList,
OPlist falseList)
throws java.lang.IllegalStateException
- Creates conditional operator.
typeStk should contain
. All these are popped and replaced by the
result type of conditional.
- Parameters:
typesStk
- stack holding current types.trueList
- operations of "true" branch.falseList
- operations of "false" branch.
getNParams
public int getNParams()
- Returns number of parameters for this function.
- Overrides:
getNParams
in class OPfunction
compile
protected void compile(ClassFile cf)
- Description copied from class:
OP
- Called to generate the code implementing this OP.
- Overrides:
compile
in class OP
- Following copied from class:
gnu.jel.OP
- Parameters:
cf
- class file to write the code into.
eval
protected void eval(OPlist list)
- Description copied from class:
OPfunction
- Attempts to evaluate this function.
- Overrides:
eval
in class OPfunction
- Following copied from class:
gnu.jel.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:
toString
in class java.lang.Object