Internal speedups: Skip iterator for Termop or VarRefs.

Fix AstUCFunc being mis-labeled as a Termop.
This commit is contained in:
Wilson Snyder
2008-11-22 15:28:29 -05:00
parent c595d67311
commit a242c1019d
4 changed files with 12 additions and 3 deletions
+1 -1
View File
@@ -804,7 +804,7 @@ void AstNode::checkTreeIter(AstNode* backp) {
if (backp != this->backp()) {
this->v3fatalSrc("Back node inconsistent");
}
if (castNodeTermop()) {
if (castNodeTermop() || castNodeVarRef()) {
// Termops have a short-circuited iterateChildren, so check usage
if (op1p()||op2p()||op3p()||op4p())
this->v3fatalSrc("Terminal operation with non-terminals");