Skip to content

Commit e38940c

Browse files
committed
- Removed another 1014 local declarations
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7656 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent e8fd45e commit e38940c

Some content is hidden

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

58 files changed

+641
-639
lines changed

Compiler/BackEnd/BackendDAECreate.mo

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ algorithm
225225
local
226226
BackendDAE.Variables v1,v2,v3,vars,knvars,extVars,extVars1,extVars2,vars_1,knvars_1,vars1,vars2,knvars1,knvars2,kv;
227227
list<BackendDAE.WhenClause> whenclauses,whenclauses_1,whenclauses_2;
228-
list<BackendDAE.Equation> eqns,reqns,ieqns,eqns1,eqns2,reqns1,ieqns1,reqns2,ieqns2,re,ie,eqsComplex;
229-
list<BackendDAE.MultiDimEquation> aeqns,aeqns1,aeqns2,ae,iaeqns,iaeqns1,iaeqns2,iae;
230-
list<DAE.Algorithm> algs,algs1,algs2,al,ialgs,ialgs1,ialgs2;
228+
list<BackendDAE.Equation> eqns,reqns,ieqns;
229+
list<BackendDAE.MultiDimEquation> aeqns,iaeqns;
230+
list<DAE.Algorithm> algs,ialgs;
231231
BackendDAE.ExternalObjectClasses extObjCls,extObjCls1,extObjCls2;
232232
BackendDAE.ExternalObjectClass extObjCl;
233233
DAE.Element daeEl;
@@ -318,9 +318,9 @@ algorithm
318318
matchcontinue (inElement,functionTree,inVariables,inKnownVariables,inExternalVariables,inEquationLst3,inEquationLst4,inEquationLst5,
319319
inMultiDimEquationLst6,inMultiDimEquationLst7,inAlgorithmAlgorithmLst8,inAlgorithmAlgorithmLst9,inWhenClauseLst10,inExtObjClasses,inStatesBinTree)
320320
local
321-
BackendDAE.Variables vars,knvars,extVars,extVars1,extVars2,vars_1,knvars_1,vars1,vars2,knvars1,knvars2,kv;
321+
BackendDAE.Variables vars,knvars,extVars;
322322
list<BackendDAE.WhenClause> whenclauses,whenclauses_1,whenclauses_2;
323-
list<BackendDAE.Equation> eqns,reqns,ieqns,eqns1,eqns2,reqns1,ieqns1,reqns2,ieqns2,re,ie,eqsComplex;
323+
list<BackendDAE.Equation> eqns,reqns,ieqns,eqns2,re,eqsComplex;
324324
list<BackendDAE.MultiDimEquation> aeqns,aeqns1,aeqns2,ae,iaeqns,iaeqns1,iaeqns2,iae;
325325
list<DAE.Algorithm> algs,algs1,algs2,al,ialgs,ialgs1,ialgs2;
326326
BackendDAE.ExternalObjectClasses extObjCls,extObjCls1,extObjCls2;
@@ -358,7 +358,7 @@ algorithm
358358
Absyn.Path func_name;
359359
list<DAE.Exp> args;
360360
DAE.Statement s;
361-
Boolean b1, b2, b;
361+
Boolean b1, b2;
362362
String str;
363363
DAE.Element ddl;
364364
String s3;
@@ -1227,7 +1227,7 @@ algorithm
12271227
list<BackendDAE.Equation> eqnl;
12281228
list<BackendDAE.WhenOperator> reinit;
12291229
DAE.Exp cre,e,cond;
1230-
DAE.ComponentRef cr,cref_;
1230+
DAE.ComponentRef cr;
12311231
list<DAE.Element> xs;
12321232
DAE.Element el;
12331233
DAE.ElementSource source "the element source";
@@ -1385,7 +1385,7 @@ algorithm
13851385
BackendDAE.MultiDimEquation a;
13861386
list<BackendDAE.MultiDimEquation> algs;
13871387
DAE.Exp e1,e2;
1388-
list<DAE.Exp> a1,a2,a1_1,an;
1388+
list<DAE.Exp> a1,a2,an;
13891389
list<tuple<DAE.Exp,DAE.Exp>> ealst;
13901390
list<list<tuple<DAE.Exp, Boolean>>> al1,al2;
13911391
list<tuple<DAE.Exp, Boolean>> ebl1,ebl2;
@@ -1930,7 +1930,7 @@ protected function processDelayExpressions
19301930
algorithm
19311931
(outDAE,outTree) := match(inDAE,functionTree)
19321932
local
1933-
DAE.DAElist dae, dae2;
1933+
DAE.DAElist dae;
19341934
case (dae,functionTree)
19351935
equation
19361936
(dae,functionTree,_) = DAEUtil.traverseDAE(dae, functionTree, transformDelayExpressions, 0);
@@ -2823,9 +2823,9 @@ algorithm
28232823
outTplExpExpTplExpExpLstVariables:=
28242824
matchcontinue (inTplExpExpTplExpExpLstVariables)
28252825
local
2826-
DAE.Exp e,e1,e2,e_1;
2826+
DAE.Exp e,e1,e2;
28272827
BackendDAE.Variables vars,knvars;
2828-
list<DAE.Exp> zeroCrossings,zeroCrossings_1,zeroCrossings_2,zeroCrossings_3,el;
2828+
list<DAE.Exp> zeroCrossings;
28292829
DAE.Operator op;
28302830
DAE.ExpType tp;
28312831
Boolean scalar;
@@ -2860,11 +2860,11 @@ algorithm
28602860
zeroCrossings := matchcontinue(inStmts,vars,knvars)
28612861
local
28622862
DAE.Exp e,e2,iteratorExp;
2863-
list<DAE.Exp> expl1,expl2,zcl,zcl1,zcl2,zcl3,zcl4,iteratorexps;
2863+
list<DAE.Exp> expl1,zcl,zcl1,zcl2,zcl3,zcl4,iteratorexps;
28642864
DAE.ComponentRef cr;
2865-
list<DAE.Statement> xs,stmts,stmts2;
2866-
DAE.ExpType tp,tt;
2867-
DAE.Statement x,ew,ew_1;
2865+
list<DAE.Statement> xs,stmts;
2866+
DAE.ExpType tp;
2867+
DAE.Statement x,ew;
28682868
Boolean b1;
28692869
DAE.Ident id1,str;
28702870
list<Integer> li;
@@ -3043,7 +3043,7 @@ Helper function for traverseAlgStmts
30433043
algorithm
30443044
zeroCrossings := match(inElse,vars,knvars)
30453045
local
3046-
DAE.Exp e,e_1;
3046+
DAE.Exp e;
30473047
list<DAE.Statement> st;
30483048
Algorithm.Else el;
30493049
list<DAE.Exp> zcl,zcl1,zcl2,zcl3;
@@ -3347,7 +3347,7 @@ algorithm
33473347
DAE.Exp e1,e2,e1_1,e2_1,e2_2;
33483348
list<DAE.Exp> e2lst;
33493349
DAE.ElementSource source;
3350-
DAE.ComponentRef cr1,cr2;
3350+
DAE.ComponentRef cr1;
33513351
list<DAE.ComponentRef> crlst2;
33523352
BackendDAE.Equation eqn;
33533353
Expression.Type tp;

