Skip to content

Commit

Permalink
- traverse NORETCALL in PartFn and BackendDAETransform correct
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13360 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Oct 12, 2012
1 parent 1aa9316 commit f4c7884
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDAETransform.mo
Expand Up @@ -3325,7 +3325,7 @@ algorithm
case (BackendDAE.NORETCALL(functionName=functionName,functionArgs=functionArgs,source=source)::res,_,_)
equation
(res1,ext_arg_1) = traverseBackendDAEExpsWhenOperator(res,func,inTypeA);
((functionArgs,ext_arg_2)) = Expression.traverseExpList(functionArgs,func,ext_arg_1);
((DAE.CALL(path=functionName,expLst=functionArgs),ext_arg_2)) = Expression.traverseExp(DAE.CALL(functionName,functionArgs,DAE.CALL_ATTR(DAE.T_NORETCALL_DEFAULT, false, false, DAE.NORM_INLINE(), DAE.NO_TAIL())),func,ext_arg_1);
then
(BackendDAE.NORETCALL(functionName,functionArgs,source)::res1,ext_arg_2);

Expand Down
8 changes: 5 additions & 3 deletions Compiler/BackEnd/BackendDAEUtil.mo
Expand Up @@ -7307,16 +7307,18 @@ algorithm
local
BackendDAE.Variables vars2;
EquationArray reqns,ieqns;
Type_a ext_arg_1,ext_arg_2,ext_arg_4,ext_arg_5;
Type_a ext_arg_1,ext_arg_2,ext_arg_4,ext_arg_5,ext_arg_6;
list<BackendDAE.EqSystem> systs;
case (BackendDAE.DAE(eqs=systs,shared=BackendDAE.SHARED(knownVars = vars2,initialEqs = ieqns,removedEqs = reqns)),_,_)
list<BackendDAE.WhenClause> wc;
case (BackendDAE.DAE(eqs=systs,shared=BackendDAE.SHARED(knownVars = vars2,initialEqs = ieqns,removedEqs = reqns,eventInfo=BackendDAE.EVENT_INFO(whenClauseLst=wc))),_,_)
equation
ext_arg_1 = List.fold1(systs,traverseBackendDAEExpsEqSystemWithUpdate,func,inTypeA);
ext_arg_2 = traverseBackendDAEExpsVarsWithUpdate(vars2,func,ext_arg_1);
ext_arg_4 = traverseBackendDAEExpsEqnsWithUpdate(reqns,func,ext_arg_2);
ext_arg_5 = traverseBackendDAEExpsEqnsWithUpdate(ieqns,func,ext_arg_4);
(_,ext_arg_6) = BackendDAETransform.traverseBackendDAEExpsWhenClauseLst(wc,func,ext_arg_5);
then
ext_arg_5;
ext_arg_6;
else
equation
Error.addMessage(Error.INTERNAL_ERROR,{"BackendDAEUtil.traverseBackendDAEExpsNoCopyWithUpdate failed"});
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/PartFn.mo
Expand Up @@ -351,7 +351,7 @@ algorithm

case(DAE.NORETCALL(p,elst,source),dae)
equation
(elst_1,dae) = elabExpList(elst,dae);
((DAE.CALL(path=p,expLst=elst_1),dae)) = Expression.traverseExp(DAE.CALL(p,elst,DAE.CALL_ATTR(DAE.T_NORETCALL_DEFAULT, false, false, DAE.NORM_INLINE(), DAE.NO_TAIL())),elabExp,dae);
then
(DAE.NORETCALL(p,elst_1,source),dae);

Expand Down

0 comments on commit f4c7884

Please sign in to comment.