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

Commit 49dc8a6

Browse files
sjoelundOpenModelica-Hudson
authored andcommitted
Remove all remaining DAE.TypeSource
1 parent 1ca1591 commit 49dc8a6

19 files changed

+16
-139
lines changed

Compiler/BackEnd/EvaluateFunctions.mo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1571,7 +1571,6 @@ algorithm
15711571
typOut := matchcontinue(typIn,outputs,originOutputs)
15721572
local
15731573
DAE.FunctionAttributes atts;
1574-
DAE.TypeSource source;
15751574
DAE.Type ty;
15761575
list<DAE.Type> outTypeLst;
15771576
list<DAE.FuncArg> inputs;

Compiler/FrontEnd/ComponentReference.mo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,6 @@ algorithm
15181518
DAE.Type tty;
15191519
DAE.Dimensions ad;
15201520
DAE.Exp es1;
1521-
DAE.TypeSource ts;
15221521

15231522
case({},_) then false;
15241523

@@ -3108,7 +3107,6 @@ algorithm
31083107
local
31093108
DAE.Ident id;
31103109
DAE.Type ty, basety,correctTy;
3111-
DAE.TypeSource source;
31123110
list<DAE.Dimension> dims;
31133111
list<DAE.Subscript> subs;
31143112
DAE.ComponentRef cref;

Compiler/FrontEnd/DAE.mo

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -818,9 +818,6 @@ type EqualityConstraint = Option<tuple<Absyn.Path, Integer, InlineType>>
818818
"contains the path to the equalityConstraint function,
819819
the dimension of the output and the inline type of the function";
820820

821-
public type TypeSource = list<Absyn.Path> "the class(es) where the type originated";
822-
public constant TypeSource emptyTypeSource = {} "an empty origin for the type";
823-
824821
// default constants that can be used
825822
constant Type T_REAL_DEFAULT = T_REAL({});
826823
constant Type T_INTEGER_DEFAULT = T_INTEGER({});
@@ -916,7 +913,6 @@ public uniontype Type "models the different front-end and back-end types"
916913
list<Var> varLst "complexVarLst; The variables of a complex type! Should be empty, kept here to verify!";
917914
Type complexType "complexType; A complex type can be a subtype of another (primitive) type (through extends)";
918915
EqualityConstraint equalityConstraint;
919-
TypeSource source;
920916
end T_SUBTYPE_BASIC;
921917

922918
record T_FUNCTION

Compiler/FrontEnd/Expression.mo

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,6 @@ algorithm
523523
local
524524
Type elt_tp;
525525
list<DAE.Dimension> dims;
526-
DAE.TypeSource ts;
527526

528527
case(DAE.T_ARRAY(elt_tp,dims),_)
529528
equation
@@ -1041,7 +1040,6 @@ algorithm
10411040
Type tp,t;
10421041
DAE.Dimension d;
10431042
DAE.Dimensions ds;
1044-
DAE.TypeSource ts;
10451043

10461044
case (DAE.T_ARRAY(ty = tp,dims = {_}))
10471045
then tp;
@@ -1134,7 +1132,6 @@ algorithm
11341132
Type ty_1,ty;
11351133
DAE.Dimensions dims;
11361134
DAE.Dimension dim;
1137-
DAE.TypeSource ts;
11381135

11391136
case (DAE.T_ARRAY(ty,dims),dim)
11401137
equation
@@ -1160,7 +1157,6 @@ algorithm
11601157
Type ty;
11611158
DAE.Dimensions dims;
11621159
DAE.Dimension dim;
1163-
DAE.TypeSource ts;
11641160

11651161
case (DAE.T_ARRAY(ty,dims),dim) then DAE.T_ARRAY(ty,dim::dims);
11661162

@@ -1178,7 +1174,6 @@ algorithm
11781174
local
11791175
Type ty;
11801176
DAE.Dimensions dims;
1181-
DAE.TypeSource ts;
11821177

11831178
case (_, {}) then inType;
11841179

@@ -1443,7 +1438,6 @@ algorithm
14431438
list<DAE.Exp> expl;
14441439
Integer dim;
14451440
DAE.Dimensions dims;
1446-
DAE.TypeSource ts;
14471441

