public final class LoopRegion extends ConditionRegion
| Constructor and Description |
|---|
LoopRegion(IRegion parent,
LoopInfo info,
@Nullable BlockNode header,
boolean reversed) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
baseString()
Unique id for use in 'toString()' method
|
boolean |
checkPreCondition()
Check if pre-conditions can be inlined into loop condition
|
void |
generate(RegionGen regionGen,
ICodeWriter code)
Dispatch to needed generate method in RegionGen
|
IRegion |
getBody() |
@Nullable BlockNode |
getHeader() |
LoopInfo |
getInfo() |
int |
getSourceLine() |
java.util.List<IContainer> |
getSubBlocks() |
LoopType |
getType() |
boolean |
isConditionAtEnd() |
boolean |
isEndless() |
void |
mergePreCondition()
Move all preCondition block instructions before conditionBlock instructions
|
boolean |
replaceSubBlock(IContainer oldBlock,
IContainer newBlock) |
void |
setBody(IRegion body) |
void |
setPreCondition(BlockNode preCondition)
Set instructions which must be executed before condition in every loop
|
void |
setType(LoopType type) |
java.lang.String |
toString() |
getCondition, getConditionBlocks, getConditionSourceLine, invertCondition, simplifyCondition, updateCondition, updateCondition, updateConditiongetParent, setParent, updateParentadd, addAttr, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrom, unloadAttributesclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAttr, addAttr, addAttrs, clearAttributes, contains, contains, copyAttributeFrom, copyAttributesFrom, get, getAll, getAnnotation, getAttributesString, getAttributesStringsList, isAttrStorageEmpty, remove, remove, removeAttr, rewriteAttributeFrompublic LoopInfo getInfo()
@Nullable public @Nullable BlockNode getHeader()
public boolean isEndless()
public IRegion getBody()
public void setBody(IRegion body)
public boolean isConditionAtEnd()
public void setPreCondition(BlockNode preCondition)
public boolean checkPreCondition()
public void mergePreCondition()
public int getSourceLine()
public LoopType getType()
public void setType(LoopType type)
public java.util.List<IContainer> getSubBlocks()
public boolean replaceSubBlock(IContainer oldBlock, IContainer newBlock)
replaceSubBlock in interface IRegionreplaceSubBlock in class AbstractRegionpublic void generate(RegionGen regionGen, ICodeWriter code) throws CodegenException
IContainerCodegenExceptionpublic java.lang.String baseString()
IContainerpublic java.lang.String toString()
toString in class java.lang.Object