Skip to content

Commit

Permalink
- fix bootstrapp compilation
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@12198 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
Jens Frenkel committed Jun 24, 2012
1 parent 0c31730 commit 510b585
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
14 changes: 10 additions & 4 deletions Compiler/BackEnd/BackendEquation.mo
Expand Up @@ -1532,12 +1532,18 @@ end equationSource;

public function equationSize "Retrieve the size from a BackendDAE.BackendDAE equation"
input BackendDAE.Equation eq;
output Integer size;
output Integer osize;
algorithm
size := match eq
local list<Integer> ds;
osize := match eq
local
list<Integer> ds;
Integer size;
case BackendDAE.EQUATION(source=_) then 1;
case BackendDAE.ARRAY_EQUATION(dimSize=ds) then List.fold(ds,intMul,1);
case BackendDAE.ARRAY_EQUATION(dimSize=ds)
equation
size = List.fold(ds,intMul,1);
then
size;
case BackendDAE.ARRAY_EQUATIONWRAPPER(source=_) then 1;
case BackendDAE.SOLVED_EQUATION(source=_) then 1;
case BackendDAE.RESIDUAL_EQUATION(source=_) then 1;
Expand Down
5 changes: 3 additions & 2 deletions Compiler/FrontEnd/ExpressionSimplify.mo
Expand Up @@ -125,13 +125,14 @@ public function condsimplify "function condsimplify
output Boolean hasChanged;
algorithm
(outExp,hasChanged) := match(cond,inExp)
local DAE.Exp e;
case(true,_)
equation
(outExp,hasChanged) = simplifyWithOptions(inExp,optionSimplifyOnly);
then
(outExp,hasChanged);
else
then (inExp,cond);
case(false,e)
then (e,false);
end match;
end condsimplify;

Expand Down

0 comments on commit 510b585

Please sign in to comment.