public interface IrVisitor
extends ru.ispras.fortress.util.TreeVisitor
IrVisitor
interface is to be implemented by all visitor objects
applied to the IR of an ISA specification.Modifier and Type | Method and Description |
---|---|
void |
onAlternativeBegin(PrimitiveOR orRule,
Primitive item)
Notifies that visiting an item of an OR-rule has been started.
|
void |
onAlternativeEnd(PrimitiveOR orRule,
Primitive item)
Notifies that visiting an item of an OR-rule has been finished.
|
void |
onArgumentBegin(PrimitiveAND andRule,
java.lang.String argName,
Primitive argType)
Notifies that visiting an AND-rule argument has been started.
|
void |
onArgumentEnd(PrimitiveAND andRule,
java.lang.String argName,
Primitive argType)
Notifies that visiting an AND-rule argument has been finished.
|
void |
onAssignment(StatementAssignment stmt) |
void |
onAttributeBegin(PrimitiveAND andRule,
Attribute attr)
Notifies that visiting an attribute of an AND-rule has been started.
|
void |
onAttributeCallBegin(StatementAttributeCall stmt) |
void |
onAttributeCallEnd(StatementAttributeCall stmt) |
void |
onAttributeEnd(PrimitiveAND andRule,
Attribute attr)
Notifies that visiting an attribute of an AND-rule has been finished.
|
void |
onConditionBegin(StatementCondition stmt) |
void |
onConditionBlockBegin(ru.ispras.fortress.expression.Node condition) |
void |
onConditionBlockEnd(ru.ispras.fortress.expression.Node condition) |
void |
onConditionEnd(StatementCondition stmt) |
void |
onFormat(StatementFormat stmt) |
void |
onFunctionCall(StatementFunctionCall stmt) |
void |
onLetConstant(LetConstant let)
Notifies that a let construct describing a constant value has been visited.
|
void |
onLetLabel(LetLabel let)
Notifies that a let construct associates a symbolic name with a memory location
(in other words, establishes a label).
|
void |
onMemory(java.lang.String name,
MemoryExpr memory)
Notifies that a memory storage has been visited.
|
void |
onPrimitiveBegin(Primitive item)
Notifies that visiting a primitive (object describing a MODE or OP) has been started.
|
void |
onPrimitiveEnd(Primitive item)
Notifies that visiting a primitive has been finished.
|
void |
onPrimitivesBegin()
Notifies that visiting primitives (objects describing MODEs and OPs) has been started.
|
void |
onPrimitivesEnd()
Notifies that visiting primitives (objects describing MODEs and OPs) has been finished.
|
void |
onResourcesBegin()
Notifies that traversing the resource section has been started.
|
void |
onResourcesEnd()
Notifies that traversing the resource section has been finished.
|
void |
onShortcutBegin(PrimitiveAND andRule,
Shortcut shortcut)
Notifies that visiting a shortcut has been started.
|
void |
onShortcutEnd(PrimitiveAND andRule,
Shortcut shortcut)
Notifies that visiting a shortcut has been finished.
|
void |
onStatementBegin(PrimitiveAND andRule,
Attribute attr,
Statement stmt)
Notifies that visiting a statement (in an attribute) has been started.
|
void |
onStatementEnd(PrimitiveAND andRule,
Attribute attr,
Statement stmt)
Notifies that visiting a statement (in an attribute) has been finished.
|
void |
onType(java.lang.String name,
Type type)
Notifies that a type has been visited.
|
void |
setStatus(ru.ispras.fortress.util.TreeVisitor.Status status) |
void setStatus(ru.ispras.fortress.util.TreeVisitor.Status status)
void onResourcesBegin()
void onResourcesEnd()
void onLetConstant(LetConstant let)
let
- Object describing the constant.void onLetLabel(LetLabel let)
let
- Object describing the label associated with a memory location.void onType(java.lang.String name, Type type)
name
- Type name.type
- Type description.void onMemory(java.lang.String name, MemoryExpr memory)
name
- Memory storage name.memory
- Memory storage description.void onPrimitivesBegin()
void onPrimitivesEnd()
void onPrimitiveBegin(Primitive item)
item
- Primitive object describing a MODE or OP.void onPrimitiveEnd(Primitive item)
item
- Primitive object.void onAlternativeBegin(PrimitiveOR orRule, Primitive item)
orRule
- OR-rule description.item
- Item being visited.void onAlternativeEnd(PrimitiveOR orRule, Primitive item)
orRule
- OR-rule description.item
- Item being visited.void onArgumentBegin(PrimitiveAND andRule, java.lang.String argName, Primitive argType)
andRule
- AND-rule description.argName
- Argument name.argType
- Argument type description.void onArgumentEnd(PrimitiveAND andRule, java.lang.String argName, Primitive argType)
andRule
- AND-rule description.argName
- Argument name.argType
- Argument type description.void onAttributeBegin(PrimitiveAND andRule, Attribute attr)
andRule
- AND-rule description.attr
- Attribute description.void onAttributeEnd(PrimitiveAND andRule, Attribute attr)
andRule
- AND-rule description.attr
- Attribute description.void onStatementBegin(PrimitiveAND andRule, Attribute attr, Statement stmt)
andRule
- AND-rule that contains the statement.attr
- Attribute that contains the statement.stmt
- Statement description.void onStatementEnd(PrimitiveAND andRule, Attribute attr, Statement stmt)
andRule
- AND-rule that contains the statement.attr
- Attribute that contains the statement.stmt
- Statement description.void onShortcutBegin(PrimitiveAND andRule, Shortcut shortcut)
andRule
- AND-rule the shortcut refers to.shortcut
- Shortcut description.void onShortcutEnd(PrimitiveAND andRule, Shortcut shortcut)
andRule
- AND-rule the shortcut refers to.shortcut
- Shortcut description.void onAssignment(StatementAssignment stmt)
void onFormat(StatementFormat stmt)
void onFunctionCall(StatementFunctionCall stmt)
void onAttributeCallBegin(StatementAttributeCall stmt)
void onAttributeCallEnd(StatementAttributeCall stmt)
void onConditionBegin(StatementCondition stmt)
void onConditionEnd(StatementCondition stmt)
void onConditionBlockBegin(ru.ispras.fortress.expression.Node condition)
void onConditionBlockEnd(ru.ispras.fortress.expression.Node condition)