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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addLineNumberEntry
(String id, int begin, int end) Adds a line number entry.void
addLocalVariableEntry
(int slot, String variableName, int begin, int end) Adds a local variable entry with the given parameters.void
addParameter
(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 Method
findMethod
(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>
int
getName()
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.void
setBytecodes
(Bytecode[] bytecodes) Sets the bytecodes for the operation.void
setContext
(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:
getMaxLocals
in 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:
resolveLineNumber
in 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:
resolveVariableName
in 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:
getInstructions
in classOperation
- See Also:
-
toString
-