Compiler/BackEnd/BackendDAEOptimize.mo

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ algorithm
270270
list<DAE.Subscript> subscriptLst;
271271
list<DAE.ExpVar> varLst;
272272
list<DAE.Exp> expl;
273-
DAE.ExpType ty,te;
273+
DAE.ExpType ty;
274274
DAE.Ident ident;
275275
Absyn.Path name;
276276

@@ -942,7 +942,7 @@ algorithm
942942
Integer pos;
943943
BackendDAE.Variables v,kn,v1,v2;
944944
BackendDAE.EquationArray eqns,eqns1;
945-
BackendDAE.Var var,var1,var2,var3;
945+
BackendDAE.Var var,var2,var3;
946946
DAE.ComponentRef cr;
947947
DAE.Exp e1,e2,cre,es;
948948
Integer i,pos_1;
@@ -1335,11 +1335,11 @@ algorithm
13351335
matchcontinue (inDlow,inDlow1,inM,inMT,inV1,inV2,inComps)
13361336
local
13371337
BackendDAE.BackendDAE dlow,dlow_1,dlow_2,dlow1,dlow1_1,dlow1_2;
1338-
BackendDAE.IncidenceMatrix m,m_1,m_2,m_3,m_4;
1339-
BackendDAE.IncidenceMatrixT mT,mT_1,mT_2,mT_3,mT_4;
1338+
BackendDAE.IncidenceMatrix m,m_1,m_3,m_4;
1339+
BackendDAE.IncidenceMatrixT mT,mT_1,mT_3,mT_4;
13401340
array<Integer> v1,v2,v1_1,v2_1,v1_2,v2_2,v1_3,v2_3;
13411341
list<list<Integer>> comps,comps_1;
1342-
list<Integer> tvars,comp,comp_1,tearingvars,residualeqns,tearingeqns,l2,l2_1;
1342+
list<Integer> tvars,comp,comp_1,tearingvars,residualeqns,tearingeqns;
13431343
list<list<Integer>> r,t;
13441344
Integer ll;
13451345
list<DAE.ComponentRef> crlst;
@@ -1557,25 +1557,25 @@ algorithm
15571557
BackendDAE.IncidenceMatrix m,m_1,m_2,m_3;
15581558
BackendDAE.IncidenceMatrixT mT,mT_1,mT_2,mT_3;
15591559
array<Integer> v1,v2,v1_1,v2_1,v1_2,v2_2;
1560-
list<list<Integer>> comps,comps_1,lstm,lstmp,onecomp,morecomps;
1561-
list<Integer> vars,comp,comp_1,comp_2,r,t,exclude,b,cmops_flat,onecomp_flat,othereqns,resteareqns;
1560+
list<list<Integer>> comps,comps_1,onecomp,morecomps;
1561+
list<Integer> vars,comp,comp_1,comp_2,exclude,cmops_flat,onecomp_flat,othereqns,resteareqns;
15621562
String str,str1,str2;
15631563
Integer tearingvar,residualeqn,compcount,tearingeqnid;
1564-
list<Integer> residualeqns,residualeqns_1,tearingvars,tearingvars_1,tearingeqns,tearingeqns_1,tearingeqns_2;
1564+
list<Integer> residualeqns,residualeqns_1,tearingvars,tearingvars_1,tearingeqns,tearingeqns_1;
15651565
DAE.ComponentRef cr,crt;
15661566
list<DAE.ComponentRef> crlst;
15671567
DAE.Ident ident,ident_t;
15681568
BackendDAE.VariableArray varr;
15691569
BackendDAE.Value nvars,neqns,memsize;
15701570
BackendDAE.Variables ordvars,vars_1,knvars,exobj,ordvars1;
15711571
BackendDAE.AliasVariables av;
1572-
BackendDAE.Assignments assign1,assign2,assign1_1,assign2_1,ass1,ass2;
1573-
BackendDAE.EquationArray eqns, eqns_1, eqns_2,removedEqs,remeqns,inieqns,eqns1,eqns1_1,eqns1_2;
1572+
BackendDAE.Assignments assign1,assign2,ass1,ass2;
1573+
BackendDAE.EquationArray eqns, eqns_1, eqns_2,remeqns,inieqns,eqns1,eqns1_1,eqns1_2;
15741574
array<BackendDAE.MultiDimEquation> arreqns;
15751575
array<DAE.Algorithm> algorithms;
15761576
BackendDAE.EventInfo einfo;
15771577
BackendDAE.ExternalObjectClasses eoc;
1578-
DAE.Exp eqn,eqn_1,scalar,scalar_1,rhs,expCref;
1578+
DAE.Exp eqn,scalar,rhs,expCref;
15791579

