Skip to content

Commit

Permalink
- use DAE.CREF directly without re-creating it (with the same values).
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@7229 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 29, 2010
1 parent 0754853 commit 7da3455
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Compiler/Algorithm.mo
Expand Up @@ -249,13 +249,14 @@ algorithm
DAE.Exp rhs_1,e3,e1;
DAE.Type ty;
list<DAE.Exp> ea2;
case (DAE.CREF(componentRef = c,ty = crt),lhprop,rhs,rhprop,source)

case (lhs as DAE.CREF(componentRef = c,ty = crt),lhprop,rhs,rhprop,source)
equation
(rhs_1,_) = Types.matchProp(rhs, rhprop, lhprop, true);
false = Types.isPropArray(lhprop);
t = getPropExpType(lhprop);
then
DAE.STMT_ASSIGN(t,DAE.CREF(c,crt),rhs_1,source);
DAE.STMT_ASSIGN(t,lhs,rhs_1,source);
/* TODO: Use this when we have fixed states in BackendDAE .lower(...)
case (e1 as DAE.CALL(Absyn.IDENT("der"),{DAE.CREF(_,_)},_,_,_),lhprop,rhs,rhprop)
equation
Expand Down

0 comments on commit 7da3455

Please sign in to comment.