Changeset ab9d3836 in OpenModelica


Ignore:
Timestamp:
2012-11-16T15:55:55+01:00 (11 years ago)
Author:
Jens Frenkel <jens.frenkel@…>
Branches:
Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
Children:
f52e7dca
Parents:
88557076
Message:
  • bugfix for last commit

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13924 f25d12d1-65f4-0310-ae8a-bbce733d8d8e

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/BackEnd/BackendDAEOptimize.mo

    r88557076 rab9d3836  
    24932493        aliasVars = List.fold(varlst,fixAliasConstBindings,aliasVars);
    24942494        (knvars1,_) = BackendVariable.traverseBackendDAEVarsWithUpdate(knvars,replaceVarTraverser,repl);
     2495        (inieqns,_) = BackendEquation.traverseBackendDAEEqnsWithUpdate(inieqns,replaceEquationTraverser,repl);
    24952496        (remeqns1,_) = BackendEquation.traverseBackendDAEEqnsWithUpdate(remeqns,replaceEquationTraverser,repl);
    24962497        (whenClauseLst1,_) = BackendVarTransform.replaceWhenClauses(whenClauseLst, repl, SOME(BackendVarTransform.skipPreChangeEdgeOperator));
     
    26312632    case ((e,repl))
    26322633      equation
    2633         ({e1},_) = BackendVarTransform.replaceEquations({e},repl,NONE());
     2634        ({e1},_) = BackendVarTransform.replaceEquations({e},repl,SOME(BackendVarTransform.skipPreChangeEdgeOperator));
    26342635      then ((e1,repl));
    26352636  end match;
    26362637end replaceEquationTraverser;
    2637 
    2638 
    2639 protected function replaceWhenClauseTraverser "function: replaceWhenClauseTraverser
    2640   author: Frenkel TUD 2010-04
    2641   It is possible to change the when clause.
    2642 "
    2643   input tuple<DAE.Exp,BackendVarTransform.VariableReplacements> inTpl;
    2644   output tuple<DAE.Exp,BackendVarTransform.VariableReplacements> outTpl;
    2645 algorithm
    2646   outTpl:=
    2647   match (inTpl)
    2648     local
    2649       DAE.Exp e,e1;
    2650       BackendVarTransform.VariableReplacements repl;
    2651     case ((e,repl))
    2652       equation
    2653         (e1,_) = BackendVarTransform.replaceExp(e, repl, NONE());
    2654       then
    2655         ((e1,repl));
    2656     case _ then inTpl;
    2657   end match;
    2658 end replaceWhenClauseTraverser;
    26592638
    26602639protected function replacementsInEqns2
     
    1018710166      then
    1018810167        ((e,(knvars,aliasvars,true)));
     10168    case((DAE.CALL(path=Absyn.IDENT(name = "pre"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),(knvars,aliasvars,_)))
     10169      then
     10170        ((e,(knvars,aliasvars,true)));
    1018910171    case((e as DAE.CALL(path=Absyn.IDENT(name = "pre"),expLst={DAE.CREF(componentRef=cr,ty=tp)},attr=attr),(knvars,aliasvars,_)))
    1019010172      equation
     
    1020010182      then
    1020110183        ((zero,(knvars,aliasvars,true)));
     10184    case((DAE.CALL(path=Absyn.IDENT(name = "change"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),(knvars,aliasvars,_)))
     10185      then
     10186        ((DAE.BCONST(false),(knvars,aliasvars,true)));
    1020210187    case((DAE.CALL(path=Absyn.IDENT(name = "change"),expLst={e as DAE.CREF(componentRef=cr,ty=tp)},attr=attr),(knvars,aliasvars,_)))
    1020310188      equation
     
    1021310198      then
    1021410199        ((zero,(knvars,aliasvars,true)));
     10200    case((DAE.CALL(path=Absyn.IDENT(name = "edge"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),(knvars,aliasvars,_)))
     10201      then
     10202        ((DAE.BCONST(false),(knvars,aliasvars,true)));
    1021510203    case((DAE.CALL(path=Absyn.IDENT(name = "edge"),expLst={e as DAE.CREF(componentRef=cr,ty=tp)},attr=attr),(knvars,aliasvars,_)))
    1021610204      equation
     
    1023910227      then
    1024010228        e;
     10229    case (DAE.CALL(path=Absyn.IDENT(name = "pre"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),_)
     10230      then
     10231        e;
    1024110232    case(DAE.CALL(path=Absyn.IDENT(name = "change"),expLst={DAE.CREF(componentRef=cr,ty=tp)}),_)
    1024210233      equation
     
    1024510236      then
    1024610237        e;
     10238    case (DAE.CALL(path=Absyn.IDENT(name = "change"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),_)
     10239      then
     10240        DAE.BCONST(false);
    1024710241    case(DAE.CALL(path=Absyn.IDENT(name = "edge"),expLst={DAE.CREF(componentRef=cr,ty=tp)}),_)
    1024810242      equation
     
    1025110245      then
    1025210246        e;
     10247    case (DAE.CALL(path=Absyn.IDENT(name = "edge"),expLst={e as DAE.CREF(componentRef=DAE.CREF_IDENT(ident="time"))}),_)
     10248      then
     10249        DAE.BCONST(false);
    1025310250    else
    1025410251      then
Note: See TracChangeset for help on using the changeset viewer.