Skip to content

Commit deffc89

Browse files
committed
- More RTOpts guards for MetaModelica cases
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@4613 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent b6d2f33 commit deffc89

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Compiler/Inst.mo

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6713,7 +6713,7 @@ algorithm
67136713
case (cache,env,mods,pre,inClass as SCode.CLASS(name = id,restriction = SCode.R_TYPE(),
67146714
classDef = SCode.DERIVED(Absyn.TPATH(path = cn, arrayDim = ad),modifications = mod)),
67156715
dims,impl)
6716-
equation
6716+
equation
67176717
(cache,cl,cenv) = Lookup.lookupClass(cache,env, cn, true);
67186718
owncref = Absyn.CREF_IDENT(id,{});
67196719
ad_1 = getOptionArraydim(ad);
@@ -9405,26 +9405,31 @@ algorithm
94059405
/* MetaModelica extensions */
94069406
case (vn,ty as(DAE.T_LIST(_),_),fl,st,kind,dir,prot,e,inst_dims,start,dae_var_attr,comment,io,finalPrefix,declareComplexVars)
94079407
equation
9408+
true = RTOpts.acceptMetaModelicaGrammar();
94089409
finst_dims = Util.listFlatten(inst_dims);
94099410
dae_var_attr = DAEUtil.setFinalAttr(dae_var_attr,finalPrefix);
94109411
then {DAE.VAR(vn,kind,dir,prot,ty,e,finst_dims,fl,st,{},dae_var_attr,comment,io)};
94119412
case (vn,ty as(DAE.T_METATUPLE(_),_),fl,st,kind,dir,prot,e,inst_dims,start,dae_var_attr,comment,io,finalPrefix,declareComplexVars)
94129413
equation
9414+
true = RTOpts.acceptMetaModelicaGrammar();
94139415
finst_dims = Util.listFlatten(inst_dims);
94149416
dae_var_attr = DAEUtil.setFinalAttr(dae_var_attr,finalPrefix);
94159417
then {DAE.VAR(vn,kind,dir,prot,ty,e,finst_dims,fl,st,{},dae_var_attr,comment,io)};
94169418
case (vn,ty as(DAE.T_METAOPTION(_),_),fl,st,kind,dir,prot,e,inst_dims,start,dae_var_attr,comment,io,finalPrefix,declareComplexVars)
94179419
equation
9420+
true = RTOpts.acceptMetaModelicaGrammar();
94189421
finst_dims = Util.listFlatten(inst_dims);
94199422
dae_var_attr = DAEUtil.setFinalAttr(dae_var_attr,finalPrefix);
94209423
then {DAE.VAR(vn,kind,dir,prot,ty,e,finst_dims,fl,st,{},dae_var_attr,comment,io)};
94219424
case (vn,ty as(DAE.T_UNIONTYPE(_),_),fl,st,kind,dir,prot,e,inst_dims,start,dae_var_attr,comment,io,finalPrefix,declareComplexVars)
94229425
equation
9426+
true = RTOpts.acceptMetaModelicaGrammar();
94239427
finst_dims = Util.listFlatten(inst_dims);
94249428
dae_var_attr = DAEUtil.setFinalAttr(dae_var_attr,finalPrefix);
94259429
then {DAE.VAR(vn,kind,dir,prot,ty,e,finst_dims,fl,st,{},dae_var_attr,comment,io)};
94269430
case (vn,ty as(DAE.T_POLYMORPHIC(_),_),fl,st,kind,dir,prot,e,inst_dims,start,dae_var_attr,comment,io,finalPrefix,declareComplexVars)
94279431
equation
9432+
true = RTOpts.acceptMetaModelicaGrammar();
94289433
finst_dims = Util.listFlatten(inst_dims);
94299434
dae_var_attr = DAEUtil.setFinalAttr(dae_var_attr,finalPrefix);
94309435
then {DAE.VAR(vn,kind,dir,prot,ty,e,finst_dims,fl,st,{},dae_var_attr,comment,io)};
@@ -10446,21 +10451,25 @@ algorithm
1044610451
/* MetaModelica types */
1044710452
case (e1,e2,(DAE.T_LIST(_),_),initial_)
1044810453
equation
10454+
true = RTOpts.acceptMetaModelicaGrammar();
1044910455
dae = makeDaeEquation(e1, e2, initial_);
1045010456
then
1045110457
{dae};
1045210458
case (e1,e2,(DAE.T_METATUPLE(_),_),initial_)
1045310459
equation
10460+
true = RTOpts.acceptMetaModelicaGrammar();
1045410461
dae = makeDaeEquation(e1, e2, initial_);
1045510462
then
1045610463
{dae};
1045710464
case (e1,e2,(DAE.T_METAOPTION(_),_),initial_)
1045810465
equation
10466+
true = RTOpts.acceptMetaModelicaGrammar();
1045910467
dae = makeDaeEquation(e1, e2, initial_);
1046010468
then
1046110469
{dae};
1046210470
case (e1,e2,(DAE.T_UNIONTYPE(_),_),initial_)
1046310471
equation
10472+
true = RTOpts.acceptMetaModelicaGrammar();
1046410473
dae = makeDaeEquation(e1, e2, initial_);
1046510474
then
1046610475
{dae};
@@ -11213,6 +11222,7 @@ algorithm
1121311222
/* try */
1121411223
case (cache,env,pre,Absyn.ALG_TRY(sl),initial_,impl)
1121511224
equation
11225+
true = RTOpts.acceptMetaModelicaGrammar();
1121611226
(cache,sl_1) = instAlgorithmitems(cache, env, pre, sl, initial_, impl);
1121711227
stmt = DAE.STMT_TRY(sl_1);
1121811228
then
@@ -11221,6 +11231,7 @@ algorithm
1122111231
/* catch */
1122211232
case (cache,env,pre,Absyn.ALG_CATCH(sl),initial_,impl)
1122311233
equation
11234+
true = RTOpts.acceptMetaModelicaGrammar();
1122411235
(cache,sl_1) = instAlgorithmitems(cache, env, pre, sl, initial_, impl);
1122511236
stmt = DAE.STMT_CATCH(sl_1);
1122611237
then
@@ -11229,6 +11240,7 @@ algorithm
1122911240
/* throw */
1123011241
case (cache,env,pre,Absyn.ALG_THROW(),initial_,impl)
1123111242
equation
11243+
true = RTOpts.acceptMetaModelicaGrammar();
1123211244
stmt = DAE.STMT_THROW();
1123311245
then
1123411246
(cache,stmt);
@@ -11238,6 +11250,7 @@ algorithm
1123811250
local
1123911251
String s;
1124011252
equation
11253+
true = RTOpts.acceptMetaModelicaGrammar();
1124111254
stmt = DAE.STMT_GOTO(s);
1124211255
then
1124311256
(cache,stmt);
@@ -11246,6 +11259,7 @@ algorithm
1124611259
local
1124711260
String s;
1124811261
equation
11262+
true = RTOpts.acceptMetaModelicaGrammar();
1124911263
stmt = DAE.STMT_LABEL(s);
1125011264
then
1125111265
(cache,stmt);
@@ -11256,6 +11270,7 @@ algorithm
1125611270
list<Absyn.Exp> absynExpList;
1125711271
list<DAE.Exp> expExpList;
1125811272
equation
11273+
true = RTOpts.acceptMetaModelicaGrammar();
1125911274
(cache,expExpList,_,_) = Static.elabExpList(cache,env, absynExpList, impl, NONE,true);
1126011275
then (cache,DAE.STMT_MATCHCASES(expExpList));
1126111276

0 commit comments

Comments
 (0)