15801580
DAE.ElementSource source;
15811581
DAE.ExpType identType;
@@ -1974,7 +1974,7 @@ algorithm
19741974
list<BackendDAE.Var> varlst;
19751975
array<Integer> v1,v2,v4,v31;
19761976
list<Integer> v3;
1977-
list<list<Integer>> comps1,comps2;
1977+
list<list<Integer>> comps1;
19781978
list<BackendDAE.Var> derivedVariables;
19791979
list<BackendDAE.Var> derivedVars;
19801980
BackendDAE.BinTree jacElements;
@@ -2113,7 +2113,7 @@ algorithm
21132113
list<Integer> ilst2;
21142114
Integer i;
21152115
array<Integer> arr,arr1;
2116-
list<String> s,s1;
2116+
list<String> s;
21172117
String str;
21182118
case({},_,arr) then arr;
21192119
case(var::rest,vars,arr)

Compiler/BackEnd/BackendDAETransform.mo

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ algorithm
114114
BackendDAE.Variables v,kv,v_1,kv_1,vars,exv;
115115
BackendDAE.AliasVariables av;
116116
BackendDAE.EquationArray e,re,ie,e_1,re_1,ie_1,eqns;
117-
array<BackendDAE.MultiDimEquation> ae,ae1;
117+
array<BackendDAE.MultiDimEquation> ae;
118118
array<DAE.Algorithm> al;
119119
BackendDAE.EventInfo ev,einfo;
120120
array<list<BackendDAE.Value>> m,mt,m_1,mt_1;
@@ -862,7 +862,7 @@ algorithm
862862
array<BackendDAE.Value> a1,a2;
863863
BackendDAE.Value n,i,w,w_1,num;
864864
list<BackendDAE.Value> stack,stack_1,stack_2;
865-
list<list<BackendDAE.Value>> comp, comps, comps2;
865+
list<list<BackendDAE.Value>> comp, comps;
866866

