Skip to content

Commit

Permalink
BackendDAECreate: removed inline for alg
Browse files Browse the repository at this point in the history
  • Loading branch information
vruge authored and OpenModelica-Hudson committed Apr 20, 2016
1 parent eb7652c commit 2e137d9
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -2394,15 +2394,13 @@ algorithm

case DAE.ALGORITHM(algorithm_=alg, source=source) equation
// calculate the size of the algorithm by collecting the left hand sites of the statemens
(alg, _) = Inline.inlineAlgorithm(alg, (SOME(functionTree), {DAE.NORM_INLINE()}));
crefLst = CheckModel.checkAndGetAlgorithmOutputs(alg, source, inCrefExpansion);
size = listLength(crefLst);
(eqns, reqns) = List.consOnBool(intGt(size, 0), BackendDAE.ALGORITHM(size, alg, source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_DYNAMIC), inEquations, inREquations);
then (eqns, reqns, inIEquations);

case DAE.INITIALALGORITHM(algorithm_=alg, source=source) equation
// calculate the size of the algorithm by collecting the left hand sites of the statemens
(alg, _) = Inline.inlineAlgorithm(alg, (SOME(functionTree), {DAE.NORM_INLINE()}));
crefLst = CheckModel.checkAndGetAlgorithmOutputs(alg, source, inCrefExpansion);
size = listLength(crefLst);
then (inEquations, inREquations, BackendDAE.ALGORITHM(size, alg, source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_INITIAL)::inIEquations);
Expand All @@ -2412,9 +2410,6 @@ algorithm
then (inEquations, inREquations, inIEquations);

case DAE.ASSERT(condition=cond, message=msg, level=level, source=source) equation
(cond, source, _,_) = Inline.inlineExp(cond, (SOME(functionTree), {DAE.NORM_INLINE()}), source);
(msg, source, _,_) = Inline.inlineExp(msg, (SOME(functionTree), {DAE.NORM_INLINE()}), source);
(level, source, _,_) = Inline.inlineExp(level, (SOME(functionTree), {DAE.NORM_INLINE()}), source);
BackendDAEUtil.checkAssertCondition(cond, msg, level, ElementSource.getElementSourceFileInfo(source));
alg = DAE.ALGORITHM_STMTS({DAE.STMT_ASSERT(cond, msg, level, source)});
then (inEquations, BackendDAE.ALGORITHM(0, alg, source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_DYNAMIC)::inREquations, inIEquations);
Expand All @@ -2423,12 +2418,10 @@ algorithm
then (inEquations, BackendDAE.ALGORITHM(0, DAE.ALGORITHM_STMTS({DAE.STMT_TERMINATE(msg, source)}), source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_DYNAMIC)::inREquations, inIEquations);

case DAE.NORETCALL(exp=e, source=source) equation
(e, source, _, _) = Inline.inlineExp(e, (SOME(functionTree), {DAE.NORM_INLINE()}), source);
alg = DAE.ALGORITHM_STMTS({DAE.STMT_NORETCALL(e, source)});
then (inEquations, BackendDAE.ALGORITHM(0, alg, source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_DYNAMIC)::inREquations, inIEquations);

case DAE.INITIAL_NORETCALL(exp=e, source=source) equation
(e, source, _, _) = Inline.inlineExp(e, (SOME(functionTree), {DAE.NORM_INLINE()}), source);
alg = DAE.ALGORITHM_STMTS({DAE.STMT_NORETCALL(e, source)});
then (inEquations, BackendDAE.ALGORITHM(0, alg, source, inCrefExpansion, BackendDAE.EQ_ATTR_DEFAULT_INITIAL)::inREquations, inIEquations);

Expand Down

0 comments on commit 2e137d9

Please sign in to comment.