Package org.eclipse.m2m.atl.engine.emfvm
Class ASMOperation
java.lang.Object
org.eclipse.m2m.atl.engine.emfvm.lib.Operation
org.eclipse.m2m.atl.engine.emfvm.ASMOperation
ASM commands scheduler.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLineNumberEntry(String id, int begin, int end) Adds a line number entry.voidaddLocalVariableEntry(int slot, String variableName, int begin, int end) Adds a local variable entry with the given parameters.voidaddParameter(String parameterName, String type) Adds a parameter.exec(AbstractStackFrame frame) Executes an operation.exec(AbstractStackFrame frame, org.eclipse.core.runtime.IProgressMonitor monitor) Executes an operation.protected static MethodfindMethod(Class<?> caller, String name, Class<?>[] argumentTypes) Looks for a method into cache and metamodel.getASM()Bytecode[]Returns the bytecodes.List<?> List<org.eclipse.m2m.atl.engine.emfvm.ASMOperation.LineNumberEntry> List<org.eclipse.m2m.atl.engine.emfvm.ASMOperation.LocalVariableEntry> intgetName()resolveLineNumber(int l) Returns the line at the specified number.resolveVariableName(int slot, int l) Resolves a variable name by its slot number and its index.voidsetBytecodes(Bytecode[] bytecodes) Sets the bytecodes for the operation.voidsetContext(String context) toString()
-
Field Details
-
MAX_STACK
public static final int MAX_STACKThe max size of the Stack.- See Also:
-
-
Constructor Details
-
ASMOperation
ASMOperation constructor.- Parameters:
asm- the parent asmname- operation name
-
-
Method Details
-
getMaxLocals
public int getMaxLocals()- Overrides:
getMaxLocalsin classOperation- See Also:
-
getParameters
-
setContext
-
getContext
-
addParameter
Adds a parameter.- Parameters:
parameterName- the parameter nametype- the parameter type
-
addLineNumberEntry
Adds a line number entry.- Parameters:
id- the parameter idbegin- the begin indexend- the end index
-
getLineNumberTable
-
resolveLineNumber
Returns the line at the specified number.- Overrides:
resolveLineNumberin classOperation- Parameters:
l- the line number- Returns:
- the line at the specified number
- See Also:
-
addLocalVariableEntry
Adds a local variable entry with the given parameters.- Parameters:
slot- the slot numbervariableName- the variable namebegin- the begin indexend- the end index
-
getLocalVariableTable
public List<org.eclipse.m2m.atl.engine.emfvm.ASMOperation.LocalVariableEntry> getLocalVariableTable() -
resolveVariableName
Resolves a variable name by its slot number and its index.- Overrides:
resolveVariableNamein classOperation- Parameters:
slot- the slot numberl- the variable index- Returns:
- the variable name
- See Also:
-
setBytecodes
Sets the bytecodes for the operation.- Parameters:
bytecodes- the bytecodes to set
-
getBytecodes
Returns the bytecodes.- Returns:
- The bytecodes, if any
-
getName
-
exec
Executes an operation.- Parameters:
frame- the frame for executionmonitor- the progress monitor- Returns:
- the result
-
exec
Executes an operation. -
getASM
-
findMethod
Looks for a method into cache and metamodel.- Parameters:
caller- The class of the methodname- The method nameargumentTypes- The types of all arguments- Returns:
- the method if found, null otherwise
-
getInstructions
- Overrides:
getInstructionsin classOperation- See Also:
-
toString
-