867867
case (m,mt,a1,a2,n,i,w,stack,comp)
868868
equation
@@ -1459,8 +1459,8 @@ algorithm
14591459
BackendDAE.Variables v_1,v,kv,ev;
14601460
BackendDAE.AliasVariables av;
14611461
BackendDAE.EquationArray eqns_1,eqns,seqns,seqns1,ie,ie1;
1462-
array<BackendDAE.MultiDimEquation> ae,ae1,ae2,ae3;
1463-
array<DAE.Algorithm> al,al1,al2,al3;
1462+
array<BackendDAE.MultiDimEquation> ae,ae1,ae2;
1463+
array<DAE.Algorithm> al,al1,al2;
14641464
list<BackendDAE.WhenClause> wclst,wclst1,wclst2;
14651465
list<BackendDAE.ZeroCrossing> zeroCrossingLst;
14661466
list<BackendDAE.Value> rest;
@@ -1698,7 +1698,7 @@ algorithm
16981698
DAE.Exp cond,cond1,msg;
16991699
DAE.ComponentRef cr;
17001700
DAE.ElementSource source;
1701-
Type_a ext_arg_1,ext_arg_2,ext_arg_3;
1701+
Type_a ext_arg_1,ext_arg_2;
17021702

17031703
case ({},func,inTypeA) then ({},inTypeA);
17041704

@@ -1852,7 +1852,7 @@ algorithm
18521852
Option<DAE.Exp> c;
18531853
Option<Values.Value> d;
18541854
BackendDAE.Value g;
1855-
DAE.ComponentRef dummyder,dummyder_1,cr;
1855+
DAE.ComponentRef dummyder,cr;
18561856
DAE.ElementSource source "the source of the element";
18571857
Option<DAE.VariableAttributes> dae_var_attr;
18581858
Option<SCode.Comment> comment;
@@ -1915,7 +1915,7 @@ algorithm
19151915
BackendDAE.Value idx;
19161916
DAE.ComponentRef name,dummyvar_cr,var;
19171917
DAE.ElementSource source "origin of equation";
1918-
Option<DAE.VariableAttributes> dae_var_attr,dae_var_attr1;
1918+
Option<DAE.VariableAttributes> dae_var_attr;
19191919
Option<SCode.Comment> comment;
19201920
DAE.Flow flowPrefix;
19211921
DAE.Stream streamPrefix;

Compiler/BackEnd/BackendDAEUtil.mo

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function checkInitialSystem"function: checkInitialSystem
268268
algorithm
269269
outDAE := matchcontinue (inDAE,funcs)
270270
local
271-
BackendDAE.Variables variables,knvars,exObj,initvars,initknvars;
271+
BackendDAE.Variables variables,knvars,exObj;
272272
BackendDAE.EquationArray orderedEqs,removedEqs,initialEqs;
273273
array<DAE.Algorithm> algs;
274274
array<BackendDAE.MultiDimEquation> arrayEqs;
@@ -531,7 +531,7 @@ protected function fixInitalVars"function: fixInitalVars
531531
algorithm
532532
(outVariables,outKnVariables) := matchcontinue (inUnfixed,inInitialEqns,inVariables,inKnVariables,inVars,inVarsWS,inStates,inStatesWS)
533533
local
534-
BackendDAE.Variables variables,knvariables,variables1,knvariables1;
534+
BackendDAE.Variables variables,variables1,knvariables1;
535535
list<DAE.ComponentRef> vars,varsws,states,statesws;
536536
DAE.ComponentRef cr;
537537
BackendDAE.Var var,var1;
@@ -2634,7 +2634,7 @@ algorithm
26342634
local
26352635
String keystr;
26362636
DAE.ComponentRef rkey;
2637-
BackendDAE.Value rval,cmpval,res;
2637+
BackendDAE.Value rval;
26382638
Option<BackendDAE.BinTree> optRight;
26392639
BackendDAE.BinTree right, left;
26402640

