Skip to content

Commit

Permalink
- Added tail-recursion for NORETCALL statements
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12054 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jun 14, 2012
1 parent 1b69f3c commit 4b7fc6b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -17461,6 +17461,11 @@ algorithm
rhs = optimizeStatementTail2(path,rhs,lhsNames,invars,outvars,source);
stmt = Util.if_(Expression.isTailCall(rhs),DAE.STMT_NORETCALL(rhs,source),DAE.STMT_TUPLE_ASSIGN(tp,lhsLst,rhs,source));
then stmt;
case (path,DAE.STMT_NORETCALL(rhs,source),invars,{})
equation
rhs = optimizeStatementTail2(path,rhs,{},invars,{},source);
stmt = DAE.STMT_NORETCALL(rhs,source);
then stmt;
else inStmt;
end matchcontinue;
end optimizeStatementTail;
Expand Down

0 comments on commit 4b7fc6b

Please sign in to comment.