Skip to content

Commit

Permalink
- Added codegen for edge(not cref) since the backend makes those subs…
Browse files Browse the repository at this point in the history
…titutions now

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@13180 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Oct 4, 2012
1 parent d596b41 commit 6d2cc1d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Compiler/Template/CodegenC.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -6492,9 +6492,11 @@ template daeExpCall(Exp call, Context context, Text &preExp /*BUFP*/, Text &varD
daeExpCallPre(arg, context, preExp, varDecls)
// a $_start is used to get get start value of a variable
case CALL(path=IDENT(name="$_start"), expLst={arg}) then
daeExpCallStart(arg, context, preExp, varDecls)
daeExpCallStart(arg, context, preExp, varDecls)
case CALL(path=IDENT(name="edge"), expLst={arg as CREF(__)}) then
'(<%cref(arg.componentRef)%> && !$P$PRE<%cref(arg.componentRef)%>)'
case CALL(path=IDENT(name="edge"), expLst={LUNARY(exp = arg as CREF(__))}) then
'(!<%cref(arg.componentRef)%> && $P$PRE<%cref(arg.componentRef)%>)'
case CALL(path=IDENT(name="edge"), expLst={exp}) then
error(sourceInfo(), 'Code generation does not support edge(<%printExpStr(exp)%>)')
case CALL(path=IDENT(name="change"), expLst={arg as CREF(__)}) then
Expand Down

0 comments on commit 6d2cc1d

Please sign in to comment.