This repository was archived by the owner on May 18, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +39
-2
lines changed
Expand file tree Collapse file tree 4 files changed +39
-2
lines changed Original file line number Diff line number Diff line change @@ -810,6 +810,30 @@ uniontype Call
810810 end match;
811811 end isVectorizeable;
812812
813+ function retype
814+ input output Call call;
815+ algorithm
816+ () := match call
817+ local
818+ Type ty;
819+ list< Dimension > dims;
820+
821+ case TYPED_ARRAY_CONSTRUCTOR ()
822+ algorithm
823+ dims := {};
824+
825+ for i in listReverse(call. iters) loop
826+ dims := listAppend(Type . arrayDims(Expression . typeOf(Util . tuple22(i))), dims);
827+ end for ;
828+
829+ call. ty := Type . liftArrayLeftList(Type . arrayElementType(call. ty), dims);
830+ then
831+ ();
832+
833+ else ();
834+ end match;
835+ end retype;
836+
813837protected
814838 function instNormalCall
815839 input Absyn . ComponentRef functionName;
Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ algorithm
168168 (outExp, outChanged) := Expression . mapFoldShallow(exp,
169169 function evaluateExpTraverser(isExternalArg = Call . isExternal(exp. call)), false );
170170 then
171- outExp;
171+ if outChanged then Expression . retype(outExp) else outExp;
172172
173173 else
174174 algorithm
Original file line number Diff line number Diff line change @@ -4701,6 +4701,12 @@ public
47014701 then
47024702 ();
47034703
4704+ case CALL (call = Call . TYPED_ARRAY_CONSTRUCTOR ())
4705+ algorithm
4706+ exp. call := Call . retype(exp. call);
4707+ then
4708+ ();
4709+
47044710 else ();
47054711 end match;
47064712 end retype;
Original file line number Diff line number Diff line change 9797 protected
9898 IOStream . IOStream s;
9999 Boolean first;
100+ Binding b;
100101 algorithm
101102 s := IOStream . create(getInstanceName(), IOStream . IOStreamType . LIST ());
102103
@@ -122,9 +123,15 @@ public
122123 s := IOStream . append(s, ", " );
123124 end if ;
124125
126+ b := Util . tuple22(a);
127+
128+ if Binding . isEach(b) then
129+ s := IOStream . append(s, "each " );
130+ end if ;
131+
125132 s := IOStream . append(s, Util . tuple21(a));
126133 s := IOStream . append(s, " = " );
127- s := IOStream . append(s, Binding . toString(Util . tuple22(a) ));
134+ s := IOStream . append(s, Binding . toString(b ));
128135 end for ;
129136
130137 s := IOStream . append(s, ")" );
You can’t perform that action at this time.
0 commit comments