Skip to content

Commit

Permalink
Some restructure of code, moved functions from DAE to DAEUtil (inline…
Browse files Browse the repository at this point in the history
… functions)

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4792 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Björn Zachrisson committed Jan 18, 2010
1 parent 9862bdc commit 8e6439d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
14 changes: 0 additions & 14 deletions Compiler/DAE.mo
Expand Up @@ -275,20 +275,6 @@ public uniontype InlineType
end AFTER_INDEX_RED_INLINE;
end InlineType;

public function convertInlineTypeToBool "
Author: BZ, 2009-12
Function for converting a InlineType to a bool.
Whether the inline takes place before or after index reduction does not mather.
Any kind of inline will result in true.
"
input InlineType it;
output Boolean b;
algorithm b := matchcontinue(it)
case(NO_INLINE) then false;
case(_) then true;
end matchcontinue;
end convertInlineTypeToBool;

public uniontype FunctionDefinition

record FUNCTION_DEF "Normal function body"
Expand Down
14 changes: 14 additions & 0 deletions Compiler/DAEUtil.mo
Expand Up @@ -6253,4 +6253,18 @@ algorithm
source := addElementSourceTypeOpt(source, typeOpt);
end createElementSource;

public function convertInlineTypeToBool "
Author: BZ, 2009-12
Function for converting a InlineType to a bool.
Whether the inline takes place before or after index reduction does not mather.
Any kind of inline will result in true.
"
input DAE.InlineType it;
output Boolean b;
algorithm b := matchcontinue(it)
case(DAE.NO_INLINE) then false;
case(_) then true;
end matchcontinue;
end convertInlineTypeToBool;

end DAEUtil;
2 changes: 1 addition & 1 deletion Compiler/Inst.mo
Expand Up @@ -9513,7 +9513,7 @@ algorithm
case(SCode.ANNOTATION(SCode.MOD(_,_,smlst,_)) :: cdr)
equation
res = isInlineFunc4(smlst);
true = DAE.convertInlineTypeToBool(res);
true = DAEUtil.convertInlineTypeToBool(res);
then
res;
case(_ :: cdr)
Expand Down

0 comments on commit 8e6439d

Please sign in to comment.