本文整理汇总了C++中BaseNode::getNext方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseNode::getNext方法的具体用法?C++ BaseNode::getNext怎么用?C++ BaseNode::getNext使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类BaseNode
的用法示例。
在下文中一共展示了BaseNode::getNext方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeUnreachableCode
Error BaseContext::removeUnreachableCode() {
PodList<BaseNode*>::Link* link = _unreachableList.getFirst();
BaseNode* stop = getStop();
while (link != NULL) {
BaseNode* node = link->getValue();
if (node != NULL && node->getPrev() != NULL) {
// Locate all unreachable nodes.
BaseNode* first = node;
do {
if (node->isFetched())
break;
node = node->getNext();
} while (node != stop);
// Remove.
if (node != first) {
BaseNode* last = (node != NULL) ? node->getPrev() : getCompiler()->getLastNode();
getCompiler()->removeNodes(first, last);
}
}
link = link->getNext();
}
return kErrorOk;
}
示例2: compile
Error BaseContext::compile(FuncNode* func) {
BaseNode* end = func->getEnd();
BaseNode* stop = end->getNext();
_func = func;
_stop = stop;
_extraBlock = end;
ASMJIT_PROPAGATE_ERROR(fetch());
ASMJIT_PROPAGATE_ERROR(removeUnreachableCode());
ASMJIT_PROPAGATE_ERROR(analyze());
if (_compiler->hasLogger())
ASMJIT_PROPAGATE_ERROR(annotate());
ASMJIT_PROPAGATE_ERROR(translate());
// We alter the compiler cursor, because it doesn't make sense to reference
// it after compilation - some nodes may disappear and it's forbidden to add
// new code after the compilation is done.
_compiler->_setCursor(NULL);
return kErrorOk;
}