PostOrderNode
/**
* Most of Expression and part of Statement nodes are post order nodes,
* the visit order of PostOrderNode is that:
* 1. visit it's child, ordered by child index
* 2. visit node itself
*
* PostOrderNode consist of AST nodes with the following properties:
* 1. the visit order of node's immediate children is sequential
* 2. the control flow edge label between node's immdediate children
* only contain NormalCompletion
*
* This is a convenient way to model a node, if the node can be treat as
* PostOrderNode; the necessory control flow information including first,
* last and successor are generated automatically.
*/
Inherit from ControlFlowNode
Primary key: id: int
schema PostOrderNode extends ControlFlowNode {
@primary id: int
}
PostOrderNode::getRelativePath
/**
* Get the relative path of this control flow node.
*/
- Parameter
self
:PostOrderNode
- Return
string
pub fn getRelativePath(self: PostOrderNode) -> string;
PostOrderNode::getAPredecessor
/**
* Get an immediate predecessor of this node.
*/
- Parameter
self
:PostOrderNode
- Return
*ControlFlowNode
pub fn getAPredecessor(self: PostOrderNode) -> *ControlFlowNode;
PostOrderNode::getChildNode
/**
* Gets child node with index, start from 0.
*/
- Parameter
self
:PostOrderNode
- Parameter
index
:int
- Return
ControlFlowNode
pub fn getChildNode(self: PostOrderNode, index: int) -> ControlFlowNode;
PostOrderNode::getPredecessorCount
/**
* Get the count of immediate predecessor nodes/
*/
- Parameter
self
:PostOrderNode
- Return
int
pub fn getPredecessorCount(self: PostOrderNode) -> int;
PostOrderNode::mayCompleteNormally
/**
* Holds whether this node can finish with a normalCompletion.
*/
- Parameter
self
:PostOrderNode
- Return
bool
pub fn mayCompleteNormally(self: PostOrderNode) -> bool;
PostOrderNode::getChildCount
/**
* Gets the count of the children.
*/
- Parameter
self
:PostOrderNode
- Return
int
pub fn getChildCount(self: PostOrderNode) -> int;
PostOrderNode::getAllChild
- Parameter
self
:PostOrderNode
- Return
*ControlFlowNode
pub fn getAllChild(self: PostOrderNode) -> *ControlFlowNode;
PostOrderNode::firstChild
/**
* Gets the first child of this node.
*/
- Parameter
self
:PostOrderNode
- Return
ControlFlowNode
pub fn firstChild(self: PostOrderNode) -> ControlFlowNode;
PostOrderNode::getBasicBlock
/**
* Get the basic block that contains this node.
*/
- Parameter
self
:PostOrderNode
- Return
BasicBlock
pub fn getBasicBlock(self: PostOrderNode) -> BasicBlock;
PostOrderNode::isAstNode
- Parameter
self
:PostOrderNode
- Return
bool
pub fn isAstNode(self: PostOrderNode) -> bool;
PostOrderNode::getASuccessor
/**
* Get an immediate successor of this node.
*/
- Parameter
self
:PostOrderNode
- Return
*ControlFlowNode
pub fn getASuccessor(self: PostOrderNode) -> *ControlFlowNode;
PostOrderNode::__all__
Data constraint method.
- Parameter
db
:JavascriptDB
- Return
*PostOrderNode
pub fn __all__(db: JavascriptDB) -> *PostOrderNode;
PostOrderNode::getLocation
/**
* Get the location of this control flow node.
*/
- Parameter
self
:PostOrderNode
- Return
Location
pub fn getLocation(self: PostOrderNode) -> Location;
PostOrderNode::isLeafNode
/**
* Hold whether this node is leaf node.
*/
- Parameter
self
:PostOrderNode
- Return
bool
pub fn isLeafNode(self: PostOrderNode) -> bool;
PostOrderNode::getSuccessorCount
/**
* Get the count of immediate successor nodes.
*/
- Parameter
self
:PostOrderNode
- Return
int
pub fn getSuccessorCount(self: PostOrderNode) -> int;
PostOrderNode::getASuccessorRecursive
/**
* Gets the successor of this node, and query successors recursively
*/
- Parameter
self
:PostOrderNode
- Return
*ControlFlowNode
pub fn getASuccessorRecursive(self: PostOrderNode) -> *ControlFlowNode;
PostOrderNode::getText
/**
* Get the text of this control flow node.
*/
- Parameter
self
:PostOrderNode
- Return
string
pub fn getText(self: PostOrderNode) -> string;
PostOrderNode::isEntryNode
- Parameter
self
:PostOrderNode
- Return
bool
pub fn isEntryNode(self: PostOrderNode) -> bool;
PostOrderNode::getASuccessorWithCompletion
/**
* Get an immediate successor of this node with the given
* type of Completion.
*/
- Parameter
self
:PostOrderNode
- Parameter
c
:Completion
- Return
*ControlFlowNode
pub fn getASuccessorWithCompletion(self: PostOrderNode, c: Completion) -> *ControlFlowNode;
PostOrderNode::isSyntheticNode
- Parameter
self
:PostOrderNode
- Return
bool
pub fn isSyntheticNode(self: PostOrderNode) -> bool;
PostOrderNode::getEnclosingFunction
/**
* Get the enclosing function of node.
* CfgEntryNode or CfgExitNode return belongs to function.
*/
- Parameter
self
:PostOrderNode
- Return
FunctionLikeDeclaration
pub fn getEnclosingFunction(self: PostOrderNode) -> FunctionLikeDeclaration;
PostOrderNode::getFile
/**
* Get the file of this control flow node.
*/
- Parameter
self
:PostOrderNode
- Return
File
pub fn getFile(self: PostOrderNode) -> File;
PostOrderNode::isExitNode
- Parameter
self
:PostOrderNode
- Return
bool
pub fn isExitNode(self: PostOrderNode) -> bool;
PostOrderNode::getKindName
/**
* Get the kind name of node.
* If node is ast node, just return ast node kind name; otherwise
* return node name as CfgEntryNode or CfgExitNode.
*/
- Parameter
self
:PostOrderNode
- Return
string
pub fn getKindName(self: PostOrderNode) -> string;