Skip to content
This repository has been archived by the owner on May 18, 2019. It is now read-only.

Commit

Permalink
do not generate intermediate list
Browse files Browse the repository at this point in the history
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed Jun 14, 2017
1 parent b11bb97 commit 1b08e2b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Compiler/BackEnd/Initialization.mo
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ protected
BackendDAE.Equation eqn;
list<BackendDAE.WhenOperator> whenStmtLst;
DAE.ComponentRef cr;
list<DAE.ComponentRef > crefLst, crefLst2;
list<DAE.ComponentRef > crefLst;
Boolean active;
DAE.ElementSource source;
algorithm
Expand All @@ -422,11 +422,9 @@ algorithm
outEqns := eqn::outEqns;
else
crefLst := List.flatten(List.map(eLst,Expression.getAllCrefs));
crefLst2 := {};
for cr in crefLst loop
crefLst2 := listAppend(ComponentReference.expandCref(cr, true), crefLst2);
outLeftCrs := List.fold(ComponentReference.expandCref(cr, true), BaseHashSet.add, outLeftCrs);
end for;
outLeftCrs := List.fold(crefLst2, BaseHashSet.add, outLeftCrs);
end if;
then ();

Expand Down Expand Up @@ -1914,7 +1912,7 @@ algorithm
end if;
then ((parameters, anyStartValue), not anyStartValue);

else ((parameters, anyStartValue), true);
else (inParams, true);
end match;
end parameterCheck2;

Expand Down

0 comments on commit 1b08e2b

Please sign in to comment.