Skip to content

Commit

Permalink
Improve DAE.traverseDAE*
Browse files Browse the repository at this point in the history
- Cleanup and improve DAE.traverseDAE*
- Renamed some functions:
  * traverseDAE2 -> traverseDAEElementList
  * traverseDAE2_tail2 -> traverseDAEElement
  • Loading branch information
perost committed Apr 12, 2016
1 parent a17aa0e commit b623cc2
Show file tree
Hide file tree
Showing 8 changed files with 302 additions and 377 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -3298,7 +3298,7 @@ algorithm
params_new = List.map(crefs_new,Expression.crefExp);
repl = VarTransform.emptyReplacements();
repl = VarTransform.addReplacementLst(repl,crefs,params_new);
(body,_) = DAEUtil.traverseDAE2(body,replaceParameters,repl);
(body,_) = DAEUtil.traverseDAEElementList(body,replaceParameters,repl);
then DAE.FUNCTION_DEF(body);
else
then funcIn;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -1548,7 +1548,7 @@ algorithm

if isSome(f) then
outUsedFunctions := DAE.AvlTreePathFunction.add(outUsedFunctions, inPath, f);
(_, outUsedFunctions) := DAEUtil.traverseDAE2(body,
(_, outUsedFunctions) := DAEUtil.traverseDAEElementList(body,
function checkUnusedFunctions(inFunctions = inFunctions), outUsedFunctions);
end if;
end try;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/FrontEnd/ConnectionGraph.mo
Expand Up @@ -979,7 +979,7 @@ algorithm
// BaseHashTable.dumpHashTable(table);
rooted = setRootDistance(inRoots,table,0,{},HashTable.emptyHashTable());
// BaseHashTable.dumpHashTable(rooted);
(outDae, _) = DAEUtil.traverseDAE2(inDae, evalConnectionsOperatorsHelper, (rooted,inRoots,graph));
(outDae, _) = DAEUtil.traverseDAEElementList(inDae, evalConnectionsOperatorsHelper, (rooted,inRoots,graph));
then outDae;

end matchcontinue;
Expand Down

0 comments on commit b623cc2

Please sign in to comment.