@@ -9380,35 +9380,8 @@ algorithm
93809380 DAE.Dimension dim;
93819381
93829382 case ({},ty) then ty;
9383- case ((DAE.DIM_INTEGER(integer = i) :: xs),tty)
9384- equation
9385- ty_1 = makeArrayType(xs, tty);
9386- ts = Types.getTypeSource(tty);
9387- then
9388- DAE.T_ARRAY(ty_1,{DAE.DIM_INTEGER(i)},ts);
9389-
9390- case ((DAE.DIM_ENUM(size = i) :: xs), tty)
9391- equation
9392- ty_1 = makeArrayType(xs, tty);
9393- ts = Types.getTypeSource(tty);
9394- then
9395- DAE.T_ARRAY(ty_1,{DAE.DIM_INTEGER(i)},ts);
9396-
9397- /*case ((DAE.DIM_SUBSCRIPT(subscript = _) :: xs),tty)
9398- equation
9399- ty_1 = makeArrayType(xs, tty);
9400- ts = Types.getTypeSource(tty);
9401- then
9402- DAE.T_ARRAY(ty_1,{DAE.DIM_UNKNOWN()},ts);*/
94039383
9404- case (DAE.DIM_UNKNOWN() :: xs, tty)
9405- equation
9406- ty_1 = makeArrayType(xs, tty);
9407- ts = Types.getTypeSource(tty);
9408- then
9409- DAE.T_ARRAY(ty_1, {DAE.DIM_UNKNOWN()}, ts);
9410-
9411- case ((dim as DAE.DIM_EXP(exp = _)) :: xs, tty)
9384+ case (dim :: xs, tty)
94129385 equation
94139386 ty_1 = makeArrayType(xs, tty);
94149387 ts = Types.getTypeSource(tty);
@@ -10301,6 +10274,7 @@ algorithm
1030110274 case (DAE.DIM_UNKNOWN(),_) then DAE.WHOLEDIM();
1030210275 case (DAE.DIM_INTEGER(integer = i),_) then DAE.INDEX(DAE.ICONST(i));
1030310276 case (DAE.DIM_ENUM(size = i), _) then DAE.INDEX(DAE.ICONST(i));
10277+ case (DAE.DIM_BOOLEAN(), _) then DAE.INDEX(DAE.ICONST(2));
1030410278 case (DAE.DIM_EXP(exp = e), _) then DAE.INDEX(e);
1030510279 end match;
1030610280end instDimExp;
@@ -10320,6 +10294,7 @@ algorithm
1032010294 case (DAE.DIM_UNKNOWN(),_) then DAE.WHOLEDIM();
1032110295 case (DAE.DIM_INTEGER(integer = i),_) then DAE.WHOLE_NONEXP(DAE.ICONST(i));
1032210296 case (DAE.DIM_ENUM(size = i), _) then DAE.WHOLE_NONEXP(DAE.ICONST(i));
10297+ case (DAE.DIM_BOOLEAN(), _) then DAE.WHOLE_NONEXP(DAE.ICONST(2));
1032310298 //case (DAE.DIM_EXP(exp = e as DAE.RANGE(exp = _)), _) then DAE.INDEX(e);
1032410299 case (DAE.DIM_EXP(exp = e), _) then DAE.WHOLE_NONEXP(e);
1032510300 end match;
@@ -10703,13 +10678,13 @@ algorithm
1070310678 DAE.Exp e,lhs,rhs;
1070410679 DAE.Properties p;
1070510680 Env.Cache cache;
10706- Env.Env env_1,env,compenv;
10681+ Env.Env env_1,env_2, env,compenv;
1070710682 Connect.Sets csets;
1070810683 DAE.Type ty;
1070910684 ClassInf.State st,ci_state;
1071010685 DAE.ComponentRef cr;
1071110686 DAE.Type ty_1;
10712- DAE.Mod mod,mod_1;
10687+ DAE.Mod mod,mod_1,mod_2 ;
1071310688 Prefix.Prefix pre;
1071410689 String n, str1, str2, str3, str4;
1071510690 SCode.Element cl;
@@ -10865,6 +10840,18 @@ algorithm
1086510840 then
1086610841 (cache,env,ih,store,DAEUtil.emptyDae,csets,DAE.T_UNKNOWN_DEFAULT,graph);
1086710842
10843+ case (cache, env, ih, store, ci_state, mod, pre, n, (cl, attr), pf, i, DAE.DIM_BOOLEAN(), dims, idxs, inst_dims, impl, comment, _, graph, csets)
10844+ equation
10845+ mod_1 = Mod.lookupIdxModification(mod, i);
10846+ mod_2 = Mod.lookupIdxModification(mod, i+1);
10847+ (cache, env_1, ih, store, dae1, csets, ty, graph) =
10848+ instVar2(cache, env, ih, store, ci_state, mod_1, pre, n, cl, attr, pf, dims, (DAE.INDEX(DAE.BCONST(false)) :: idxs), inst_dims, impl, comment, info, graph, csets);
10849+ (cache, _, ih, store, dae2, csets, ty, graph) =
10850+ instVar2(cache, env, ih, store, ci_state, mod_2, pre, n, cl, attr, pf, dims, (DAE.INDEX(DAE.BCONST(true)) :: idxs), inst_dims, impl, comment, info, graph, csets);
10851+ daeLst = DAEUtil.joinDaes(dae1, dae2);
10852+ then
10853+ (cache, env_1, ih, store, daeLst, csets, ty, graph);
10854+
1086810855 case (cache,env,ih,store,ci_state,mod,pre,n,(cl,attr),pf,i,_,dims,idxs,inst_dims,impl,comment,_,graph,_)
1086910856 equation
1087010857 failure(_ = Mod.lookupIdxModification(mod, i));
0 commit comments