Skip to content

Commit 7275705

Browse files
committed
- Code cleanup git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13047 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent f94658d commit 7275705

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+319
-319
lines changed

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1990,7 +1990,7 @@ algorithm
19901990
(e2,_) = ExpressionSimplify.simplify(e2);
19911991
((_,vars)) = Expression.traverseExp(e2,derCrefsExp,vars);
19921992
then ((e2,(vars,shared,true)));
1993-
case tpl then tpl;
1993+
case _ then tpl;
19941994
end matchcontinue;
19951995
end expandDerExp;
19961996

@@ -2011,7 +2011,7 @@ algorithm outExp := matchcontinue(inExp)
20112011
vars = updateStatesVars(vars,varlst,false);
20122012
then
20132013
((e,vars));
2014-
case(inExp) then inExp;
2014+
case _ then inExp;
20152015
end matchcontinue;
20162016
end derCrefsExp;
20172017

@@ -2562,7 +2562,7 @@ algorithm
25622562
//Debug.fcall(Flags.RELIDX,print, " zerocrossingindex 2: results " +& ExpressionDump.printExpStr(e_1)+& "index: " +& intString(indx) +& " lenght: " +& intString(length) +& "\n");
25632563
then
25642564
((e_1,zeroCrossings,indx));
2565-
case (exp ,_,_,_)
2565+
case (_,_,_,_)
25662566
equation
25672567
str = " failure in zerocrossingindex for: " +& ExpressionDump.printExpStr(exp);
25682568
Error.addMessage(Error.INTERNAL_ERROR, {str});
@@ -3107,7 +3107,7 @@ protected function whenEquationsIndices "Returns all equation-indices that conta
31073107
output list<Integer> res;
31083108
algorithm
31093109
res := match (eqns)
3110-
case(eqns) equation
3110+
case _ equation
31113111
res=whenEquationsIndices2(1,BackendDAEUtil.equationArraySize(eqns),eqns);
31123112
then res;
31133113
end match;

Compiler/BackEnd/BackendDAEOptimize.mo

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ algorithm
717717
then
718718
((de,r));
719719

720-
case(inExp) then inExp;
720+
case _ then inExp;
721721

722722
end matchcontinue;
723723
end replaceDerEquationsFinder1;
@@ -1688,7 +1688,7 @@ algorithm
16881688
v1 = Debug.bcallret2(not b,BackendVariable.setBindExp,v,e1,v);
16891689
varlst = List.consOnTrue(b, v1, varlst);
16901690
then ((v1,(repl,varlst)));
1691-
case inTpl then inTpl;
1691+
case _ then inTpl;
16921692
end matchcontinue;
16931693
end replaceAliasVarTraverser;
16941694

@@ -1708,7 +1708,7 @@ algorithm
17081708
(e1,true) = BackendVarTransform.replaceExp(e, repl, NONE());
17091709
v1 = BackendVariable.setBindExp(v,e1);
17101710
then ((v1,repl));
1711-
case inTpl then inTpl;
1711+
case _ then inTpl;
17121712
end matchcontinue;
17131713
end replaceVarTraverser;
17141714

@@ -1747,7 +1747,7 @@ algorithm
17471747
(e1,_) = BackendVarTransform.replaceExp(e, repl, NONE());
17481748
then
17491749
((e1,repl));
1750-
case inTpl then inTpl;
1750+
case _ then inTpl;
17511751
end match;
17521752
end replaceWhenClauseTraverser;
17531753

@@ -1836,7 +1836,7 @@ algorithm
18361836
true = ComponentReference.crefEqualNoStringCompare(cr,dcr);
18371837
then
18381838
((de,(de,dcr)));
1839-
case inExp then inExp;
1839+
case _ then inExp;
18401840
end matchcontinue;
18411841
end replaceAliasDerFinder;
18421842

@@ -3076,7 +3076,7 @@ algorithm
30763076
exp = ValuesUtil.valueExp(bindValue);
30773077
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
30783078
then ((v,(repl_1,vars)));
3079-
case inTpl then inTpl;
3079+
case _ then inTpl;
30803080
end matchcontinue;
30813081
end removeFinalParametersFinder;
30823082

@@ -3172,7 +3172,7 @@ algorithm
31723172
(exp,_) = BackendVarTransform.replaceExp(exp,repl,NONE());
31733173
then ((exp,repl));
31743174

