Package org.eclipse.m2m.atl.engine.emfvm
Class Bytecode
- java.lang.Object
-
- org.eclipse.m2m.atl.engine.emfvm.Bytecode
-
public class Bytecode extends java.lang.ObjectDefines the ATL VM bytecodes.
-
-
Field Summary
Fields Modifier and Type Field Description static intCALLCall a method.static intDELETEDeletes an element.static intDUPDuplicate the top operand stack value.static intDUP_X1Duplicate the top operand stack value and insert two values down.static intENDITERATEDelimitate the end of iteration on collection elements.static intFINDMEFetch a classifier.static intGETFetch field from object.static intGETASMFetch the asm element.static intGOTOBranch always.static intIFBranch if boolean value b is true.static intITERATEDelimitate the beginning of iteration on collection elements.static intLOADLoad value from local variable.static intNEWCreates a new element.static intNEWINCreates a new element in the specified model.static java.lang.String[]OPCODENAMESList of codes.static intPCALLCall a procedure (i.e., an operation with no returned value).static intPOPPop the top operand stack value.static intPUSHPush string constant.static intPUSHDPush double constant.static intPUSHFPush false boolean constant.static intPUSHIPush int constant.static intPUSHTPush true boolean constant.static intSETSet field in object.static intSTOREStore value into local variable.static intSWAPSwap the two top operand stack values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetOpcode()java.lang.ObjectgetOperand()intgetValue()intgetValue2()voidsetOperand(java.lang.Object operand)voidsetValue(int value)voidsetValue2(int value2)java.lang.StringtoString()
-
-
-
Field Detail
-
PUSH
public static final int PUSH
Push string constant.- See Also:
- Constant Field Values
-
PUSHI
public static final int PUSHI
Push int constant.- See Also:
- Constant Field Values
-
PUSHD
public static final int PUSHD
Push double constant.- See Also:
- Constant Field Values
-
PUSHT
public static final int PUSHT
Push true boolean constant.- See Also:
- Constant Field Values
-
PUSHF
public static final int PUSHF
Push false boolean constant.- See Also:
- Constant Field Values
-
CALL
public static final int CALL
Call a method.- See Also:
- Constant Field Values
-
LOAD
public static final int LOAD
Load value from local variable.- See Also:
- Constant Field Values
-
STORE
public static final int STORE
Store value into local variable.- See Also:
- Constant Field Values
-
NEW
public static final int NEW
Creates a new element.- See Also:
- Constant Field Values
-
ITERATE
public static final int ITERATE
Delimitate the beginning of iteration on collection elements.- See Also:
- Constant Field Values
-
ENDITERATE
public static final int ENDITERATE
Delimitate the end of iteration on collection elements.- See Also:
- Constant Field Values
-
DUP
public static final int DUP
Duplicate the top operand stack value.- See Also:
- Constant Field Values
-
SET
public static final int SET
Set field in object.- See Also:
- Constant Field Values
-
GET
public static final int GET
Fetch field from object.- See Also:
- Constant Field Values
-
POP
public static final int POP
Pop the top operand stack value.- See Also:
- Constant Field Values
-
GETASM
public static final int GETASM
Fetch the asm element.- See Also:
- Constant Field Values
-
IF
public static final int IF
Branch if boolean value b is true.- See Also:
- Constant Field Values
-
GOTO
public static final int GOTO
Branch always.- See Also:
- Constant Field Values
-
SWAP
public static final int SWAP
Swap the two top operand stack values.- See Also:
- Constant Field Values
-
FINDME
public static final int FINDME
Fetch a classifier.- See Also:
- Constant Field Values
-
DUP_X1
public static final int DUP_X1
Duplicate the top operand stack value and insert two values down.- See Also:
- Constant Field Values
-
DELETE
public static final int DELETE
Deletes an element.- See Also:
- Constant Field Values
-
PCALL
public static final int PCALL
Call a procedure (i.e., an operation with no returned value).- See Also:
- Constant Field Values
-
NEWIN
public static final int NEWIN
Creates a new element in the specified model.- See Also:
- Constant Field Values
-
OPCODENAMES
public static final java.lang.String[] OPCODENAMES
List of codes.
-
-
Constructor Detail
-
Bytecode
public Bytecode(java.lang.String opcode)
Bytecode constructor, for bytecodes which needs an operand.- Parameters:
opcode- the bytecode name
-
Bytecode
public Bytecode(java.lang.String opcode, java.lang.String operand)Bytecode constructor, for bytecodes which needs an operand.- Parameters:
opcode- the bytecode nameoperand- the operand
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
getOpcode
public int getOpcode()
-
getOperand
public java.lang.Object getOperand()
-
setOperand
public void setOperand(java.lang.Object operand)
-
getValue
public int getValue()
-
getValue2
public int getValue2()
-
setValue2
public void setValue2(int value2)
-
setValue
public void setValue(int value)
-
-