org.eclipse.m2m.atl.engine.asm
Class ASMOperation

java.lang.Object
  extended by org.eclipse.m2m.atl.engine.asm.ASMOperation

public class ASMOperation
extends java.lang.Object

The line number table contains a list of IDs (startLine:startColumn-endLine:endColumn) of source elements associated to a range of asm instructions. This list is depth first (first the condition is found, then the if). However, it is entered root first... so it is a LIFO. To find the source element (and its location, IDs being positions) associated to an asm instruction, we just have to find the first range matching the instruction.


Nested Class Summary
protected  class ASMOperation.Label
           
 class ASMOperation.LineNumberEntry
           
 class ASMOperation.LocalVariableEntry
           
 
Constructor Summary
ASMOperation(ASM asm, java.lang.String name)
           
 
Method Summary
 void addInstruction(ASMInstruction instruction)
           
 void addLabel(java.lang.String labelName)
           
 void addLabeledInstruction(ASMInstructionWithOperand instruction, java.lang.String labelName)
           
 void addLineNumberEntry(java.lang.String id, int begin, int end)
           
 void addLocalVariableEntry(int slot, java.lang.String name, int begin, int end)
           
 void addParameter(ASMParameter parameter)
           
 void addVariableInstruction(ASMInstructionWithOperand instruction, java.lang.String varId)
           
 void beginLineNumberEntry(java.lang.String id)
           
 int beginLocalVariableEntry(java.lang.String id, java.lang.String name)
           
 void endLineNumberEntry(java.lang.String id)
           
 int endLocalVariableEntry(java.lang.String id)
           
 ASM getASM()
           
 java.lang.String getContextSignature()
           
 java.util.List getInstructions()
           
 java.util.List getLineNumberTable()
           
 java.util.List getLocalVariableTable()
           
 java.lang.String getName()
           
protected static int getNbArgs(java.lang.String s)
           
protected static java.lang.String getOpName(java.lang.String s)
           
 java.util.List getParameters()
           
 java.lang.String getSignature()
           
 java.lang.String resolveLineNumber(int l)
           
 java.lang.String resolveVariableName(int slot, int l)
           
 void setContext(java.lang.String context)
           
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASMOperation

public ASMOperation(ASM asm,
                    java.lang.String name)
Method Detail

getName

public java.lang.String getName()

setContext

public void setContext(java.lang.String context)

getContextSignature

public java.lang.String getContextSignature()

addParameter

public void addParameter(ASMParameter parameter)

getParameters

public java.util.List getParameters()

addInstruction

public void addInstruction(ASMInstruction instruction)

addLabeledInstruction

public void addLabeledInstruction(ASMInstructionWithOperand instruction,
                                  java.lang.String labelName)

getInstructions

public java.util.List getInstructions()

addLabel

public void addLabel(java.lang.String labelName)

addVariableInstruction

public void addVariableInstruction(ASMInstructionWithOperand instruction,
                                   java.lang.String varId)

getSignature

public java.lang.String getSignature()

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getNbArgs

protected static int getNbArgs(java.lang.String s)

getOpName

protected static java.lang.String getOpName(java.lang.String s)

beginLineNumberEntry

public void beginLineNumberEntry(java.lang.String id)

endLineNumberEntry

public void endLineNumberEntry(java.lang.String id)

addLineNumberEntry

public void addLineNumberEntry(java.lang.String id,
                               int begin,
                               int end)

getLineNumberTable

public java.util.List getLineNumberTable()

resolveLineNumber

public java.lang.String resolveLineNumber(int l)

beginLocalVariableEntry

public int beginLocalVariableEntry(java.lang.String id,
                                   java.lang.String name)

endLocalVariableEntry

public int endLocalVariableEntry(java.lang.String id)

addLocalVariableEntry

public void addLocalVariableEntry(int slot,
                                  java.lang.String name,
                                  int begin,
                                  int end)

getLocalVariableTable

public java.util.List getLocalVariableTable()

resolveVariableName

public java.lang.String resolveVariableName(int slot,
                                            int l)

getASM

public ASM getASM()

Copyright 2007 IBM Corporation and others.
All Rights Reserved.