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 java.lang.Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList
-
-
Field Summary
Fields Modifier and Type Field Description protected org.eclipse.emf.common.util.EList<Instruction>
code
The cached value of the 'Code
' containment reference list.protected static org.eclipse.emf.ecore.EClass
EXEC_ENV
Singleton instance of theExecEnv
EClass
.protected org.eclipse.emf.common.util.EList<LineNumber>
lineNumbers
The cached value of the 'Line Numbers
' containment reference list.protected org.eclipse.emf.common.util.EList<LocalVariable>
localVariables
The cached value of the 'Local Variables
' containment reference list.protected static int
MAX_LOCALS_EDEFAULT
The default value of the 'Max Locals
' attribute.protected static int
MAX_STACK_EDEFAULT
The default value of the 'Max Stack
' attribute.protected int
maxLocals
The cached value of the 'Max Locals
' attribute.protected int
maxStack
The cached value of the 'Max Stack
' attribute.protected org.eclipse.emf.common.util.EList<CodeBlock>
nested
The cached value of the 'Nested
' containment reference list.protected static StackFrame
PARENT_FRAME_EDEFAULT
The default value of the 'Parent Frame
' attribute.protected java.lang.ThreadLocal<StackFrame>
parentFrame
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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
CodeBlockImpl()
Creates a newCodeBlockImpl
.
-
Method Summary
All Methods Instance Methods Concrete Methods 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)
java.lang.Object
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
eNotificationRequired()
void
eNotify(org.eclipse.emf.common.notify.Notification notification)
void
eSet(int featureID, java.lang.Object newValue)
protected org.eclipse.emf.ecore.EClass
eStaticClass()
Returns theEClass
that correspond to this metaclass.void
eUnset(int featureID)
java.lang.Object
execute(StackFrame frame)
Executes the instructions in thisCodeBlock
, using the parameters stored inframe
.org.eclipse.emf.common.util.EList<Instruction>
getAllPredecessors(Instruction i)
Collects the transitive closure of predecessor instructions fori
.Rule
getApplierFor()
Returns the value of the 'Applier For' container reference.Module
getASM()
Returns theModule
(for debugger).InputRuleElement
getBindingFor()
Returns the value of the 'Binding For' container reference.Operation
getBodyFor()
Returns the value of the 'Body For' container reference.org.eclipse.emf.common.util.EList<Instruction>
getCode()
Returns the value of the 'Code' containment reference list.Field
getField()
Field
getInitialiserFor()
Returns the value of the 'Initialiser For' container reference.JITCodeBlock
getJITCodeBlock()
Returns the compiledJITCodeBlock
, if any.org.eclipse.emf.common.util.EList<LineNumber>
getLineNumbers()
Returns the value of the 'Line Numbers' containment reference list.org.eclipse.emf.common.util.EList<LocalVariable>
getLocalVariables()
Returns the value of the 'Local Variables' containment reference list.Rule
getMatcherFor()
Returns the value of the 'Matcher For' container reference.int
getMaxLocals()
Returns the value of the 'Max Locals' attribute.int
getMaxStack()
Returns the value of the 'Max Stack' attribute.Module
getModule()
org.eclipse.emf.common.util.EList<CodeBlock>
getNested()
Returns the value of the 'Nested' containment reference list.CodeBlock
getNestedFor()
Returns the value of the 'Nested For' container reference.org.eclipse.emf.common.util.EList<Instruction>
getNonLoopingPredecessors(Instruction i)
Collects the direct predecessor instructions fori
that do not containi
in their transitive closure of predecessors.Operation
getOperation()
StackFrame
getParentFrame()
Returns the value of the 'Parent Frame' attribute.Rule
getPostApplyFor()
Returns the value of the 'Post Apply For' container reference.org.eclipse.emf.common.util.EList<Instruction>
getPredecessors(Instruction i)
Collects the direct predecessor instructions fori
.Rule
getRule()
Finds the theRule
that contains this codeblock.int
getStackLevel()
Calculates the amount of elements on the stack after executing thisCodeBlock
.void
setApplierFor(Rule newApplierFor)
Sets the value of the 'Applier For
' container reference.void
setBindingFor(InputRuleElement newBindingFor)
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
setJITCodeBlock(JITCodeBlock jcb)
Sets the compiledJITCodeBlock
.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.java.lang.String
toString()
-
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
-
-
-
-
Field Detail
-
MAX_LOCALS_EDEFAULT
protected static final int MAX_LOCALS_EDEFAULT
The default value of the 'Max Locals
' attribute.- See Also:
getMaxLocals()
, Constant Field Values
-
MAX_STACK_EDEFAULT
protected static final int MAX_STACK_EDEFAULT
The default value of the 'Max Stack
' attribute.- See Also:
getMaxStack()
, Constant Field Values
-
maxLocals
protected int maxLocals
The cached value of the 'Max Locals
' attribute.- See Also:
getMaxLocals()
-
maxStack
protected int maxStack
The cached value of the 'Max Stack
' attribute.- See Also:
getMaxStack()
-
code
protected org.eclipse.emf.common.util.EList<Instruction> code
The cached value of the 'Code
' containment reference list.- See Also:
getCode()
-
lineNumbers
protected org.eclipse.emf.common.util.EList<LineNumber> lineNumbers
The cached value of the 'Line Numbers
' containment reference list.- See Also:
getLineNumbers()
-
localVariables
protected org.eclipse.emf.common.util.EList<LocalVariable> localVariables
The cached value of the 'Local Variables
' containment reference list.- See Also:
getLocalVariables()
-
nested
protected org.eclipse.emf.common.util.EList<CodeBlock> nested
The cached value of the 'Nested
' containment reference list.- See Also:
getNested()
-
PARENT_FRAME_EDEFAULT
protected static final StackFrame PARENT_FRAME_EDEFAULT
The default value of the 'Parent Frame
' attribute.- See Also:
getParentFrame()
-
parentFrame
protected java.lang.ThreadLocal<StackFrame> parentFrame
The cached value of the 'Parent Frame
' attribute.- See Also:
getParentFrame()
-
EXEC_ENV
protected static final org.eclipse.emf.ecore.EClass EXEC_ENV
Singleton instance of theExecEnv
EClass
.
-
-
Constructor Detail
-
CodeBlockImpl
protected CodeBlockImpl()
Creates a newCodeBlockImpl
.
-
-
Method Detail
-
eStaticClass
protected org.eclipse.emf.ecore.EClass eStaticClass()
Returns theEClass
that correspond to this metaclass.- Overrides:
eStaticClass
in classorg.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 interfaceCodeBlock
- Returns:
- the value of the 'Max Locals' attribute.
- See Also:
CodeBlock.setMaxLocals(int)
,EmftvmPackage.getCodeBlock_MaxLocals()
-
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 interfaceCodeBlock
- Parameters:
newMaxLocals
- the new value of the 'Max Locals' attribute.- See Also:
CodeBlock.getMaxLocals()
-
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 interfaceCodeBlock
- Returns:
- the value of the 'Max Stack' attribute.
- See Also:
CodeBlock.setMaxStack(int)
,EmftvmPackage.getCodeBlock_MaxStack()
-
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 interfaceCodeBlock
- Parameters:
newMaxStack
- the new value of the 'Max Stack' attribute.- See Also:
CodeBlock.getMaxStack()
-
getCode
public org.eclipse.emf.common.util.EList<Instruction> getCode()
Returns the value of the 'Code' containment reference list. The list contents are of typeInstruction
. It is bidirectional and its opposite is 'Owning Block
'.Represents the list of instructions to execute.
- Specified by:
getCode
in interfaceCodeBlock
- Returns:
- the value of the 'Code' containment reference list.
- See Also:
EmftvmPackage.getCodeBlock_Code()
,Instruction.getOwningBlock()
-
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 typeLineNumber
. 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 interfaceCodeBlock
- Returns:
- the value of the 'Line Numbers' containment reference list.
- See Also:
EmftvmPackage.getCodeBlock_LineNumbers()
,LineNumber.getOwningBlock()
-
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 typeLocalVariable
. 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 inStackFrame
s.- Specified by:
getLocalVariables
in interfaceCodeBlock
- Returns:
- the value of the 'Local Variables' containment reference list.
- See Also:
EmftvmPackage.getCodeBlock_LocalVariables()
,LocalVariable.getOwningBlock()
-
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 aRule
.- Specified by:
getMatcherFor
in interfaceCodeBlock
- Returns:
- the value of the 'Matcher For' container reference.
- See Also:
CodeBlock.setMatcherFor(Rule)
,EmftvmPackage.getCodeBlock_MatcherFor()
,Rule.getMatcher()
-
basicSetMatcherFor
public org.eclipse.emf.common.notify.NotificationChain basicSetMatcherFor(Rule newMatcherFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setMatcherFor(Rule)
-
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 aRule
.- Specified by:
setMatcherFor
in interfaceCodeBlock
- Parameters:
newMatcherFor
- the new value of the 'Matcher For' container reference.- See Also:
CodeBlock.getMatcherFor()
-
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 aRule
.- Specified by:
getApplierFor
in interfaceCodeBlock
- Returns:
- the value of the 'Applier For' container reference.
- See Also:
CodeBlock.setApplierFor(Rule)
,EmftvmPackage.getCodeBlock_ApplierFor()
,Rule.getApplier()
-
basicSetApplierFor
public org.eclipse.emf.common.notify.NotificationChain basicSetApplierFor(Rule newApplierFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setApplierFor(Rule)
-
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 aRule
.- Specified by:
setApplierFor
in interfaceCodeBlock
- Parameters:
newApplierFor
- the new value of the 'Applier For' container reference.- See Also:
CodeBlock.getApplierFor()
-
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 aRule
.- Specified by:
getPostApplyFor
in interfaceCodeBlock
- Returns:
- the value of the 'Post Apply For' container reference.
- See Also:
CodeBlock.setPostApplyFor(Rule)
,EmftvmPackage.getCodeBlock_PostApplyFor()
,Rule.getPostApply()
-
basicSetPostApplyFor
public org.eclipse.emf.common.notify.NotificationChain basicSetPostApplyFor(Rule newPostApplyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setPostApplyFor(Rule)
-
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 aRule
.- Specified by:
setPostApplyFor
in interfaceCodeBlock
- Parameters:
newPostApplyFor
- the new value of the 'Post Apply For' container reference.- See Also:
CodeBlock.getPostApplyFor()
-
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 anOperation
.- Specified by:
getBodyFor
in interfaceCodeBlock
- Returns:
- the value of the 'Body For' container reference.
- See Also:
CodeBlock.setBodyFor(Operation)
,EmftvmPackage.getCodeBlock_BodyFor()
,Operation.getBody()
-
basicSetBodyFor
public org.eclipse.emf.common.notify.NotificationChain basicSetBodyFor(Operation newBodyFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setBodyFor(Operation)
-
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 anOperation
.- Specified by:
setBodyFor
in interfaceCodeBlock
- Parameters:
newBodyFor
- the new value of the 'Body For' container reference.- See Also:
CodeBlock.getBodyFor()
-
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 aField
.- Specified by:
getInitialiserFor
in interfaceCodeBlock
- Returns:
- the value of the 'Initialiser For' container reference.
- See Also:
CodeBlock.setInitialiserFor(Field)
,EmftvmPackage.getCodeBlock_InitialiserFor()
,Field.getInitialiser()
-
basicSetInitialiserFor
public org.eclipse.emf.common.notify.NotificationChain basicSetInitialiserFor(Field newInitialiserFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setInitialiserFor(Field)
-
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 aField
.- Specified by:
setInitialiserFor
in interfaceCodeBlock
- Parameters:
newInitialiserFor
- the new value of the 'Initialiser For' container reference.- See Also:
CodeBlock.getInitialiserFor()
-
getNested
public org.eclipse.emf.common.util.EList<CodeBlock> getNested()
Returns the value of the 'Nested' containment reference list. The list contents are of typeCodeBlock
. It is bidirectional and its opposite is 'Nested For
'.Represents the list of nested code blocks (i.e. closures).
- Specified by:
getNested
in interfaceCodeBlock
- Returns:
- the value of the 'Nested' containment reference list.
- See Also:
EmftvmPackage.getCodeBlock_Nested()
,CodeBlock.getNestedFor()
-
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 parentCodeBlock
.- Specified by:
getNestedFor
in interfaceCodeBlock
- Returns:
- the value of the 'Nested For' container reference.
- See Also:
CodeBlock.setNestedFor(CodeBlock)
,EmftvmPackage.getCodeBlock_NestedFor()
,CodeBlock.getNested()
-
basicSetNestedFor
public org.eclipse.emf.common.notify.NotificationChain basicSetNestedFor(CodeBlock newNestedFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setNestedFor(CodeBlock)
-
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 parentCodeBlock
.- Specified by:
setNestedFor
in interfaceCodeBlock
- Parameters:
newNestedFor
- the new value of the 'Nested For' container reference.- See Also:
CodeBlock.getNestedFor()
-
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 interfaceCodeBlock
- Returns:
- the value of the 'Parent Frame' attribute.
- See Also:
CodeBlock.setParentFrame(StackFrame)
,EmftvmPackage.getCodeBlock_ParentFrame()
-
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 interfaceCodeBlock
- Parameters:
newParentFrame
- the new value of the 'Parent Frame' attribute.- See Also:
CodeBlock.getParentFrame()
-
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'sInputRuleElement
. Bindings allow for the EMFTVMMatcher
to implement a search plan strategy.- Specified by:
getBindingFor
in interfaceCodeBlock
- Returns:
- the value of the 'Binding For' container reference.
- See Also:
CodeBlock.setBindingFor(InputRuleElement)
,EmftvmPackage.getCodeBlock_BindingFor()
,InputRuleElement.getBinding()
-
basicSetBindingFor
public org.eclipse.emf.common.notify.NotificationChain basicSetBindingFor(InputRuleElement newBindingFor, org.eclipse.emf.common.notify.NotificationChain msgs)
- See Also:
setBindingFor(InputRuleElement)
-
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'sInputRuleElement
. Bindings allow for the EMFTVMMatcher
to implement a search plan strategy.- Specified by:
setBindingFor
in interfaceCodeBlock
- Parameters:
newBindingFor
- the new value of the 'Binding For' container reference.- See Also:
CodeBlock.getBindingFor()
-
execute
public java.lang.Object execute(StackFrame frame)
Executes the instructions in thisCodeBlock
, using the parameters stored inframe
.- Specified by:
execute
in interfaceCodeBlock
- Parameters:
frame
- theStackFrame
to use during execution.- Returns:
- the return value.
- See Also:
CodeBlock.execute(StackFrame)
-
getStackLevel
public int getStackLevel()
Calculates the amount of elements on the stack after executing thisCodeBlock
.- Specified by:
getStackLevel
in interfaceCodeBlock
- Returns:
- the amount of elements on the stack after executing this
CodeBlock
.
-
getModule
public Module getModule()
-
getOperation
public Operation getOperation()
- Specified by:
getOperation
in interfaceCodeBlock
- Returns:
- the
Operation
that (indirectly) contains thisCodeBlock
, ornull
-
getField
public Field getField()
-
getPredecessors
public org.eclipse.emf.common.util.EList<Instruction> getPredecessors(Instruction i)
Collects the direct predecessor instructions fori
.- Specified by:
getPredecessors
in interfaceCodeBlock
- 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 fori
.- Specified by:
getAllPredecessors
in interfaceCodeBlock
- 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 fori
that do not containi
in their transitive closure of predecessors.- Specified by:
getNonLoopingPredecessors
in interfaceCodeBlock
- 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 classorg.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 classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eBasicRemoveFromContainerFeature
public org.eclipse.emf.common.notify.NotificationChain eBasicRemoveFromContainerFeature(org.eclipse.emf.common.notify.NotificationChain msgs)
- Overrides:
eBasicRemoveFromContainerFeature
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eGet
public java.lang.Object eGet(int featureID, boolean resolve, boolean coreType)
- Specified by:
eGet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eGet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eSet
public void eSet(int featureID, java.lang.Object newValue)
- Specified by:
eSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eSet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eUnset
public void eUnset(int featureID)
- Specified by:
eUnset
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eUnset
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eIsSet
public boolean eIsSet(int featureID)
- Specified by:
eIsSet
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eIsSet
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
eNotify
public void eNotify(org.eclipse.emf.common.notify.Notification notification)
- Specified by:
eNotify
in interfaceorg.eclipse.emf.common.notify.Notifier
- Overrides:
eNotify
in classorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
-
eNotificationRequired
public boolean eNotificationRequired()
- Specified by:
eNotificationRequired
in interfaceorg.eclipse.emf.ecore.InternalEObject
- Overrides:
eNotificationRequired
in classorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
-
toString
public java.lang.String toString()
- Overrides:
toString
in classorg.eclipse.emf.ecore.impl.BasicEObjectImpl
-
getJITCodeBlock
public JITCodeBlock getJITCodeBlock()
Returns the compiledJITCodeBlock
, if any.- Specified by:
getJITCodeBlock
in interfaceCodeBlock
- Returns:
- the compiled
JITCodeBlock
, ornull
-
setJITCodeBlock
public void setJITCodeBlock(JITCodeBlock jcb)
Sets the compiledJITCodeBlock
.- Specified by:
setJITCodeBlock
in interfaceCodeBlock
- Parameters:
jcb
- the compiledJITCodeBlock
-
getASM
public Module getASM()
Returns theModule
(for debugger).- Returns:
- the
Module
- See Also:
getModule()
-
-