Skip to content

Commit

Permalink
- fix SimCodeC.tpl for records(containing arrays) pushed to functions
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5763 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 30, 2010
1 parent bb14693 commit 82cfddd
Show file tree
Hide file tree
Showing 4 changed files with 377 additions and 304 deletions.
21 changes: 21 additions & 0 deletions Compiler/SimCode.mo
Expand Up @@ -7547,6 +7547,27 @@ algorithm
end matchcontinue;
end printExpOptStrIfConst;

public function makeCrefRecordExp
"function: makeCrefRecordExp
Helper function to generate records."
input DAE.ComponentRef inCRefRecord;
input DAE.ExpVar inVar;
output DAE.Exp outExp;
algorithm
outExp := matchcontinue (inCRefRecord,inVar)
local
DAE.ComponentRef cr,cr1;
String name;
DAE.ExpType tp;
case (cr,DAE.COMPLEX_VAR(name=name,tp=tp))
equation
cr1 = Exp.extendCref(cr,tp,name,{});
outExp = Exp.makeCrefExp(cr1,tp);
then
outExp;
end matchcontinue;
end makeCrefRecordExp;

/*****************************************************************************/
/* */
/* END OF DIRTY SIMCODEGEN FUNCTIONS */
Expand Down

0 comments on commit 82cfddd

Please sign in to comment.