Skip to content

Commit

Permalink
- Removed ~30 more unused local declarations
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7659 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jan 7, 2011
1 parent 3923591 commit e6a88b7
Show file tree
Hide file tree
Showing 13 changed files with 9 additions and 32 deletions.
5 changes: 0 additions & 5 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -232,10 +232,6 @@ algorithm
list<DAE.Element> daeLstRest;
BackendDAE.BinTree states;
DAE.ElementSource source "the element source";
DAE.ElementSource eq_source;
list<tuple<DAE.Exp,DAE.Exp>> ealst;
String str;
DAE.Element ddl;

// the empty case
case ({},functionTree,vars,knvars,extVars,eqns,reqns,ieqns,aeqns,iaeqns,algs,ialgs,whenclauses,extObjCls,states)
Expand Down Expand Up @@ -325,7 +321,6 @@ algorithm
DAE.Statement s;
Boolean b1, b2;
String str;
DAE.Element ddl;

// adrpo: should we ignore OUTER vars?!
//case (((v as DAE.VAR(innerOuter=io)) :: xs),states,vars,knvars,extVars,whenclauses)
Expand Down
3 changes: 0 additions & 3 deletions Compiler/BackEnd/Derive.mo
Expand Up @@ -88,9 +88,7 @@ algorithm
DAE.ElementSource source,source1,sourceStmt;
Integer index,i_1,index1;
list<DAE.Exp> in_,in_1,out,out1,expExpLst,expExpLst1;
list<Boolean> blst;
DAE.ExpType exptyp;
list<DAE.ExpType> exptyplst;
array<DAE.Algorithm> a1;
list<tuple<Integer,Integer,Integer>> derivedAlgs,derivedMultiEqn;
Boolean add;
Expand Down Expand Up @@ -1007,7 +1005,6 @@ algorithm
local
BackendDAE.Variables timevars;
DAE.FunctionTree functions;
tuple<Integer,DAE.derivativeCond> cond;
Absyn.Path default,fname,da,inDFuncName;
list<tuple<Integer,DAE.derivativeCond>> cr;
Integer derivativeOrder;
Expand Down
3 changes: 1 addition & 2 deletions Compiler/BackEnd/SimCode.mo
Expand Up @@ -1485,7 +1485,7 @@ algorithm
DAE.Function fn;
String extfnname,lang,str;
list<DAE.Element> bivars, algs, vars, invars, outvars;
list<String> struct_strs,arg_strs,includes,libs,struct_strs_1,funrefStrs,fn_libs,fn_includes,rt,rt_1,struct_funrefs,struct_funrefs_int,defhead,head,foot,body,decl1,decl2,assign_res,ret_var,record_var,record_var_dot,return_stmt;
list<String> includes,libs,fn_libs,fn_includes,rt,rt_1;
Absyn.Path fpath;
list<tuple<String, Types.Type>> args;
Types.Type restype,tp;
Expand Down Expand Up @@ -8269,7 +8269,6 @@ algorithm
list<BackendDAE.Var> varlst;
BackendDAE.DivZeroExpReplace dzer;
list<DAE.Exp> divLst;
tuple<BackendDAE.Variables,BackendDAE.DivZeroExpReplace,list<DAE.Exp>> dlowmode;
DAE.Exp e,e1,e2;
Expression.Type ty;
String se;
Expand Down
3 changes: 1 addition & 2 deletions Compiler/FrontEnd/DAEDump.mo
Expand Up @@ -147,11 +147,10 @@ protected function funcGreaterThan "sorting function for two DAE.Element that ar
output Boolean res;
algorithm
res := matchcontinue(func1,func2)
local Absyn.Path p1,p2;
case(func1,func2) equation
res = stringCompare(functionNameStr(func1),functionNameStr(func2)) > 0;
then res;
case(_,_) then true;
else true;
end matchcontinue;
end funcGreaterThan;

Expand Down
9 changes: 6 additions & 3 deletions Compiler/FrontEnd/Dependency.mo
Expand Up @@ -143,9 +143,12 @@ protected function getTotalProgramDep "Help function to getTotalProgram2"
output AbsynDep.Depends outDep;
algorithm
outDep := matchcontinue(dep,className,p,env)
local Absyn.Class cl; AbsynDep.AvlTree classUses; list<Absyn.Path> v;
Option<Absyn.Path> optPath;
Absyn.ElementSpec comp;
local
Absyn.Class cl;
AbsynDep.AvlTree classUses;
list<Absyn.Path> v;
Option<Absyn.Path> optPath;
Absyn.ElementSpec comp;

