Class Bytecode


  • public class Bytecode
    extends java.lang.Object
    Defines the ATL VM bytecodes.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int CALL
      Call a method.
      static int DELETE
      Deletes an element.
      static int DUP
      Duplicate the top operand stack value.
      static int DUP_X1
      Duplicate the top operand stack value and insert two values down.
      static int ENDITERATE
      Delimitate the end of iteration on collection elements.
      static int FINDME
      Fetch a classifier.
      static int GET
      Fetch field from object.
      static int GETASM
      Fetch the asm element.
      static int GOTO
      Branch always.
      static int IF
      Branch if boolean value b is true.
      static int ITERATE
      Delimitate the beginning of iteration on collection elements.
      static int LOAD
      Load value from local variable.
      static int NEW
      Creates a new element.
      static int NEWIN
      Creates a new element in the specified model.
      static java.lang.String[] OPCODENAMES
      List of codes.
      static int PCALL
      Call a procedure (i.e., an operation with no returned value).
      static int POP
      Pop the top operand stack value.
      static int PUSH
      Push string constant.
      static int PUSHD
      Push double constant.
      static int PUSHF
      Push false boolean constant.
      static int PUSHI
      Push int constant.
      static int PUSHT
      Push true boolean constant.
      static int SET
      Set field in object.
      static int STORE
      Store value into local variable.
      static int SWAP
      Swap the two top operand stack values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Bytecode​(java.lang.String opcode)
      Bytecode constructor, for bytecodes which needs an operand.
      Bytecode​(java.lang.String opcode, java.lang.String operand)
      Bytecode constructor, for bytecodes which needs an operand.
    • 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 name
        operand - the operand
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.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)