Changeset 8bddad5 in OpenModelica


Ignore:
Timestamp:
2016-04-04T00:22:12+02:00 (8 years ago)
Author:
vruge <vruge@…>
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, master, omlib-staging
Children:
cd37dee6
Parents:
a2edcfd
git-author:
vruge <vruge@…> (04/04/16 00:20:22)
git-committer:
vruge <vruge@…> (04/04/16 00:22:12)
Message:

clean up

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Compiler/BackEnd/BackendInline.mo

    redeb3209 r8bddad5  
    6868// =============================================================================
    6969
    70 public function inlineCalls
     70protected function inlineCalls
    7171"searches for calls where the inline flag is true, and inlines them"
    7272  input list<DAE.InlineType> inITLst;
    7373  input BackendDAE.BackendDAE inBackendDAE;
    7474  output BackendDAE.BackendDAE outBackendDAE;
    75 algorithm
    76   outBackendDAE := matchcontinue(inBackendDAE)
    77     local
    78       list<DAE.InlineType> itlst;
    79       Inline.Functiontuple tpl;
    80       BackendDAE.EqSystems eqs;
    81       BackendDAE.Shared shared;
    82 
    83     case BackendDAE.DAE(eqs, shared)
    84       algorithm
    85         tpl := (SOME(shared.functionTree), inITLst);
    86         eqs := List.map1(eqs, inlineEquationSystem, tpl);
    87         shared.knownVars := inlineVariables(shared.knownVars, tpl);
    88         shared.externalObjects := inlineVariables(shared.externalObjects, tpl);
    89         shared.initialEqs := inlineEquationArray(shared.initialEqs, tpl);
    90         shared.removedEqs := inlineEquationArray(shared.removedEqs, tpl);
    91         shared.eventInfo := inlineEventInfo(shared.eventInfo, tpl);
    92       then
    93         BackendDAE.DAE(eqs, shared);
    94 
    95     else
    96       algorithm
    97         true := Flags.isSet(Flags.FAILTRACE);
     75protected
     76  list<DAE.InlineType> itlst;
     77  Inline.Functiontuple tpl;
     78  BackendDAE.EqSystems eqs;
     79  BackendDAE.Shared shared;
     80algorithm
     81  try
     82    shared := inBackendDAE.shared;
     83    eqs := inBackendDAE.eqs;
     84    tpl := (SOME(shared.functionTree), inITLst);
     85    eqs := List.map1(eqs, inlineEquationSystem, tpl);
     86    shared.knownVars := inlineVariables(shared.knownVars, tpl);
     87    shared.externalObjects := inlineVariables(shared.externalObjects, tpl);
     88    shared.initialEqs := inlineEquationArray(shared.initialEqs, tpl);
     89    shared.removedEqs := inlineEquationArray(shared.removedEqs, tpl);
     90    shared.eventInfo := inlineEventInfo(shared.eventInfo, tpl);
     91    outBackendDAE := BackendDAE.DAE(eqs, shared);
     92  else
     93    if Flags.isSet(Flags.FAILTRACE) then
    9894        Debug.traceln("Inline.inlineCalls failed");
    99       then
    100         fail();
    101   end matchcontinue;
     95    end if;
     96    fail();
     97  end try;
    10298end inlineCalls;
    10399
Note: See TracChangeset for help on using the changeset viewer.