Skip to content

Commit

Permalink
Added case for Real iterators in elabCallReduction2.
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4825 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
perost committed Jan 20, 2010
1 parent 392e019 commit 8f3ee28
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions Compiler/Static.mo
Expand Up @@ -1478,13 +1478,21 @@ protected function elabCallReduction2 "help function to elabCallReduction. symbo
output list<DAE.Exp> expl;
algorithm
expl := matchcontinue(e, valLst, id)
local Integer i;
DAE.Exp e1;
local
Integer i;
Real r;
DAE.Exp e1;
case(e, {}, id) then {};
case(e, Values.INTEGER(i)::valLst, id) equation
(e1,_) = Exp.replaceExp(e,DAE.CREF(DAE.CREF_IDENT(id,DAE.ET_OTHER(),{}),DAE.ET_OTHER()),DAE.ICONST(i));
expl = elabCallReduction2(e, valLst, id);
then e1::expl;
case(e, Values.INTEGER(i)::valLst, id)
equation
(e1,_) = Exp.replaceExp(e,DAE.CREF(DAE.CREF_IDENT(id,DAE.ET_OTHER(),{}),DAE.ET_OTHER()),DAE.ICONST(i));
expl = elabCallReduction2(e, valLst, id);
then e1::expl;
case(e, Values.REAL(r) :: valLst, id)
equation
(e1,_) = Exp.replaceExp(e, DAE.CREF(DAE.CREF_IDENT(id, DAE.ET_OTHER(), {}), DAE.ET_OTHER()), DAE.RCONST(r));
expl = elabCallReduction2(e, valLst, id);
then e1 :: expl;
end matchcontinue;
end elabCallReduction2;

Expand Down

0 comments on commit 8f3ee28

Please sign in to comment.