Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 7366c32

Browse files
hkielOpenModelica-Hudson
authored andcommitted
do not recreate objects
Belonging to [master]: - #2089
1 parent 1a07660 commit 7366c32

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

Compiler/BackEnd/BackendVariable.mo

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2995,11 +2995,11 @@ algorithm
29952995
(_,b) = replaceVarWithWholeDimSubs(rest,iPerformed);
29962996
then (DAE.WHOLEDIM()::rest, b);
29972997

2998-
case (DAE.SLICE(exp = sub_exp)::rest, _)
2998+
case ((sub as DAE.SLICE(exp = sub_exp))::rest, _)
29992999
equation
30003000
(res,b) = replaceVarWithWholeDimSubs(rest,iPerformed);
30013001
const = Expression.isConst(sub_exp);
3002-
res = if const then DAE.SLICE(sub_exp)::rest else (DAE.WHOLEDIM()::rest);
3002+
res = if const then sub::rest else (DAE.WHOLEDIM()::rest);
30033003
then
30043004
(res, b or not const);
30053005

Compiler/FrontEnd/Types.mo

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3433,13 +3433,6 @@ algorithm
34333433
DAE.Dimensions dims;
34343434
DAE.Dimension dim;
34353435

3436-
// Array type
3437-
case DAE.T_ARRAY(dims = {dim})
3438-
equation
3439-
(ty, dims) = flattenArrayType(inType.ty);
3440-
then
3441-
(ty, dim :: dims);
3442-
34433436
// Array type
34443437
case DAE.T_ARRAY()
34453438
equation

0 commit comments

Comments
 (0)