@@ -1599,6 +1599,7 @@ algorithm
1599
1599
Integer nr;
1600
1600
list< Integer > lstInt;
1601
1601
list< Var > varLst;
1602
+ list< DAE . Type > typs;
1602
1603
1603
1604
// count the variables in array
1604
1605
case DAE . T_ARRAY (dims = ad)
@@ -1614,6 +1615,14 @@ algorithm
1614
1615
nr = List . reduce(lstInt, intAdd);
1615
1616
then
1616
1617
nr;
1618
+
1619
+ case DAE . T_TUPLE (tupleType= typs)
1620
+ equation
1621
+ lstInt = List . map(typs,sizeOf);
1622
+ nr = List . reduce(lstInt, intAdd);
1623
+ then
1624
+ nr;
1625
+
1617
1626
1618
1627
// for all other consider it just 1 variable
1619
1628
case _ then 1 ;
@@ -3267,21 +3276,9 @@ algorithm
3267
3276
outExps := (exp,exp::acc);
3268
3277
end expressionCollector;
3269
3278
3270
-
3271
3279
public function replaceCref
3272
3280
"function: replaceCref
3273
3281
Replace a componentref with a expression"
3274
- input tuple< DAE . Exp ,tuple< DAE . ComponentRef ,DAE . Exp >> inTpl;
3275
- input tuple< DAE . Exp ,tuple< DAE . ComponentRef ,DAE . Exp >> outTpl;
3276
- protected
3277
- DAE . Exp exp;
3278
- tuple< DAE . ComponentRef ,DAE . Exp > tpl;
3279
- algorithm
3280
- (exp,tpl) := inTpl;
3281
- outTpl := traverseExp(exp,replaceCrefWork,tpl);
3282
- end replaceCref;
3283
-
3284
- protected function replaceCrefWork
3285
3282
input tuple< DAE . Exp ,tuple< DAE . ComponentRef ,DAE . Exp >> inTpl;
3286
3283
output tuple< DAE . Exp ,tuple< DAE . ComponentRef ,DAE . Exp >> otpl;
3287
3284
algorithm
@@ -3296,7 +3293,7 @@ algorithm
3296
3293
((target,(cr1,target)));
3297
3294
else then inTpl;
3298
3295
end matchcontinue;
3299
- end replaceCrefWork ;
3296
+ end replaceCref ;
3300
3297
3301
3298
/** *************************************************/
3302
3299
/* traverse DAE.Exp */
0 commit comments