Skip to content

Commit

Permalink
do not recreate objects
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2089
  • Loading branch information
hkiel authored and OpenModelica-Hudson committed Dec 21, 2017
1 parent 1a07660 commit 7366c32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Compiler/BackEnd/BackendVariable.mo
Expand Up @@ -2995,11 +2995,11 @@ algorithm
(_,b) = replaceVarWithWholeDimSubs(rest,iPerformed);
then (DAE.WHOLEDIM()::rest, b);

case (DAE.SLICE(exp = sub_exp)::rest, _)
case ((sub as DAE.SLICE(exp = sub_exp))::rest, _)
equation
(res,b) = replaceVarWithWholeDimSubs(rest,iPerformed);
const = Expression.isConst(sub_exp);
res = if const then DAE.SLICE(sub_exp)::rest else (DAE.WHOLEDIM()::rest);
res = if const then sub::rest else (DAE.WHOLEDIM()::rest);
then
(res, b or not const);

Expand Down
7 changes: 0 additions & 7 deletions Compiler/FrontEnd/Types.mo
Expand Up @@ -3433,13 +3433,6 @@ algorithm
DAE.Dimensions dims;
DAE.Dimension dim;

// Array type
case DAE.T_ARRAY(dims = {dim})
equation
(ty, dims) = flattenArrayType(inType.ty);
then
(ty, dim :: dims);

// Array type
case DAE.T_ARRAY()
equation
Expand Down

0 comments on commit 7366c32

Please sign in to comment.