3175-
case(inTpl) then inTpl;
3175+
case _ then inTpl;
31763176
end matchcontinue;
31773177
end traverseExpVisitorWrapper;
31783178

@@ -3267,7 +3267,7 @@ algorithm
32673267
exp = ValuesUtil.valueExp(bindValue);
32683268
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
32693269
then ((v,(repl_1,vars)));
3270-
case inTpl then inTpl;
3270+
case _ then inTpl;
32713271
end matchcontinue;
32723272
end removeParametersFinder;
32733273

@@ -3361,7 +3361,7 @@ algorithm
33613361
exp = ValuesUtil.valueExp(bindValue);
33623362
repl_1 = BackendVarTransform.addReplacement(repl, varName, exp,NONE());
33633363
then ((v,repl_1));
3364-
case inTpl then inTpl;
3364+
case _ then inTpl;
33653365
end matchcontinue;
33663366
end protectedParametersFinder;
33673367

@@ -4033,7 +4033,7 @@ algorithm
40334033
((_,(_,vars1))) = Expression.traverseExp(exp,checkUnusedParameterExp,(vars,vars1));
40344034
then
40354035
((exp,(vars,vars1)));
4036-
case inTpl then inTpl;
4036+
case _ then inTpl;
40374037
end matchcontinue;
40384038
end checkUnusedParameter;
40394039

@@ -4090,7 +4090,7 @@ algorithm
40904090
then
40914091
((e, (vars,vars1)));
40924092

4093-
case inTuple then inTuple;
4093+
case _ then inTuple;
40944094
end matchcontinue;
40954095
end checkUnusedParameterExp;
40964096

@@ -4151,7 +4151,7 @@ algorithm
41514151
((_,(_,vars1))) = Expression.traverseExp(exp,checkUnusedVariablesExp,(vars,vars1));
41524152
then
41534153
((exp,(vars,vars1)));
4154-
case inTpl then inTpl;
4154+
case _ then inTpl;
41554155
end matchcontinue;
41564156
end checkUnusedVariables;
41574157

@@ -4208,7 +4208,7 @@ algorithm
42084208
then
42094209
((e, (vars,vars1)));
42104210

4211-
case inTuple then inTuple;
4211+
case _ then inTuple;
42124212
end matchcontinue;
42134213
end checkUnusedVariablesExp;
42144214

@@ -4335,7 +4335,7 @@ algorithm
43354335
((_,(_,usefuncs1))) = Expression.traverseExp(exp,checkUnusedFunctionsExp,(func,usefuncs));
43364336
then
43374337
((exp,(func,usefuncs1)));
4338-
case inTpl then inTpl;
4338+
case _ then inTpl;
43394339
end matchcontinue;
43404340
end checkUnusedFunctions;
43414341

@@ -4384,7 +4384,7 @@ algorithm
43844384
then
43854385
((e, (func,usefuncs1)));
43864386

4387-
case inTuple then inTuple;
4387+
case _ then inTuple;
43884388
end matchcontinue;
43894389
end checkUnusedFunctionsExp;
43904390

@@ -6532,7 +6532,7 @@ algorithm
65326532
List.map2_0(rowElements, Util.arrayUpdateElementListUnion, {inStartNode}, inSparseT);
65336533
outSparseT = prepareSparsePatternT(inSparseT, inStartNode+1, inEndNode, inMatrixT);
65346534
then outSparseT;
6535-
case (inSparseT,_,_,_) then inSparseT;
6535+
case (_,_,_,_) then inSparseT;
65366536
end matchcontinue;
65376537
end prepareSparsePatternT;
65386538

@@ -8854,7 +8854,7 @@ protected function mergeIf
88548854
output DAE.Exp outExp;
88558855
algorithm
88568856
outExp := match(inExp1,inExp2,inOrgExp1)
8857-
case (inExp1,inExp2,inOrgExp1) then DAE.IFEXP(inOrgExp1, inExp1, inExp2);
8857+
case (_,inExp2,inOrgExp1) then DAE.IFEXP(inOrgExp1, inExp1, inExp2);
88588858
end match;
88598859
end mergeIf;
88608860

@@ -9383,7 +9383,7 @@ algorithm
93839383
(_,_) = BackendVariable.getVar(cr, vars);
93849384
then
93859385
((DAE.BCONST(false),(vars,true)));
9386-
case tpl then tpl;
9386+
case _ then tpl;
93879387
end matchcontinue;
93889388
end traverserExpsimplifyTimeIndepFuncCalls;
93899389

