org.rubato.rubettes.builtin
Class ArithVM
java.lang.Object
org.rubato.rubettes.builtin.ArithVM
public class ArithVM
- extends java.lang.Object
The virtual machine for execution bytecode created by
ArithCompiler
.
- Author:
- Gérard Milmeister
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
IMMEDIATE
public static final int IMMEDIATE
- See Also:
- Constant Field Values
TIMES
public static final int TIMES
- See Also:
- Constant Field Values
DIV
public static final int DIV
- See Also:
- Constant Field Values
PLUS
public static final int PLUS
- See Also:
- Constant Field Values
MINUS
public static final int MINUS
- See Also:
- Constant Field Values
PARAM
public static final int PARAM
- See Also:
- Constant Field Values
NOP
public static final int NOP
- See Also:
- Constant Field Values
ID
public static final int ID
- See Also:
- Constant Field Values
FUNCALL
public static final int FUNCALL
- See Also:
- Constant Field Values
UMINUS
public static final int UMINUS
- See Also:
- Constant Field Values
EXP
public static final int EXP
- See Also:
- Constant Field Values
AND
public static final int AND
- See Also:
- Constant Field Values
OR
public static final int OR
- See Also:
- Constant Field Values
LE
public static final int LE
- See Also:
- Constant Field Values
LT
public static final int LT
- See Also:
- Constant Field Values
GE
public static final int GE
- See Also:
- Constant Field Values
GT
public static final int GT
- See Also:
- Constant Field Values
EQUALS
public static final int EQUALS
- See Also:
- Constant Field Values
NEQ
public static final int NEQ
- See Also:
- Constant Field Values
FALSE
public static final int FALSE
- See Also:
- Constant Field Values
TRUE
public static final int TRUE
- See Also:
- Constant Field Values
NOT
public static final int NOT
- See Also:
- Constant Field Values
BIF
public static final int BIF
- See Also:
- Constant Field Values
JMP
public static final int JMP
- See Also:
- Constant Field Values
ArithVM
public ArithVM()
eval
public void eval(double... parameters)
getRealResult
public double getRealResult()
getBooleanResult
public boolean getBooleanResult()
setError
public void setError(java.lang.String s)
setError
public void setError(java.lang.String s,
java.lang.Object... objects)
hasError
public boolean hasError()
getError
public java.lang.String getError()
start
public void start()
finish
public void finish()
getNrArgs
public int getNrArgs()
compileOp
public void compileOp(int op)
compileUnaryMinus
public void compileUnaryMinus()
compileFalse
public void compileFalse()
compileTrue
public void compileTrue()
compileNot
public void compileNot()
compileId
public boolean compileId(java.lang.String id,
int nrArgs)
compileParam
public void compileParam(int param)
compileNumber
public void compileNumber(double value)
compileIf
public int compileIf()
compileThen
public int compileThen(int ifpos)
compileElse
public void compileElse(int jmppos)
dump
public void dump()