Skip to content

Commit

Permalink
- make functions tail recursive (matchcontinue -> match) to fix some …
Browse files Browse the repository at this point in the history
…bootstrapping tests

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@17336 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Sep 23, 2013
1 parent 158cc4c commit 3666077
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Compiler/FrontEnd/DAEUtil.mo
Original file line number Diff line number Diff line change
Expand Up @@ -6140,7 +6140,7 @@ public function sortDAEInModelicaCodeOrder
input DAE.DAElist inDae;
output DAE.DAElist outDae;
algorithm
outDae := matchcontinue(inShouldSort, inElements, inDae)
outDae := match(inShouldSort, inElements, inDae)
local
list<DAE.Element> els;

Expand All @@ -6153,7 +6153,7 @@ algorithm
els = sortDAEElementsInModelicaCodeOrder(inElements, els, {});
then DAE.DAE(els);

end matchcontinue;
end match;
end sortDAEInModelicaCodeOrder;

protected function sortDAEElementsInModelicaCodeOrder
Expand All @@ -6164,7 +6164,7 @@ protected function sortDAEElementsInModelicaCodeOrder
input list<DAE.Element> inAcc;
output list<DAE.Element> outDaeEls;
algorithm
outDaeEls := matchcontinue(inElements, inDaeEls, inAcc)
outDaeEls := match(inElements, inDaeEls, inAcc)
local
list<DAE.Element> dae, named, rest, els, acc;
Absyn.Ident name;
Expand All @@ -6186,7 +6186,7 @@ algorithm
then
els;

end matchcontinue;
end match;
end sortDAEElementsInModelicaCodeOrder;

protected function splitVariableNamed
Expand All @@ -6199,7 +6199,7 @@ protected function splitVariableNamed
output list<DAE.Element> outNamed;
output list<DAE.Element> outRest;
algorithm
(outNamed, outRest) := matchcontinue (inElementLst, inName, inAccNamed, inAccRest)
(outNamed, outRest) := match(inElementLst, inName, inAccNamed, inAccRest)
local
list<DAE.Element> res,lst, accNamed, accRest;
DAE.Element x;
Expand All @@ -6223,7 +6223,7 @@ algorithm
then
(accNamed, accRest);

end matchcontinue;
end match;
end splitVariableNamed;

end DAEUtil;

0 comments on commit 3666077

Please sign in to comment.