Skip to content

Commit

Permalink
- Added support for annotation LateInline=true as an alias of __Dymol…
Browse files Browse the repository at this point in the history
…a_InlineAfterIndexReduction and __MathCore_InlineAfterIndexReduction

  - With priority LateInline > Inline > EarlyInline
This line, and those below, will be ignored--

M    Compiler/FrontEnd/Inst.mo


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@8587 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 11, 2011
1 parent 772acb9 commit ad5ea08
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Compiler/FrontEnd/Inst.mo
Expand Up @@ -10690,19 +10690,26 @@ algorithm
res := matchcontinue(inSubModList)
local
list<SCode.SubMod> cdr;
case({}) then DAE.NO_INLINE();
case ({}) then DAE.NO_INLINE();

case(SCode.NAMEMOD("Inline",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.NORM_INLINE();
case (SCode.NAMEMOD("Inline",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: cdr)
equation
failure(DAE.AFTER_INDEX_RED_INLINE() = isInlineFunc4(cdr));
then DAE.NORM_INLINE();

case(SCode.NAMEMOD("__OpenModelica_EarlyInline",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.EARLY_INLINE();
case(SCode.NAMEMOD("LateInline",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.AFTER_INDEX_RED_INLINE();

case(SCode.NAMEMOD("__MathCore_InlineAfterIndexReduction",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.AFTER_INDEX_RED_INLINE();
then DAE.AFTER_INDEX_RED_INLINE();

case(SCode.NAMEMOD("__Dymola_InlineAfterIndexReduction",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.AFTER_INDEX_RED_INLINE();
case (SCode.NAMEMOD("__Dymola_InlineAfterIndexReduction",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: _)
then DAE.AFTER_INDEX_RED_INLINE();

case (SCode.NAMEMOD("__OpenModelica_EarlyInline",SCode.MOD(_,_,_,SOME((Absyn.BOOL(true),_)))) :: cdr)
equation
DAE.NO_INLINE() = isInlineFunc4(cdr);
then DAE.EARLY_INLINE();

case(_ :: cdr) then isInlineFunc4(cdr);
end matchcontinue;
Expand Down

0 comments on commit ad5ea08

Please sign in to comment.