Changeset 8bddad5 in OpenModelica
- Timestamp:
- 2016-04-04T00:22:12+02:00 (8 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, 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)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Compiler/BackEnd/BackendInline.mo
redeb3209 r8bddad5 68 68 // ============================================================================= 69 69 70 p ublicfunction inlineCalls70 protected function inlineCalls 71 71 "searches for calls where the inline flag is true, and inlines them" 72 72 input list<DAE.InlineType> inITLst; 73 73 input BackendDAE.BackendDAE inBackendDAE; 74 74 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); 75 protected 76 list<DAE.InlineType> itlst; 77 Inline.Functiontuple tpl; 78 BackendDAE.EqSystems eqs; 79 BackendDAE.Shared shared; 80 algorithm 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 98 94 Debug.traceln("Inline.inlineCalls failed"); 99 then100 101 end matchcontinue;95 end if; 96 fail(); 97 end try; 102 98 end inlineCalls; 103 99
Note: See TracChangeset
for help on using the changeset viewer.