Changeset d102cff in OpenModelica
- Timestamp:
- 2013-04-12T19:17:55+02:00 (11 years ago)
- Branches:
- Added-citation-metadata, maintenance/v1.14, maintenance/v1.15, maintenance/v1.16, maintenance/v1.17, maintenance/v1.18, maintenance/v1.19, maintenance/v1.20, maintenance/v1.21, maintenance/v1.22, maintenance/v1.23, master, omlib-staging
- Children:
- e8335829
- Parents:
- 182b8deb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/FrontEnd/Static.mo
r1a7a9542 rd102cff 3437 3437 case (cache,env,(s :: dims),_,impl,pre,_) 3438 3438 equation 3439 (cache,s_1,prop,_) = elabExp(cache, env, s, impl,NONE(), true,pre,info);3440 (cache,dims_1,dimprops,_) = elabExpList(cache, env, dims, impl,NONE(),true,pre,info);3439 (cache,s_1,prop,_) = elabExp(cache, env, s, impl,NONE(), true, pre, info); 3440 (cache,dims_1,dimprops,_) = elabExpList(cache, env, dims, impl, NONE(), true, pre, info); 3441 3441 (dims_1,_) = Types.matchTypes(dims_1, List.map(dimprops,Types.getPropType), DAE.T_INTEGER_DEFAULT, false); 3442 3442 c1 = Types.propertiesListToConst(dimprops); … … 3444 3444 c1 = Types.constAnd(c1,Types.propAllConst(prop)); 3445 3445 sty = Types.getPropType(prop); 3446 (cache,dimvals,_) = Ceval.cevalList(cache, env, dims_1, impl, NONE(), Ceval.NO_MSG());3447 (cache,exp,prop) = elabBuiltinFill2(cache, env, s_1, sty, dimvals,c1,pre);3448 then 3449 (cache, exp,prop);3446 (cache,dimvals,_) = Ceval.cevalList(cache, env, dims_1, impl, NONE(), Ceval.NO_MSG()); 3447 (cache,exp,prop) = elabBuiltinFill2(cache, env, s_1, sty, dimvals, c1, pre); 3448 then 3449 (cache, exp, prop); 3450 3450 3451 3451 // If the previous case failed we probably couldn't constant evaluate the 3452 3452 // dimensions. Create a function call to fill instead, and let the compiler sort it out later. 3453 case (cache, env, (s :: dims), _, impl, pre,_)3453 case (cache, env, (s :: dims), _, impl, pre, _) 3454 3454 equation 3455 3455 c1 = unevaluatedFunctionVariability(env); 3456 (cache, s_1, prop, _) = elabExp(cache, env, s, impl,NONE(), true, pre,info);3457 (cache, dims_1, dimprops, _) = elabExpList(cache, env, dims, impl, NONE(), true, pre,info);3456 (cache, s_1, prop, _) = elabExp(cache, env, s, impl,NONE(), true, pre, info); 3457 (cache, dims_1, dimprops, _) = elabExpList(cache, env, dims, impl, NONE(), true, pre, info); 3458 3458 (dims_1,_) = Types.matchTypes(dims_1, List.map(dimprops,Types.getPropType), DAE.T_INTEGER_DEFAULT, false); 3459 3459 sty = Types.getPropType(prop); … … 3467 3467 // Non-constant dimensons are also allowed in the case of non-expanded arrays 3468 3468 // TODO: check that the diemnsions are parametric? 3469 case (cache, env, (s :: dims), _, impl, pre,_)3469 case (cache, env, (s :: dims), _, impl, pre, _) 3470 3470 equation 3471 3471 false = Config.splitArrays(); 3472 (cache, s_1, DAE.PROP(sty, c1), _) = elabExp(cache, env, s, impl,NONE(), true, pre,info);3473 (cache, dims_1, dimprops, _) = elabExpList(cache, env, dims, impl,NONE(), true, pre,info);3472 (cache, s_1, DAE.PROP(sty, c1), _) = elabExp(cache, env, s, impl,NONE(), true, pre, info); 3473 (cache, dims_1, dimprops, _) = elabExpList(cache, env, dims, impl,NONE(), true, pre, info); 3474 3474 sty = makeFillArgListType(sty, dimprops); 3475 3475 exp_type = Types.simplifyType(sty); … … 4379 4379 case (cache,env,args,_,impl,pre,_) 4380 4380 equation 4381 (cache,e,p) = elabBuiltinFill(cache, env, (Absyn.INTEGER(0) :: args),{}, impl,pre,info);4381 (cache,e,p) = elabBuiltinFill(cache, env, (Absyn.INTEGER(0) :: args), {}, impl, pre, info); 4382 4382 then 4383 4383 (cache,e,p); … … 4390 4390 input list<DAE.Properties> inProps; 4391 4391 output Boolean res; 4392 4393 4392 protected 4394 4393 list<DAE.Type> types; … … 4406 4405 input Integer dimException; 4407 4406 output Boolean res; 4408 4409 4407 protected 4410 4408 list<DAE.Type> types; … … 14100 14098 case _ equation true = Env.inFunctionScope(inEnv); then DAE.C_VAR(); 14101 14099 case _ equation true = Flags.getConfigBool(Flags.CHECK_MODEL); then DAE.C_UNKNOWN(); 14100 // bug #2113, seems that there is nothing in the specs 14101 // that requires that fill arguments are of parameter/constant 14102 // variability, so allow it. 14103 else DAE.C_UNKNOWN(); 14102 14104 end matchcontinue; 14103 14105 end unevaluatedFunctionVariability;
Note: See TracChangeset
for help on using the changeset viewer.