Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
- Code cleanup


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13047 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Sep 25, 2012
1 parent f94658d commit 7275705
Show file tree
Hide file tree
Showing 48 changed files with 319 additions and 319 deletions.
8 changes: 4 additions & 4 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -1990,7 +1990,7 @@ algorithm
(e2,_) = ExpressionSimplify.simplify(e2);
((_,vars)) = Expression.traverseExp(e2,derCrefsExp,vars);
then ((e2,(vars,shared,true)));
case tpl then tpl;
case _ then tpl;
end matchcontinue;
end expandDerExp;

Expand All @@ -2011,7 +2011,7 @@ algorithm outExp := matchcontinue(inExp)
vars = updateStatesVars(vars,varlst,false);
then
((e,vars));
case(inExp) then inExp;
case _ then inExp;
end matchcontinue;
end derCrefsExp;

Expand Down Expand Up @@ -2562,7 +2562,7 @@ algorithm
//Debug.fcall(Flags.RELIDX,print, " zerocrossingindex 2: results " +& ExpressionDump.printExpStr(e_1)+& "index: " +& intString(indx) +& " lenght: " +& intString(length) +& "\n");
then
((e_1,zeroCrossings,indx));
case (exp ,_,_,_)
case (_,_,_,_)
equation
str = " failure in zerocrossingindex for: " +& ExpressionDump.printExpStr(exp);
Error.addMessage(Error.INTERNAL_ERROR, {str});
Expand Down Expand Up @@ -3107,7 +3107,7 @@ protected function whenEquationsIndices "Returns all equation-indices that conta
output list<Integer> res;
algorithm
res := match (eqns)
case(eqns) equation
case _ equation
res=whenEquationsIndices2(1,BackendDAEUtil.equationArraySize(eqns),eqns);
then res;
end match;
Expand Down
44 changes: 22 additions & 22 deletions Compiler/BackEnd/BackendDAEOptimize.mo
Expand Up @@ -717,7 +717,7 @@ algorithm
then
((de,r));

case(inExp) then inExp;
case _ then inExp;

