Changeset 18bb4e8a in OpenModelica


Ignore:
Timestamp:
2016-04-02T05:57:19+02:00 (8 years ago)
Author:
Martin Sjölund <martin.sjolund@…>
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:
22754cb
Parents:
141c87f0
Message:

Do not generate function code for constants

Constants are replaced by values and do not need to be duplicated in
functions. Currently, if evaluation of the constant fails, we get the
same constant that cannot be evaluated in the function prologue.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/SimCode/SimCodeFunctionUtil.mo

    r5e63e23 r18bb4e8a  
    14791479    case DAE.VAR(kind=vk, direction=vd)
    14801480      guard
    1481         isVarVarOrConstant(vk) and
     1481        isVarKindVarOrParameter(vk) and
    14821482        isDirectionNotInput(vd)
    14831483      then true;
     
    14981498    case DAE.VAR(kind=vk, direction=vd)
    14991499      guard
    1500         isVarVarOrConstant(vk) and
     1500        isVarKindVarOrParameter(vk) and
    15011501        isDirectionNotInputNotOutput(vd)
    15021502      then true;
     
    15051505end isVarNotInputNotOutput;
    15061506
    1507 protected function isVarVarOrConstant
     1507protected function isVarKindVarOrParameter
    15081508  input DAE.VarKind inVarKind;
    15091509  output Boolean outB;
     
    15151515    else false;
    15161516  end match;
    1517 end isVarVarOrConstant;
     1517end isVarKindVarOrParameter;
    15181518
    15191519protected function isDirectionNotInput
Note: See TracChangeset for help on using the changeset viewer.