Skip to content

Commit

Permalink
- Moved elaboration of NONE into elabCref to reduce the failtrace gen…
Browse files Browse the repository at this point in the history
…erated by MetaModelica files

git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@5788 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Jul 2, 2010
1 parent 879e3ca commit 7bb64a8
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions Compiler/Static.mo
Expand Up @@ -360,20 +360,8 @@ algorithm
case (cache,_,Absyn.END(),impl,st,doVect)
then (cache,DAE.END(),DAE.PROP(DAE.T_INTEGER_DEFAULT,DAE.C_CONST()),st,DAEUtil.emptyDae);

/*--------------------------------*/
/* Part of MetaModelica extension. KS */
case (cache,env,Absyn.CREF(Absyn.CREF_IDENT("NONE",{})),impl,st,doVect)
local DAE.Exp e;
equation
true = RTOpts.acceptMetaModelicaGrammar();
e = DAE.META_OPTION(NONE());
prop1 = DAE.PROP((DAE.T_METAOPTION((DAE.T_NOTYPE(),NONE)),NONE()),DAE.C_CONST());
then
(cache,e,prop1,st,DAEUtil.emptyDae);
/*-------------------------------------*/

case (cache,env,Absyn.CREF(componentRef = cr),impl,st,doVect) // BoschRexroth specifics
local DAE.Type ty;
case (cache,env,Absyn.CREF(componentRef = cr),impl,st,doVect) // BoschRexroth specifics
local DAE.Type ty;
equation
false = OptManager.getOption("cevalEquation");
(cache,exp,prop as DAE.PROP(ty,DAE.C_PARAM()),_,dae) = elabCref(cache,env, cr, impl,doVect);
Expand Down Expand Up @@ -9971,6 +9959,15 @@ algorithm
then
(cache,exp,DAE.PROP(t,DAE.C_CONST()),SCode.RO(),dae);

// MetaModelica extension
case (cache,env,Absyn.CREF_IDENT("NONE",{}),impl,doVect)
local DAE.Exp e;
equation
true = RTOpts.acceptMetaModelicaGrammar();
e = DAE.META_OPTION(NONE());
then
(cache,e,DAE.PROP((DAE.T_METAOPTION((DAE.T_NOTYPE(),NONE)),NONE()),DAE.C_CONST()),SCode.RO(),DAEUtil.emptyDae);

case (cache,env,c,impl,doVect)
equation
//true = RTOpts.debugFlag("fnptr") or RTOpts.acceptMetaModelicaGrammar();
Expand Down

0 comments on commit 7bb64a8

Please sign in to comment.