Class Operation

java.lang.Object
org.eclipse.m2m.atl.engine.emfvm.lib.Operation
Direct Known Subclasses:
ASMOperation

public abstract class Operation extends Object
The abstract Operation class.
  • Field Details

    • maxLocals

      protected int maxLocals
    • name

      protected String name
  • Constructor Details

    • Operation

      public Operation(int maxLocals, String name)
      Creates a new operation.
      Parameters:
      maxLocals - max locals
      name - the operation name
    • Operation

      public Operation(int maxLocals)
      Deprecated.
      Creates a new operation.
      Parameters:
      maxLocals - max locals
  • Method Details

    • setName

      public void setName(String name)
    • exec

      public abstract Object exec(AbstractStackFrame frame)
      Executes an operation.
      Parameters:
      frame - the frame for execution
      Returns:
      the result
    • getMaxLocals

      public int getMaxLocals()
    • getName

      public String getName()
    • getInstructions

      public List<?> getInstructions()
    • resolveLineNumber

      public String resolveLineNumber(int l)
      Returns the line at the specified number.
      Parameters:
      l - the line number
      Returns:
      the line at the specified number
    • resolveVariableName

      public String resolveVariableName(int slot, int l)
      Resolves a variable name by its slot number and its index.
      Parameters:
      slot - the slot number
      l - the variable index
      Returns:
      the variable name