@@ -4834,7 +4834,7 @@ algorithm
48344834
matchcontinue (inVariables,func,inTypeA)
48354835
local
48364836
array<Option<BackendDAE.Var>> varOptArr;
4837-
Type_a ext_arg_1,ext_arg_2,ext_arg_3;
4837+
Type_a ext_arg_1;
48384838
case (BackendDAE.VARIABLES(varArr = BackendDAE.VARIABLE_ARRAY(varOptArr=varOptArr)),func,inTypeA)
48394839
equation
48404840
ext_arg_1 = traverseBackendDAEArrayNoCopy(varOptArr,func,traverseBackendDAEExpsVar,1,arrayLength(varOptArr),inTypeA);
@@ -5006,7 +5006,7 @@ algorithm
50065006
DAE.Exp e1, expCref;
50075007
DAE.ComponentRef cref;
50085008
Option<DAE.Exp> bndexp;
5009-
list<DAE.Subscript> instdims,instdims1;
5009+
list<DAE.Subscript> instdims;
50105010
Type_a ext_arg_1,ext_arg_2,ext_arg_3;
50115011
DAE.ExpType tp;
50125012

Compiler/BackEnd/BackendDump.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -736,8 +736,8 @@ protected function whenEquationStr
736736
algorithm
737737
outString := match (inWhenEqn)
738738
local
739-
String s1,s2,res,indx_str,is,var_str,intsStr,outsStr;
740-
DAE.Exp e2,e;
739+
String s1,s2,res,is;
740+
DAE.Exp e2;
741741
BackendDAE.Value i;
742742
list<DAE.Exp> outs;
743743
DAE.ComponentRef cr;

Compiler/BackEnd/BackendEquation.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function traverseBackendDAEExpsEqn "function: traverseBackendDAEExpsEqn
236236
algorithm
237237
(outEquation,outTypeA):= match (inEquation,func,inTypeA)
238238
local
239-
DAE.Exp e1,e2,e,e_1,e_2;
239+
DAE.Exp e1,e2,e_1,e_2;
240240
list<DAE.Exp> expl,expl1,exps,exps1;
241241
DAE.ExpType tp;
242242
DAE.ComponentRef cr,cr1;
@@ -360,8 +360,8 @@ public function traverseBackendDAEExpsEqnOutEqn
360360
algorithm
361361
(outEquation,outflag,outTypeA):= match (inEquation,func,inTypeA)
362362
local
363-
DAE.Exp e1,e2,e,e_1,e_2;
364-
list<DAE.Exp> expl,expl1,exps,exps1;
363+
DAE.Exp e1,e2,e_1,e_2;
364+
list<DAE.Exp> expl,exps;
365365
DAE.ExpType tp;
366366
DAE.ComponentRef cr,cr1;
367367
BackendDAE.WhenEquation elsePart,elsePart1;

Compiler/BackEnd/BackendVarTransform.mo

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ algorithm
6666
BackendDAE.Equation a;
6767
DAE.ComponentRef cr;
6868
Integer indx;
69-
list<DAE.Exp> expl,expl1,expl2,expl3,expl4;
69+
list<DAE.Exp> expl,expl1,expl2;
7070
BackendDAE.WhenEquation whenEqn,whenEqn1;
7171
DAE.ElementSource source "the origin of the element";
7272
list<list<DAE.Exp>> explstlst;
@@ -357,7 +357,7 @@ algorithm
357357
outBackendDAEEquationLst:=
358358
match (inBackendDAEEquationLst,inVariableReplacements)
359359
local
360-
DAE.Exp e1_1,e2_1,e1,e2,e_1,e,e1_2,e2_2;
360+
DAE.Exp e1_1,e2_1,e1,e2,e1_2,e2_2;
361361
list<BackendDAE.MultiDimEquation> es_1,es;
362362
VarTransform.VariableReplacements repl;
363363
BackendDAE.Equation a;
@@ -419,7 +419,7 @@ algorithm
419419
list<DAE.Statement> es,es_1,statementLst,statementLst_1;
420420
DAE.Statement statement,statement_1;
421421
DAE.ExpType type_;
422-
DAE.Exp e1_1,e2_1,e1,e2,e_1,e,e1_2,e2_2;
422+
DAE.Exp e1_1,e2_1,e1,e2,e1_2,e2_2;
423423
list<DAE.Exp> expExpLst,expExpLst_1,inputExps;
424424
DAE.Else else_,else_1;
425425
DAE.ElementSource source;

0 commit comments

Comments
 (0)