Internals: Add cloneTreePure to prepare for side effect check.

Use cloneTreePure when what is being cloned must be side-effect free.
Use cloneTree when safe to contain side effects (e.g. cloning module).
This commit is contained in:
Wilson Snyder
2023-09-16 22:50:54 -04:00
parent cd1fe64e6c
commit 761adf1cf0
25 changed files with 193 additions and 180 deletions
+1 -1
View File
@@ -338,7 +338,7 @@ private:
= new AstIf{itemp->fileline(),
new AstLte{condp->fileline(),
new AstVarRef{condp->fileline(), randVarp, VAccess::READ},
sump->cloneTree(true)},
sump->cloneTreePure(true)},
stmtsp, nullptr};
ifsp->addElsesp(newifp);
ifsp = newifp;