Skip to content

Commit

Permalink
- Enabled some error messages by default: don't hide error messages o…
Browse files Browse the repository at this point in the history
…f failing functions as long as the function is not supposed to fail in certain cases

- Fixed zcEqual and getMinZeroCrossings to also handle sample-calls
- Cleaned up more patterns 


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23073 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
lochel committed Oct 30, 2014
1 parent faf7e01 commit 10b89b9
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 87 deletions.
12 changes: 6 additions & 6 deletions Compiler/BackEnd/BackendDAECreate.mo
Expand Up @@ -3247,30 +3247,30 @@ public function expInt "returns the int value of an expression"
input BackendDAE.Variables inKnVariables;
output Integer i;
algorithm
i := match(inExp, inKnVariables)
i := match(inExp)
local
Integer i1, i2;
DAE.ComponentRef cr;
DAE.Exp e, e1, e2;

case (DAE.ICONST(integer=i2), _)
case DAE.ICONST(integer=i2)
then i2;

case (DAE.ENUM_LITERAL(index=i2), _)
case DAE.ENUM_LITERAL(index=i2)
then i2;

case (DAE.CREF(componentRef=cr), _) equation
case DAE.CREF(componentRef=cr) equation
((BackendDAE.VAR(bindExp=SOME(e)):: _), _) = BackendVariable.getVar(cr, inKnVariables);
i2 = expInt(e, inKnVariables);
then i2;

case (DAE.BINARY(exp1=e1, operator=DAE.ADD(DAE.T_INTEGER(varLst=_)), exp2=e2), _) equation
case DAE.BINARY(exp1=e1, operator=DAE.ADD(DAE.T_INTEGER(varLst=_)), exp2=e2) equation
i1 = expInt(e1, inKnVariables);
i2 = expInt(e2, inKnVariables);
i = i1 + i2;
then i;

case (DAE.BINARY(exp1=e1, operator=DAE.SUB(DAE.T_INTEGER(varLst=_)), exp2=e2), _) equation
case DAE.BINARY(exp1=e1, operator=DAE.SUB(DAE.T_INTEGER(varLst=_)), exp2=e2) equation
i1 = expInt(e1, inKnVariables);
i2 = expInt(e2, inKnVariables);
i = i1 - i2;
Expand Down
2 changes: 1 addition & 1 deletion Compiler/BackEnd/BackendDump.mo
Expand Up @@ -619,7 +619,7 @@ algorithm
print("\n");
end dumpStateSets;

protected function dumpZeroCrossingList "function dumpZeroCrossingList"
public function dumpZeroCrossingList "function dumpZeroCrossingList"
input list<BackendDAE.ZeroCrossing> inZeroCrossingList;
input String heading;
algorithm
Expand Down

0 comments on commit 10b89b9

Please sign in to comment.