end matchcontinue;
end replaceDerEquationsFinder1;
Expand Down Expand Up @@ -1688,7 +1688,7 @@ algorithm
v1 = Debug.bcallret2(not b,BackendVariable.setBindExp,v,e1,v);
varlst = List.consOnTrue(b, v1, varlst);
then ((v1,(repl,varlst)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end replaceAliasVarTraverser;

Expand All @@ -1708,7 +1708,7 @@ algorithm
(e1,true) = BackendVarTransform.replaceExp(e, repl, NONE());
v1 = BackendVariable.setBindExp(v,e1);
then ((v1,repl));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end replaceVarTraverser;

Expand Down Expand Up @@ -1747,7 +1747,7 @@ algorithm
(e1,_) = BackendVarTransform.replaceExp(e, repl, NONE());
then
((e1,repl));
case inTpl then inTpl;
case _ then inTpl;
end match;
end replaceWhenClauseTraverser;

Expand Down Expand Up @@ -1836,7 +1836,7 @@ algorithm
true = ComponentReference.crefEqualNoStringCompare(cr,dcr);
then
((de,(de,dcr)));
case inExp then inExp;
case _ then inExp;
end matchcontinue;
end replaceAliasDerFinder;

Expand Down Expand Up @@ -3076,7 +3076,7 @@ algorithm
exp = ValuesUtil.valueExp(bindValue);
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
then ((v,(repl_1,vars)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end removeFinalParametersFinder;

Expand Down Expand Up @@ -3172,7 +3172,7 @@ algorithm
(exp,_) = BackendVarTransform.replaceExp(exp,repl,NONE());
then ((exp,repl));

case(inTpl) then inTpl;
case _ then inTpl;
end matchcontinue;
end traverseExpVisitorWrapper;

Expand Down Expand Up @@ -3267,7 +3267,7 @@ algorithm
exp = ValuesUtil.valueExp(bindValue);
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
then ((v,(repl_1,vars)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end removeParametersFinder;

Expand Down Expand Up @@ -3361,7 +3361,7 @@ algorithm
exp = ValuesUtil.valueExp(bindValue);
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
then ((v,repl_1));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end protectedParametersFinder;

Expand Down Expand Up @@ -4033,7 +4033,7 @@ algorithm
((_,(_,vars1))) = Expression.traverseExp(exp,checkUnusedParameterExp,(vars,vars1));
then
((exp,(vars,vars1)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end checkUnusedParameter;

Expand Down Expand Up @@ -4090,7 +4090,7 @@ algorithm
then
((e, (vars,vars1)));

case inTuple then inTuple;
case _ then inTuple;
end matchcontinue;
end checkUnusedParameterExp;

Expand Down Expand Up @@ -4151,7 +4151,7 @@ algorithm
((_,(_,vars1))) = Expression.traverseExp(exp,checkUnusedVariablesExp,(vars,vars1));
then
((exp,(vars,vars1)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end checkUnusedVariables;

Expand Down Expand Up @@ -4208,7 +4208,7 @@ algorithm
then
((e, (vars,vars1)));

case inTuple then inTuple;
case _ then inTuple;
end matchcontinue;
end checkUnusedVariablesExp;

Expand Down Expand Up @@ -4335,7 +4335,7 @@ algorithm
((_,(_,usefuncs1))) = Expression.traverseExp(exp,checkUnusedFunctionsExp,(func,usefuncs));
then
((exp,(func,usefuncs1)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end checkUnusedFunctions;

Expand Down Expand Up @@ -4384,7 +4384,7 @@ algorithm
then
((e, (func,usefuncs1)));

case inTuple then inTuple;
case _ then inTuple;
end matchcontinue;
end checkUnusedFunctionsExp;

Expand Down Expand Up @@ -6532,7 +6532,7 @@ algorithm
List.map2_0(rowElements, Util.arrayUpdateElementListUnion, {inStartNode}, inSparseT);
outSparseT = prepareSparsePatternT(inSparseT, inStartNode+1, inEndNode, inMatrixT);
then outSparseT;
case (inSparseT,_,_,_) then inSparseT;
case (_,_,_,_) then inSparseT;
end matchcontinue;
end prepareSparsePatternT;

Expand Down Expand Up @@ -8854,7 +8854,7 @@ protected function mergeIf
output DAE.Exp outExp;
algorithm
outExp := match(inExp1,inExp2,inOrgExp1)
case (inExp1,inExp2,inOrgExp1) then DAE.IFEXP(inOrgExp1, inExp1, inExp2);
case (_,inExp2,inOrgExp1) then DAE.IFEXP(inOrgExp1, inExp1, inExp2);
end match;
end mergeIf;

Expand Down Expand Up @@ -9383,7 +9383,7 @@ algorithm
(_,_) = BackendVariable.getVar(cr, vars);
then
((DAE.BCONST(false),(vars,true)));
case tpl then tpl;
case _ then tpl;
end matchcontinue;
end traverserExpsimplifyTimeIndepFuncCalls;

Expand Down Expand Up @@ -11678,7 +11678,7 @@ algorithm
case ((exp,(i1,i2,i3))) equation
((_,(i1_1,i2_1,i3_1))) = Expression.traverseExp(exp,traversecountOperationsExp,(i1,i2,i3));
then ((exp,(i1_1,i2_1,i3_1)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end countOperationsExp;

Expand All @@ -11700,7 +11700,7 @@ algorithm
case ((e as DAE.BINARY(operator=op),(i1,i2,i3))) equation
(i1_1,i2_1,i3_1) = countOperator(op,i1,i2,i3);
then ((e, (i1_1,i2_1,i3_1)));
case inTuple then inTuple;
case _ then inTuple;
end matchcontinue;
end traversecountOperationsExp;

Expand Down Expand Up @@ -11890,7 +11890,7 @@ algorithm
e = BackendVariable.varBindExpStartValue(v);
then
((e,knvars));
case tpl1 then tpl1;
case _ then tpl1;
end matchcontinue;
end simplifyevaluatedParamter;

Expand Down Expand Up @@ -12823,7 +12823,7 @@ algorithm
v = BackendVariable.setVarFixed(v, true);
Debug.fcall(Flags.DUMPOPTINIT,BackendDump.debugStrCrefStrExpStr,("Set Var ",varName," (start= ",exp,", fixed=true)\n"));
then ((v,(initalAliases,true)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end optimizeInitialAliasesFinder;

Expand Down
12 changes: 6 additions & 6 deletions Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -2346,7 +2346,7 @@ algorithm
true = BackendVariable.isState(cr,v);
so1 = addStateOrder(cr,dcr,so);
then ((e,(so1,v)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end traverseStateOrderFinder;

Expand Down Expand Up @@ -3042,7 +3042,7 @@ algorithm
(e1,ext_arg_1) = traverseBackendDAEExpsEqn(e,func,ext_arg);
then
((e1,(func,ext_arg_1)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end traversereplaceDummyDer;

Expand Down Expand Up @@ -3459,7 +3459,7 @@ algorithm
v = BackendVariable.setBindExp(v,en);
v = BackendVariable.mergeVariableOperations(v,{DAE.SUBSTITUTION({en},e)});
then ((v,(e1,e2)));
case inTpl then inTpl;
case _ then inTpl;
end matchcontinue;
end traverseReplaceAliasVarsBindExp;

Expand Down Expand Up @@ -3515,7 +3515,7 @@ algorithm
then
((e, (vars_1,i+1)));

case inExp then inExp;
case _ then inExp;

end matchcontinue;
end replaceDummyDerOthersExpFinder;
Expand Down Expand Up @@ -3902,7 +3902,7 @@ algorithm
equation
((_,true)) = BackendVariable.traverseBackendDAEVars(vars,varInSameComponent,(cr,false));
then -1.0;
case(cr,vars) then 0.0;
case (_,vars) then 0.0;
end matchcontinue;
end varStateSelectHeuristicPrio2;

Expand Down Expand Up @@ -4195,7 +4195,7 @@ algorithm
DAE.ComponentRef cr;
list<DAE.ComponentRef> res1;
list<Integer> res2,rest;
case (vars,{},_,_) then (inExpComponentRefLst,inIntegerLst1);
case (_,{},_,_) then (inExpComponentRefLst,inIntegerLst1);
case (_,(v :: rest),_,_)
equation
false = intGt(v,0);
Expand Down

0 comments on commit 7275705

Please sign in to comment.