Changeset 49bf67a in OpenModelica


Ignore:
Timestamp:
2016-01-29T12:09:59+01:00 (8 years ago)
Author:
Willi Braun <wbraun@…>
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:
3ccd90a
Parents:
3029c64
git-author:
Willi Braun <wbraun@…> (01/29/16 03:13:30)
git-committer:
Willi Braun <wbraun@…> (01/29/16 12:09:59)
Message:

use global index in wrapfunctionCall module

  • This allows the usage of the modlue at different stages of the compile process
Location:
Compiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Compiler/BackEnd/CommonSubExpression.mo

    re70366d r49bf67a  
    5555protected import ExpressionDump;
    5656protected import ExpressionSolve;
     57protected import Global;
    5758protected import HashTableExpToExp;
    5859protected import HashTableExpToIndex;
     
    7677  DAE.FunctionTree functionTree;
    7778  HashTableExpToExp.HashTable HT;
    78   Integer index=1;
     79  Integer index=System.tmpTickIndex(Global.backendDAE_cseIndex);
    7980  list<BackendDAE.Equation> eqList;
    8081  list<BackendDAE.Var> varList;
     
    711712
    712713    case DAE.T_REAL() equation
    713       str = inPrefix + intString(inIndex);
     714      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    714715      cr = DAE.CREF_IDENT(str, DAE.T_REAL_DEFAULT, {});
    715716      value = DAE.CREF(cr, DAE.T_REAL_DEFAULT);
     
    717718
    718719    case DAE.T_INTEGER() equation
    719       str = inPrefix + intString(inIndex);
     720      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    720721      cr = DAE.CREF_IDENT(str, DAE.T_INTEGER_DEFAULT, {});
    721722      value = DAE.CREF(cr, DAE.T_INTEGER_DEFAULT);
     
    723724
    724725    case DAE.T_STRING() equation
    725       str = inPrefix + intString(inIndex);
     726      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    726727      cr = DAE.CREF_IDENT(str, DAE.T_STRING_DEFAULT, {});
    727728      value = DAE.CREF(cr, DAE.T_STRING_DEFAULT);
     
    729730
    730731    case DAE.T_BOOL() equation
    731       str = inPrefix + intString(inIndex);
     732      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    732733      cr = DAE.CREF_IDENT(str, DAE.T_BOOL_DEFAULT, {});
    733734      value = DAE.CREF(cr, DAE.T_BOOL_DEFAULT);
     
    735736
    736737    case DAE.T_CLOCK() equation
    737       str = inPrefix + intString(inIndex);
     738      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    738739      cr = DAE.CREF_IDENT(str, DAE.T_CLOCK_DEFAULT, {});
    739740      value = DAE.CREF(cr, DAE.T_CLOCK_DEFAULT);
     
    747748    // Expanding
    748749    case DAE.T_ARRAY() equation
    749       str = inPrefix + intString(inIndex);
     750      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    750751      cr = DAE.CREF_IDENT(str, inType, {});
    751752      // crefs = ComponentReference.expandCref(cr, false);
     
    757758    // record types
    758759    case DAE.T_COMPLEX(varLst=varLst, complexClassType=ClassInf.RECORD(path)) equation
    759       str = inPrefix + intString(inIndex);
     760      str = inPrefix + String(System.tmpTickIndex(Global.backendDAE_cseIndex));
    760761      cr = DAE.CREF_IDENT(str, inType, {});       //inType?
    761762      // crefs = ComponentReference.expandCref(cr, true);
  • Compiler/Global/Global.mo

    r7f300786 r49bf67a  
    6969// nodeId
    7070constant Integer fgraph_nextId = 22;
     71// csevar name
     72constant Integer backendDAE_cseIndex = 23;
     73
    7174// ----------------------
    7275
Note: See TracChangeset for help on using the changeset viewer.