Skip to content

Commit

Permalink
use nice names for $PRE and $CLKPRE in C and Cpp runtimes
Browse files Browse the repository at this point in the history
  • Loading branch information
rfranke committed Oct 17, 2015
1 parent 463e40e commit b1f63b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Compiler/Template/CodegenCppCommon.tpl
Expand Up @@ -96,6 +96,8 @@ template crefStrForWriteOutput(ComponentRef cr)
case CREF_IDENT(__) then '<%ident%><%subscriptsStrForWriteOutput(subscriptLst)%>'
// Are these even needed? Function context should only have CREF_IDENT :)
case CREF_QUAL(ident = "$DER") then 'der(<%crefStrForWriteOutput(componentRef)%>)'
case CREF_QUAL(ident = "$PRE") then 'pre(<%crefStrForWriteOutput(componentRef)%>)'
case CREF_QUAL(ident = "$CLKPRE") then 'previous(<%crefStrForWriteOutput(componentRef)%>)'
case CREF_QUAL(__) then '<%ident%><%subscriptsStrForWriteOutput(subscriptLst)%>.<%crefStrForWriteOutput(componentRef)%>'
else "CREF_NOT_IDENT_OR_QUAL"
end crefStrForWriteOutput;
Expand All @@ -120,6 +122,8 @@ template crefStr(ComponentRef cr)
case CREF_IDENT(__) then '<%ident%><%subscriptsStr(subscriptLst)%>'
// Are these even needed? Function context should only have CREF_IDENT :)
case CREF_QUAL(ident = "$DER") then 'der(<%crefStr(componentRef)%>)'
case CREF_QUAL(ident = "$PRE") then 'pre(<%crefStr(componentRef)%>)'
case CREF_QUAL(ident = "$CLKPRE") then 'previous(<%crefStr(componentRef)%>)'
case CREF_QUAL(__) then '<%ident%><%subscriptsStr(subscriptLst)%>.<%crefStr(componentRef)%>'
else "CREF_NOT_IDENT_OR_QUAL"
end crefStr;
Expand Down
2 changes: 2 additions & 0 deletions Compiler/Template/CodegenUtil.tpl
Expand Up @@ -95,6 +95,8 @@ template crefStr(ComponentRef cr)
case CREF_IDENT(__) then '<%System.unquoteIdentifier(ident)%><%subscriptsStr(subscriptLst)%>'
// Are these even needed? Function context should only have CREF_IDENT :)
case CREF_QUAL(ident = "$DER") then 'der(<%crefStr(componentRef)%>)'
case CREF_QUAL(ident = "$PRE") then 'pre(<%crefStr(componentRef)%>)'
case CREF_QUAL(ident = "$CLKPRE") then 'previous(<%crefStr(componentRef)%>)'
case CREF_QUAL(__) then '<%System.unquoteIdentifier(ident)%><%subscriptsStr(subscriptLst)%>._<%crefStr(componentRef)%>'
else "CREF_NOT_IDENT_OR_QUAL"
end crefStr;
Expand Down

0 comments on commit b1f63b6

Please sign in to comment.