14481442
case (_, DAE.ARRAY(
14491443
DAE.T_ARRAY(ty = ty, dims = DAE.DIM_INTEGER(dim) :: dims),
@@ -1475,7 +1469,6 @@ algorithm
14751469
local
14761470
DAE.Type ty;
14771471
DAE.Dimensions rest_dims;
1478-
DAE.TypeSource ts;
14791472

14801473
case (DAE.T_ARRAY(ty = ty, dims = _ :: rest_dims), _)
14811474
then DAE.T_ARRAY(ty, dimension :: rest_dims);
@@ -2334,7 +2327,6 @@ algorithm
23342327
local
23352328
Type ty,ty1;
23362329
DAE.Dimensions dims;
2337-
DAE.TypeSource source;
23382330
case DAE.T_ARRAY(ty=ty,dims=dims)
23392331
equation
23402332
_ = typeofRelation(ty);
@@ -4833,7 +4825,6 @@ algorithm
48334825
DAE.Type et;
48344826
DAE.Dimension dim1, dim2;
48354827
DAE.Dimensions dims1, dims2;
4836-
DAE.TypeSource ts;
48374828

48384829
case (DAE.T_ARRAY(ty = et, dims = dim1 :: dims1), DAE.T_ARRAY(dims = dim2 :: _))
48394830
equation
@@ -6033,7 +6024,6 @@ algorithm
60336024
local
60346025
DAE.Type ty, new_ty;
60356026
list<DAE.Dimension> dims, new_dims;
6036-
DAE.TypeSource src;
60376027
ArgT arg;
60386028
Boolean changed;
60396029
ClassInf.State state;
@@ -6047,10 +6037,10 @@ algorithm
60476037
then
60486038
(ty, arg);
60496039

6050-
case DAE.T_SUBTYPE_BASIC(state, vars, ty, ec, src)
6040+
case DAE.T_SUBTYPE_BASIC(state, vars, ty, ec)
60516041
equation
60526042
(new_ty, arg) = traverseExpTypeDims(ty, inFunc, inArg);
6053-
ty = if referenceEq(new_ty, ty) then inType else DAE.T_SUBTYPE_BASIC(state, vars, ty, ec, src);
6043+
ty = if referenceEq(new_ty, ty) then inType else DAE.T_SUBTYPE_BASIC(state, vars, ty, ec);
60546044
then
60556045
(ty, arg);
60566046

Compiler/FrontEnd/ExpressionSimplify.mo

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,6 @@ algorithm
10531053
Real r1;
10541054
array<array<DAE.Exp>> marr;
10551055
String name;
1056-
DAE.TypeSource source;
10571056

10581057
// If the argument to min/max is an array, try to flatten it.
10591058
case (DAE.CALL(path=Absyn.IDENT(name),expLst={e as DAE.ARRAY()},
@@ -1479,7 +1478,6 @@ algorithm
14791478
Integer i1,i2,i;
14801479
list<list<DAE.Exp>> ms1,ms2,mss;
14811480
Boolean sc;
1482-
DAE.TypeSource ts;
14831481

14841482
case (_,{},_,true) then listReverse(acc);
14851483

@@ -2457,7 +2455,6 @@ algorithm
24572455
DAE.Dimension n, m, p;
24582456
list<DAE.Exp> expl1, expl2;
24592457
DAE.Type ty, row_ty;
2460-
DAE.TypeSource tp;
24612458
list<list<DAE.Exp>> matrix;
24622459
DAE.Exp zero;
24632460
list<DAE.Dimension> dims;

Compiler/FrontEnd/InstBinding.mo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ algorithm
316316
Option<DAE.Distribution> distribution_value;
317317
FCore.Graph env;
318318
DAE.Mod mod;
319-
DAE.TypeSource ts;
320319
list<Integer> index_list;
321320
DAE.Type enumtype;
322321
FCore.Cache cache;

Compiler/FrontEnd/InstFunction.mo

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,6 @@ algorithm
799799
list<DAE.Var> vars, inputs, locals;
800800
list<DAE.FuncArg> fargs;
801801
DAE.EqualityConstraint eqCo;
802-
DAE.TypeSource src;
803802
String name, newName;
804803

805804
case(_, _, _)
@@ -873,7 +872,6 @@ algorithm
873872
list<DAE.Var> vars, inputs, locals;
874873
DAE.Type ty,recType,fixedTy,funcTy;
875874
DAE.EqualityConstraint eqCo;
876-
DAE.TypeSource src;
877875
FCore.Cache cache;
878876
Absyn.Path path;
879877
SCode.Element recordCl;

Compiler/FrontEnd/InstSection.mo

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3131,7 +3131,6 @@ algorithm
31313131
local
31323132
DAE.Type ty;
31333133
DAE.Dimensions dims;
3134-
DAE.TypeSource source;
31353134
ClassInf.State ci_state;
31363135
list<DAE.Var> vars;
31373136
DAE.EqualityConstraint ec;

Compiler/FrontEnd/InstUtil.mo

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3255,7 +3255,6 @@ algorithm
32553255
DAE.Type ty,ty_1;
32563256
Integer i;
32573257
DAE.Dimensions xs;
3258-
DAE.TypeSource ts;
32593258
DAE.Type tty;
32603259
DAE.Dimension dim;
32613260

@@ -5484,7 +5483,6 @@ algorithm
54845483
ClassInf.State classState;
54855484
DAE.EqualityConstraint equalityConstraint;
54865485
DAE.FunctionAttributes funcattr;
5487-
DAE.TypeSource ts;
54885486
String pstr;
54895487
SourceInfo info;
54905488

@@ -5534,9 +5532,7 @@ algorithm
55345532
equation
55355533
classState = arrayTTypeToClassInfState(arrayType);
55365534
resType = mktype(inPath, classState, inTypesVarLst, inTypesTypeOption, inEqualityConstraint, inClass);
5537-
somep = getOptPath(p);
5538-
ts = Types.mkTypeSource(somep);
5539-
resType = DAE.T_SUBTYPE_BASIC(inState,{},resType,inEqualityConstraint,ts);
5535+
resType = DAE.T_SUBTYPE_BASIC(inState,{},resType,inEqualityConstraint);
55405536
then
55415537
resType;
55425538

@@ -5565,10 +5561,7 @@ algorithm
55655561
case (p,st,l,SOME(bc),equalityConstraint,_)
55665562
equation
55675563
failure(ClassInf.META_UNIONTYPE(_) = st);
5568-
somep = getOptPath(p);
5569-
ts = Types.mkTypeSource(somep);
5570-
then
5571-
DAE.T_SUBTYPE_BASIC(st,l,bc,equalityConstraint,ts);
5564+
then DAE.T_SUBTYPE_BASIC(st,l,bc,equalityConstraint);
55725565
end matchcontinue;
55735566
end mktype;
55745567

@@ -5617,7 +5610,6 @@ algorithm
56175610
SCode.Element cl;
56185611
DAE.Type bc;
56195612
DAE.FunctionAttributes funcattr;
5620-
DAE.TypeSource ts;
56215613

56225614
case (_,ci,_,SOME(tp),_)
56235615
equation
@@ -5666,11 +5658,7 @@ algorithm
56665658
then DAE.T_COMPLEX(st,l,NONE()); // adrpo: TODO! check equalityConstraint!
56675659

56685660
case (p,st,l,SOME(bc),_)
5669-
equation
5670-
somep = getOptPath(p);
5671-
ts = Types.mkTypeSource(somep);
5672-
then
5673-
DAE.T_SUBTYPE_BASIC(st,l,bc,NONE(),ts);
5661+
then DAE.T_SUBTYPE_BASIC(st,l,bc,NONE());
56745662

56755663
else
56765664
equation

Compiler/FrontEnd/Lookup.mo

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ algorithm
262262
list<String> names;
263263
ClassInf.State ci_state;
264264
SCode.Encapsulated encflag;
265-
DAE.TypeSource ts;
266265
DAE.Mod mod;
267266

268267
// Record constructors
@@ -290,7 +289,6 @@ algorithm
290289
Types.checkEnumDuplicateLiterals(names, c.info);
291290
// generate the enumeration type
292291
path = FGraph.getGraphName(env_3);
293-
ts = Types.mkTypeSource(SOME(path));
294292
t = DAE.T_ENUMERATION(NONE(), path, names, types, {});
295293
env_3 = FGraph.mkTypeNode(env_3, id, t);
296294
then
@@ -2975,7 +2973,6 @@ algorithm
29752973
local
29762974
DAE.Type t,t_1;
29772975
DAE.Dimension dim;
2978-
DAE.TypeSource ts;
29792976
DAE.Subscript sub;
29802977
list<DAE.Subscript> ys,s;
29812978
Integer sz,ind,dim_int,step;
@@ -3522,7 +3519,6 @@ protected
35223519
list<DAE.Var> varlst;
35233520
list<SCode.Element> els;
35243521
Boolean singleton;
3525-
DAE.TypeSource ts;
35263522
FCore.Cache cache;
35273523
list<DAE.Type> typeVarsType;
35283524
list<String> typeVars;

0 commit comments

Comments
 (0)