Class CodeBlockImpl

java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.m2m.atl.emftvm.impl.CodeBlockImpl
All Implemented Interfaces:
org.eclipse.emf.common.notify.Notifier, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, CodeBlock
Direct Known Subclasses:
NativeCodeBlock

public class CodeBlockImpl extends org.eclipse.emf.ecore.impl.EObjectImpl implements CodeBlock
An implementation of the model object 'Code Block'.
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

    org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolder, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderBaseImpl, org.eclipse.emf.ecore.impl.BasicEObjectImpl.EPropertiesHolderImpl

    Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

    org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList

    Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject

    org.eclipse.emf.ecore.InternalEObject.EStore
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected org.eclipse.emf.common.util.EList<Instruction>
    The cached value of the 'Code' containment reference list.
    protected static final org.eclipse.emf.ecore.EClass
    Singleton instance of the ExecEnv EClass.
    protected org.eclipse.emf.common.util.EList<LineNumber>
    The cached value of the 'Line Numbers' containment reference list.
    protected org.eclipse.emf.common.util.EList<LocalVariable>
    The cached value of the 'Local Variables' containment reference list.
    protected static final int
    The default value of the 'Max Locals' attribute.
    protected static final int
    The default value of the 'Max Stack' attribute.
    protected int
    The cached value of the 'Max Locals' attribute.
    protected int
    The cached value of the 'Max Stack' attribute.
    protected org.eclipse.emf.common.util.EList<CodeBlock>
    The cached value of the 'Nested' containment reference list.
    protected static final StackFrame
    The default value of the 'Parent Frame' attribute.
    The cached value of the 'Parent Frame' attribute.

    Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

    eAdapters, eContainer, eContainerFeatureID, EDELIVER, EDYNAMIC_CLASS, eFlags, ELAST_EOBJECT_FLAG, ELAST_NOTIFIER_FLAG, eProperties, EPROXY

    Fields inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

    EVIRTUAL_GET, EVIRTUAL_IS_SET, EVIRTUAL_NO_VALUE, EVIRTUAL_SET, EVIRTUAL_UNSET

    Fields inherited from interface org.eclipse.emf.ecore.InternalEObject

    EOPPOSITE_FEATURE_BASE
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Creates a new CodeBlockImpl.
  • Method Summary

    Modifier and Type
    Method
    Description
    org.eclipse.emf.common.notify.NotificationChain
    basicSetApplierFor(Rule newApplierFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetBindingFor(InputRuleElement newBindingFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetBodyFor(Operation newBodyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetInitialiserFor(Field newInitialiserFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetMatcherFor(Rule newMatcherFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetNestedFor(CodeBlock newNestedFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    basicSetPostApplyFor(Rule newPostApplyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    eBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs)
    eGet(int featureID, boolean resolve, boolean coreType)
    org.eclipse.emf.common.notify.NotificationChain
    eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
    org.eclipse.emf.common.notify.NotificationChain
    eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
    boolean
    eIsSet(int featureID)
    boolean
    void
    eNotify(org.eclipse.emf.common.notify.Notification notification)
    void
    eSet(int featureID, Object newValue)
    protected org.eclipse.emf.ecore.EClass
    Returns the EClass that correspond to this metaclass.
    void
    eUnset(int featureID)
    Executes the instructions in this CodeBlock, using the parameters stored in frame.
    org.eclipse.emf.common.util.EList<Instruction>
    Collects the transitive closure of predecessor instructions for i.
    Returns the value of the 'Applier For' container reference.
    Returns the Module (for debugger).
    Returns the value of the 'Binding For' container reference.
    Returns the value of the 'Body For' container reference.
    org.eclipse.emf.common.util.EList<Instruction>
    Returns the value of the 'Code' containment reference list.
    Returns the Field that (indirectly) contains this CodeBlock, if any.
    Returns the value of the 'Initialiser For' container reference.
    Returns the compiled JITCodeBlock, if any.
    org.eclipse.emf.common.util.EList<LineNumber>
    Returns the value of the 'Line Numbers' containment reference list.
    org.eclipse.emf.common.util.EList<LocalVariable>
    Returns the value of the 'Local Variables' containment reference list.
    Returns the value of the 'Matcher For' container reference.
    int
    Returns the value of the 'Max Locals' attribute.
    int
    Returns the value of the 'Max Stack' attribute.
    Returns the Module that (indirectly) contains this CodeBlock.
    org.eclipse.emf.common.util.EList<CodeBlock>
    Returns the value of the 'Nested' containment reference list.
    Returns the value of the 'Nested For' container reference.
    org.eclipse.emf.common.util.EList<Instruction>
    Collects the direct predecessor instructions for i that do not contain i in their transitive closure of predecessors.
    Returns the Operation that (indirectly) contains this CodeBlock, if any.
    Returns the value of the 'Parent Frame' attribute.
    Returns the value of the 'Post Apply For' container reference.
    org.eclipse.emf.common.util.EList<Instruction>
    Collects the direct predecessor instructions for i.
    Finds the the Rule that contains this codeblock.
    int
    Calculates the amount of elements on the stack after executing this CodeBlock.
    void
    setApplierFor(Rule newApplierFor)
    Sets the value of the 'Applier For' container reference.
    void
    Sets the value of the 'Binding For' container reference.
    void
    setBodyFor(Operation newBodyFor)
    Sets the value of the 'Body For' container reference.
    void
    setInitialiserFor(Field newInitialiserFor)
    Sets the value of the 'Initialiser For' container reference.
    void
    Sets the compiled JITCodeBlock.
    void
    setMatcherFor(Rule newMatcherFor)
    Sets the value of the 'Matcher For' container reference.
    void
    setMaxLocals(int newMaxLocals)
    Sets the value of the 'Max Locals' attribute.
    void
    setMaxStack(int newMaxStack)
    Sets the value of the 'Max Stack' attribute.
    void
    setNestedFor(CodeBlock newNestedFor)
    Sets the value of the 'Nested For' container reference.
    void
    setParentFrame(StackFrame newParentFrame)
    Sets the value of the 'Parent Frame' attribute.
    void
    setPostApplyFor(Rule newPostApplyFor)
    Sets the value of the 'Post Apply For' container reference.

    Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

    eAdapters, eBasicAdapters, eBasicProperties, eBasicSetContainer, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eProperties, eSetClass, eSetDeliver, eSetProxyURI

    Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

    eAddVirtualValue, eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eComputeVirtualValuesCapacity, eContainer, eContainerAdapterArray, eContainingFeature, eContainmentFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicClass, eDynamicFeature, eDynamicFeatureID, eDynamicGet, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInverseRemove, eDynamicInvoke, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eHasSettings, eInternalResource, eInverseAdd, eInverseRemove, eInvocationDelegate, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eRemoveVirtualValue, eResolveProxy, eResource, eSet, eSetDirectResource, eSetResource, eSetStore, eSetting, eSettingDelegate, eSettings, eSetVirtualIndexBits, eSetVirtualValue, eSetVirtualValues, eStaticFeatureCount, eStaticOperationCount, eStore, eUnset, eURIFragmentSegment, eVirtualBitCount, eVirtualGet, eVirtualGet, eVirtualIndex, eVirtualIndexBits, eVirtualIsSet, eVirtualSet, eVirtualUnset, eVirtualValue, eVirtualValues

    Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

    eBasicAdapterArray, eBasicHasAdapters

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.emf.ecore.EObject

    eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset

    Methods inherited from interface org.eclipse.emf.common.notify.Notifier

    eAdapters, eDeliver, eSetDeliver
  • Field Details

  • Constructor Details

    • CodeBlockImpl

      protected CodeBlockImpl()
      Creates a new CodeBlockImpl.
  • Method Details

    • eStaticClass

      protected org.eclipse.emf.ecore.EClass eStaticClass()
      Returns the EClass that correspond to this metaclass.
      Overrides:
      eStaticClass in class org.eclipse.emf.ecore.impl.EObjectImpl
      Returns:
      the EClass that correspond to this metaclass.
    • getMaxLocals

      public int getMaxLocals()
      Returns the value of the 'Max Locals' attribute. The default value is "-1".

      Represents the amount of local variables slots required. This value is derived automatically from the list of instructions.

      Specified by:
      getMaxLocals in interface CodeBlock
      Returns:
      the value of the 'Max Locals' attribute.
      See Also:
    • setMaxLocals

      public void setMaxLocals(int newMaxLocals)
      Sets the value of the 'Max Locals' attribute.

      Represents the amount of local variables slots required. This value is derived automatically from the list of instructions.

      Specified by:
      setMaxLocals in interface CodeBlock
      Parameters:
      newMaxLocals - the new value of the 'Max Locals' attribute.
      See Also:
    • getMaxStack

      public int getMaxStack()
      Returns the value of the 'Max Stack' attribute. The default value is "-1".

      Represents the amount of stack slots required. This value is derived automatically from the list of instructions.

      Specified by:
      getMaxStack in interface CodeBlock
      Returns:
      the value of the 'Max Stack' attribute.
      See Also:
    • setMaxStack

      public void setMaxStack(int newMaxStack)
      Sets the value of the 'Max Stack' attribute.

      Represents the amount of stack slots required. This value is derived automatically from the list of instructions.

      Specified by:
      setMaxStack in interface CodeBlock
      Parameters:
      newMaxStack - the new value of the 'Max Stack' attribute.
      See Also:
    • getCode

      public org.eclipse.emf.common.util.EList<Instruction> getCode()
      Returns the value of the 'Code' containment reference list. The list contents are of type Instruction. It is bidirectional and its opposite is 'Owning Block'.

      Represents the list of instructions to execute.

      Specified by:
      getCode in interface CodeBlock
      Returns:
      the value of the 'Code' containment reference list.
      See Also:
    • getLineNumbers

      public org.eclipse.emf.common.util.EList<LineNumber> getLineNumbers()
      Returns the value of the 'Line Numbers' containment reference list. The list contents are of type LineNumber. It is bidirectional and its opposite is 'Owning Block'.

      Represents the line number information elements for this code block's instructions.

      Specified by:
      getLineNumbers in interface CodeBlock
      Returns:
      the value of the 'Line Numbers' containment reference list.
      See Also:
    • getLocalVariables

      public org.eclipse.emf.common.util.EList<LocalVariable> getLocalVariables()
      Returns the value of the 'Local Variables' containment reference list. The list contents are of type LocalVariable. It is bidirectional and its opposite is 'Owning Block'.

      Represents the local variable information elements for this code block. This information is used to calculate 'Max Locals' and local variable slot assignment for the instructions of this code block. The actual local variables are stored in StackFrames.

      Specified by:
      getLocalVariables in interface CodeBlock
      Returns:
      the value of the 'Local Variables' containment reference list.
      See Also:
    • getMatcherFor

      public Rule getMatcherFor()
      Returns the value of the 'Matcher For' container reference. It is bidirectional and its opposite is 'Matcher'.

      This reference is set if this code block serves as a 'Matcher' code block for a Rule.

      Specified by:
      getMatcherFor in interface CodeBlock
      Returns:
      the value of the 'Matcher For' container reference.
      See Also:
    • basicSetMatcherFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetMatcherFor(Rule newMatcherFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setMatcherFor

      public void setMatcherFor(Rule newMatcherFor)
      Sets the value of the 'Matcher For' container reference. This reference is set if this code block serves as a 'Matcher' code block for a Rule.
      Specified by:
      setMatcherFor in interface CodeBlock
      Parameters:
      newMatcherFor - the new value of the 'Matcher For' container reference.
      See Also:
    • getApplierFor

      public Rule getApplierFor()
      Returns the value of the 'Applier For' container reference. It is bidirectional and its opposite is 'Applier'.

      This reference is set if this code block serves as an 'Applier' code block for a Rule.

      Specified by:
      getApplierFor in interface CodeBlock
      Returns:
      the value of the 'Applier For' container reference.
      See Also:
    • basicSetApplierFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetApplierFor(Rule newApplierFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setApplierFor

      public void setApplierFor(Rule newApplierFor)
      Sets the value of the 'Applier For' container reference.

      This reference is set if this code block serves as an 'Applier' code block for a Rule.

      Specified by:
      setApplierFor in interface CodeBlock
      Parameters:
      newApplierFor - the new value of the 'Applier For' container reference.
      See Also:
    • getPostApplyFor

      public Rule getPostApplyFor()
      Returns the value of the 'Post Apply For' container reference. It is bidirectional and its opposite is 'Post Apply'.

      This reference is set if this code block serves as a 'Post Apply' code block for a Rule.

      Specified by:
      getPostApplyFor in interface CodeBlock
      Returns:
      the value of the 'Post Apply For' container reference.
      See Also:
    • basicSetPostApplyFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetPostApplyFor(Rule newPostApplyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setPostApplyFor

      public void setPostApplyFor(Rule newPostApplyFor)
      Sets the value of the 'Post Apply For' container reference.

      This reference is set if this code block serves as a 'Post Apply' code block for a Rule.

      Specified by:
      setPostApplyFor in interface CodeBlock
      Parameters:
      newPostApplyFor - the new value of the 'Post Apply For' container reference.
      See Also:
    • getBodyFor

      public Operation getBodyFor()
      Returns the value of the 'Body For' container reference. It is bidirectional and its opposite is 'Body'.

      This reference is set if this code block serves as a 'Body' code block for an Operation.

      Specified by:
      getBodyFor in interface CodeBlock
      Returns:
      the value of the 'Body For' container reference.
      See Also:
    • basicSetBodyFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetBodyFor(Operation newBodyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setBodyFor

      public void setBodyFor(Operation newBodyFor)
      Sets the value of the 'Body For' container reference.

      This reference is set if this code block serves as a 'Body' code block for an Operation.

      Specified by:
      setBodyFor in interface CodeBlock
      Parameters:
      newBodyFor - the new value of the 'Body For' container reference.
      See Also:
    • getInitialiserFor

      public Field getInitialiserFor()
      Returns the value of the 'Initialiser For' container reference. It is bidirectional and its opposite is 'Initialiser'.

      This reference is set if this code block serves as an 'Initialiser' code block for a Field.

      Specified by:
      getInitialiserFor in interface CodeBlock
      Returns:
      the value of the 'Initialiser For' container reference.
      See Also:
    • basicSetInitialiserFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetInitialiserFor(Field newInitialiserFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setInitialiserFor

      public void setInitialiserFor(Field newInitialiserFor)
      Sets the value of the 'Initialiser For' container reference.

      This reference is set if this code block serves as an 'Initialiser' code block for a Field.

      Specified by:
      setInitialiserFor in interface CodeBlock
      Parameters:
      newInitialiserFor - the new value of the 'Initialiser For' container reference.
      See Also:
    • getNested

      public org.eclipse.emf.common.util.EList<CodeBlock> getNested()
      Returns the value of the 'Nested' containment reference list. The list contents are of type CodeBlock. It is bidirectional and its opposite is 'Nested For'.

      Represents the list of nested code blocks (i.e. closures).

      Specified by:
      getNested in interface CodeBlock
      Returns:
      the value of the 'Nested' containment reference list.
      See Also:
    • getNestedFor

      public CodeBlock getNestedFor()
      Returns the value of the 'Nested For' container reference. It is bidirectional and its opposite is 'Nested'.

      This reference is set if this code block serves as a 'Nested' code block (i.e. closure) for a parent CodeBlock.

      Specified by:
      getNestedFor in interface CodeBlock
      Returns:
      the value of the 'Nested For' container reference.
      See Also:
    • basicSetNestedFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetNestedFor(CodeBlock newNestedFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setNestedFor

      public void setNestedFor(CodeBlock newNestedFor)
      Sets the value of the 'Nested For' container reference.

      This reference is set if this code block serves as a 'Nested' code block (i.e. closure) for a parent CodeBlock.

      Specified by:
      setNestedFor in interface CodeBlock
      Parameters:
      newNestedFor - the new value of the 'Nested For' container reference.
      See Also:
    • getParentFrame

      public StackFrame getParentFrame()
      Returns the value of the 'Parent Frame' attribute.

      Represents a placeholder for the StackFrame of the invoking native Java method, and allows re-entry into the EMFTVM (with access to lexically scoped local variables, etc.).

      Stack frames are stored per thread, which enables the concurrent execution of code blocks.

      Specified by:
      getParentFrame in interface CodeBlock
      Returns:
      the value of the 'Parent Frame' attribute.
      See Also:
    • setParentFrame

      public void setParentFrame(StackFrame newParentFrame)
      Sets the value of the 'Parent Frame' attribute.

      Represents a placeholder for the StackFrame of the invoking native Java method, and allows re-entry into the EMFTVM (with access to lexically scoped local variables, etc.).

      Stack frames are stored per thread, which enables the concurrent execution of code blocks.

      Specified by:
      setParentFrame in interface CodeBlock
      Parameters:
      newParentFrame - the new value of the 'Parent Frame' attribute.
      See Also:
    • getBindingFor

      public InputRuleElement getBindingFor()
      Returns the value of the 'Binding For' container reference. It is bidirectional and its opposite is 'Binding'.

      This reference is set if this code block serves as a 'Binding' code block for a rule's InputRuleElement. Bindings allow for the EMFTVM Matcher to implement a search plan strategy.

      Specified by:
      getBindingFor in interface CodeBlock
      Returns:
      the value of the 'Binding For' container reference.
      See Also:
    • basicSetBindingFor

      public org.eclipse.emf.common.notify.NotificationChain basicSetBindingFor(InputRuleElement newBindingFor, org.eclipse.emf.common.notify.NotificationChain msgs)
      See Also:
    • setBindingFor

      public void setBindingFor(InputRuleElement newBindingFor)
      Sets the value of the 'Binding For' container reference.

      This reference is set if this code block serves as a 'Binding' code block for a rule's InputRuleElement. Bindings allow for the EMFTVM Matcher to implement a search plan strategy.

      Specified by:
      setBindingFor in interface CodeBlock
      Parameters:
      newBindingFor - the new value of the 'Binding For' container reference.
      See Also:
    • execute

      public Object execute(StackFrame frame)
      Executes the instructions in this CodeBlock, using the parameters stored in frame.
      Specified by:
      execute in interface CodeBlock
      Parameters:
      frame - the StackFrame to use during execution.
      Returns:
      the return value.
      See Also:
    • getStackLevel

      public int getStackLevel()
      Calculates the amount of elements on the stack after executing this CodeBlock.
      Specified by:
      getStackLevel in interface CodeBlock
      Returns:
      the amount of elements on the stack after executing this CodeBlock.
    • getModule

      public Module getModule()
      Returns the Module that (indirectly) contains this CodeBlock.
      Specified by:
      getModule in interface CodeBlock
      Returns:
      the Module that (indirectly) contains this CodeBlock.
    • getOperation

      public Operation getOperation()
      Returns the Operation that (indirectly) contains this CodeBlock, if any.
      Specified by:
      getOperation in interface CodeBlock
      Returns:
      the Operation that (indirectly) contains this CodeBlock, or null
    • getField

      public Field getField()
      Returns the Field that (indirectly) contains this CodeBlock, if any.
      Specified by:
      getField in interface CodeBlock
      Returns:
      the Field that (indirectly) contains this CodeBlock, or null
    • getPredecessors

      public org.eclipse.emf.common.util.EList<Instruction> getPredecessors(Instruction i)
      Collects the direct predecessor instructions for i.
      Specified by:
      getPredecessors in interface CodeBlock
      Parameters:
      i - the instruction to collect the predecessors for.
      Returns:
      the direct predecessor instructions for i.
    • getAllPredecessors

      public org.eclipse.emf.common.util.EList<Instruction> getAllPredecessors(Instruction i)
      Collects the transitive closure of predecessor instructions for i.
      Specified by:
      getAllPredecessors in interface CodeBlock
      Parameters:
      i - the instruction to collect the predecessors for.
      Returns:
      the transitive closure of predecessor instructions for i.
    • getNonLoopingPredecessors

      public org.eclipse.emf.common.util.EList<Instruction> getNonLoopingPredecessors(Instruction i)
      Collects the direct predecessor instructions for i that do not contain i in their transitive closure of predecessors.
      Specified by:
      getNonLoopingPredecessors in interface CodeBlock
      Parameters:
      i - the instruction to collect the predecessors for.
      Returns:
      the non-looping predecessor instructions for i.
    • eInverseAdd

      public org.eclipse.emf.common.notify.NotificationChain eInverseAdd(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
      Overrides:
      eInverseAdd in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eInverseRemove

      public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)
      Overrides:
      eInverseRemove in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eBasicRemoveFromContainerFeature

      public org.eclipse.emf.common.notify.NotificationChain eBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs)
      Overrides:
      eBasicRemoveFromContainerFeature in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eGet

      public Object eGet(int featureID, boolean resolve, boolean coreType)
      Specified by:
      eGet in interface org.eclipse.emf.ecore.InternalEObject
      Overrides:
      eGet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eSet

      public void eSet(int featureID, Object newValue)
      Specified by:
      eSet in interface org.eclipse.emf.ecore.InternalEObject
      Overrides:
      eSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eUnset

      public void eUnset(int featureID)
      Specified by:
      eUnset in interface org.eclipse.emf.ecore.InternalEObject
      Overrides:
      eUnset in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eIsSet

      public boolean eIsSet(int featureID)
      Specified by:
      eIsSet in interface org.eclipse.emf.ecore.InternalEObject
      Overrides:
      eIsSet in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • eNotify

      public void eNotify(org.eclipse.emf.common.notify.Notification notification)
      Specified by:
      eNotify in interface org.eclipse.emf.common.notify.Notifier
      Overrides:
      eNotify in class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
    • eNotificationRequired

      public boolean eNotificationRequired()
      Specified by:
      eNotificationRequired in interface org.eclipse.emf.ecore.InternalEObject
      Overrides:
      eNotificationRequired in class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
    • toString

      public String toString()
      Overrides:
      toString in class org.eclipse.emf.ecore.impl.BasicEObjectImpl
    • getJITCodeBlock

      public JITCodeBlock getJITCodeBlock()
      Returns the compiled JITCodeBlock, if any.
      Specified by:
      getJITCodeBlock in interface CodeBlock
      Returns:
      the compiled JITCodeBlock, or null
    • setJITCodeBlock

      public void setJITCodeBlock(JITCodeBlock jcb)
      Sets the compiled JITCodeBlock.
      Specified by:
      setJITCodeBlock in interface CodeBlock
      Parameters:
      jcb - the compiled JITCodeBlock
    • getASM

      public Module getASM()
      Returns the Module (for debugger).
      Returns:
      the Module
      See Also:
    • getRule

      public Rule getRule()
      Finds the the Rule that contains this codeblock.
      Specified by:
      getRule in interface CodeBlock
      Returns:
      the Rule that contains this codeblock, or null if not contained by a Rule.