@@ -11678,7 +11678,7 @@ algorithm
1167811678
case ((exp,(i1,i2,i3))) equation
1167911679
((_,(i1_1,i2_1,i3_1))) = Expression.traverseExp(exp,traversecountOperationsExp,(i1,i2,i3));
1168011680
then ((exp,(i1_1,i2_1,i3_1)));
11681-
case inTpl then inTpl;
11681+
case _ then inTpl;
1168211682
end matchcontinue;
1168311683
end countOperationsExp;
1168411684

@@ -11700,7 +11700,7 @@ algorithm
1170011700
case ((e as DAE.BINARY(operator=op),(i1,i2,i3))) equation
1170111701
(i1_1,i2_1,i3_1) = countOperator(op,i1,i2,i3);
1170211702
then ((e, (i1_1,i2_1,i3_1)));
11703-
case inTuple then inTuple;
11703+
case _ then inTuple;
1170411704
end matchcontinue;
1170511705
end traversecountOperationsExp;
1170611706

@@ -11890,7 +11890,7 @@ algorithm
1189011890
e = BackendVariable.varBindExpStartValue(v);
1189111891
then
1189211892
((e,knvars));
11893-
case tpl1 then tpl1;
11893+
case _ then tpl1;
1189411894
end matchcontinue;
1189511895
end simplifyevaluatedParamter;
1189611896

@@ -12823,7 +12823,7 @@ algorithm
1282312823
v = BackendVariable.setVarFixed(v, true);
1282412824
Debug.fcall(Flags.DUMPOPTINIT,BackendDump.debugStrCrefStrExpStr,("Set Var ",varName," (start= ",exp,", fixed=true)\n"));
1282512825
then ((v,(initalAliases,true)));
12826-
case inTpl then inTpl;
12826+
case _ then inTpl;
1282712827
end matchcontinue;
1282812828
end optimizeInitialAliasesFinder;
1282912829

Compiler/BackEnd/BackendDAETransform.mo

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@ algorithm
23462346
true = BackendVariable.isState(cr,v);
23472347
so1 = addStateOrder(cr,dcr,so);
23482348
then ((e,(so1,v)));
2349-
case inTpl then inTpl;
2349+
case _ then inTpl;
23502350
end matchcontinue;
23512351
end traverseStateOrderFinder;
23522352

@@ -3042,7 +3042,7 @@ algorithm
30423042
(e1,ext_arg_1) = traverseBackendDAEExpsEqn(e,func,ext_arg);
30433043
then
30443044
((e1,(func,ext_arg_1)));
3045-
case inTpl then inTpl;
3045+
case _ then inTpl;
30463046
end matchcontinue;
30473047
end traversereplaceDummyDer;
30483048

@@ -3459,7 +3459,7 @@ algorithm
34593459
v = BackendVariable.setBindExp(v,en);
34603460
v = BackendVariable.mergeVariableOperations(v,{DAE.SUBSTITUTION({en},e)});
34613461
then ((v,(e1,e2)));
3462-
case inTpl then inTpl;
3462+
case _ then inTpl;
34633463
end matchcontinue;
34643464
end traverseReplaceAliasVarsBindExp;
34653465

@@ -3515,7 +3515,7 @@ algorithm
35153515
then
35163516
((e, (vars_1,i+1)));
35173517

3518-
case inExp then inExp;
3518+
case _ then inExp;
35193519

35203520
end matchcontinue;
35213521
end replaceDummyDerOthersExpFinder;
@@ -3902,7 +3902,7 @@ algorithm
39023902
equation
39033903
((_,true)) = BackendVariable.traverseBackendDAEVars(vars,varInSameComponent,(cr,false));
39043904
then -1.0;
3905-
case(cr,vars) then 0.0;
3905+
case (_,vars) then 0.0;
39063906
end matchcontinue;
39073907
end varStateSelectHeuristicPrio2;
39083908

@@ -4195,7 +4195,7 @@ algorithm
41954195
DAE.ComponentRef cr;
41964196
list<DAE.ComponentRef> res1;
41974197
list<Integer> res2,rest;
4198-
case (vars,{},_,_) then (inExpComponentRefLst,inIntegerLst1);
4198+
case (_,{},_,_) then (inExpComponentRefLst,inIntegerLst1);
41994199
case (_,(v :: rest),_,_)
42004200
equation
42014201
false = intGt(v,0);

0 commit comments

Comments
 (0)