case(dep,Absyn.FULLYQUALIFIED(className),p,env) then getTotalProgramDep(dep,className,p,env);
/* If already added, skip to prevent infinite recursion */
Expand Down
1 change: 0 additions & 1 deletion Compiler/FrontEnd/ExpressionDump.mo
Expand Up @@ -103,7 +103,6 @@ algorithm
list<Ident> ss;
Type t;
list<DAE.Dimension> dims;
list<tuple<Type,Ident>> varlst;
String s1,ts,res,s;
list<Var> vars;
ClassInf.State ci;
Expand Down
4 changes: 1 addition & 3 deletions Compiler/FrontEnd/ExpressionSimplify.mo
Expand Up @@ -123,7 +123,7 @@ algorithm
Boolean b,remove_if,tpl,builtin,b2;
Ident idn;
list<DAE.Exp> exps,exps_1,expl,matrix;
list<tuple<DAE.Exp, Boolean>> explTpl;
list<tuple<DAE.Exp,Boolean>> explTpl;
list<Subscript> s;
ComponentRef c_1;
Operator op;
Expand Down Expand Up @@ -766,8 +766,6 @@ algorithm
local
DAE.Exp e,exp,e1,e2,exp_2,exp_3;
Operator op;
String s2;
Boolean b;

case ((exp as DAE.BINARY(exp1 = e1,operator = op,exp2 = e2))) /* multiple terms/factor simplifications */
equation
Expand Down
2 changes: 0 additions & 2 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -3229,7 +3229,6 @@ algorithm
DAE.EqualityConstraint eqConstraint;
ConnectionGraph.ConnectionGraph graph;
InstanceHierarchy ih;
String str;

// This rule describes how to instantiate a class definition
// that extends a basic type. (No equations or algorithms allowed)
Expand Down Expand Up @@ -10249,7 +10248,6 @@ algorithm
local
DAE.EqMod eq;
DAE.Exp e;
Option<tuple<Absyn.Exp,Boolean>> aoe;
case(DAE.NAMEMOD(inputVar,mod = DAE.MOD(eqModOption = SOME(eq as DAE.TYPED(modifierAsExp=e)))))
equation
then (inputVar,DAE.NO_DERIVATIVE(e));
Expand Down
1 change: 0 additions & 1 deletion Compiler/FrontEnd/Static.mo
Expand Up @@ -10013,7 +10013,6 @@ algorithm
local
Ident id,id2;
DAE.Type ty;
tuple<String,DAE.Type> farg;
list<tuple<Ident, DAE.Type>> ts;
case (id,(id2,ty) :: ts)
equation
Expand Down
1 change: 0 additions & 1 deletion Compiler/FrontEnd/UnitAbsynBuilder.mo
Expand Up @@ -73,7 +73,6 @@ protected function registerUnitWeightDefineunits "help function to registerUnitW
input list<SCode.Element> du;
algorithm
_ := matchcontinue(du)
local String n; Real w;
/* No defineunits found, for backward compatibility, use default implementation:
SI system ,with lower cost on Hz and Bq */
case({}) equation
Expand Down
4 changes: 0 additions & 4 deletions Compiler/Template/Tpl.mo
Expand Up @@ -406,7 +406,6 @@ public function isAtStartOfLine
algorithm
_ := match (inTok)
local
list<tuple<Tokens,BlockType>> blstack;
StringToken tok;

//a new-line at the end
Expand Down Expand Up @@ -805,7 +804,6 @@ algorithm
local
Tokens toks;
StringToken tok;
list<tuple<Tokens,BlockType>> blstack;
Integer pos, aind;
Boolean isstart;

Expand Down Expand Up @@ -844,7 +842,6 @@ algorithm
:= match (inStringToken, inActualPositionOnLine, inAtStartOfLine, inAfterNewLineIndent)
local
Tokens toks;
list<tuple<Tokens,BlockType>> blstack;
BlockType bt;
String str;
list<String> strLst;
Expand Down Expand Up @@ -1080,7 +1077,6 @@ algorithm
local
Tokens toks;
StringToken septok, tok, asep, wsep;
list<tuple<Tokens,BlockType>> blstack;
Integer nchars, tsnchars, aind, w, aoffset, anum, wwidth, blen;
Boolean isstart;

Expand Down
3 changes: 0 additions & 3 deletions Compiler/Template/TplAbsyn.mo
Expand Up @@ -1648,7 +1648,6 @@ algorithm
list<Expression> explst;
TypedIdents iargs, oargs;
Expression exp;
list<tuple<MatchingExp,Expression>> mcases;
String litvalue;
StringToken st;

Expand Down Expand Up @@ -2009,7 +2008,6 @@ algorithm
TypeSignature outtype;
TemplPackage tplPackage;
list<ASTDef> astDefs;
list<tuple<Ident,TemplateDef>> tpldefs;
MMExp mmexp, mmtxt;
String str;

Expand Down Expand Up @@ -4327,7 +4325,6 @@ algorithm
local
Ident ident;
TypeSignature idtype, lt;
list<tuple<Ident,TemplateDef>> tpldefs;
StringToken st;
String litstr, reason;

Expand Down
2 changes: 0 additions & 2 deletions Compiler/Template/TplParser.mo
Expand Up @@ -411,7 +411,6 @@ algorithm
(outChars, isKeyword) := matchcontinue (inChars, inKeywordChars)
local
list<String> chars, kwchars;
String c;

case (chars, kwchars)
equation
Expand Down Expand Up @@ -475,7 +474,6 @@ algorithm
local
list<String> chars;
LineInfo linfo;
String kw;

case (chars, linfo)
equation
Expand Down

0 comments on commit e6a88b7

Please sign in to comment.