/[ascend]/trunk/base/generic/compiler/instantiate.c
ViewVC logotype

Diff of /trunk/base/generic/compiler/instantiate.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 76 by johnpye, Mon Dec 5 17:31:00 2005 UTC revision 89 by johnpye, Wed Dec 7 15:44:43 2005 UTC
# Line 1105  struct Instance *MakeSparseArray(struct Line 1105  struct Instance *MakeSparseArray(struct
1105                                   struct Instance *arginst,                                   struct Instance *arginst,
1106                                   struct gl_list_t *rhslist)                                   struct gl_list_t *rhslist)
1107  {  {
1108    struct TypeDescription *desc;    struct TypeDescription *desc = NULL;
1109    struct Instance *aryinst;    struct Instance *aryinst;
1110    struct gl_list_t *indices;    struct gl_list_t *indices;
1111    indices = MakeIndices(parent,NextName(name),stat);    indices = MakeIndices(parent,NextName(name),stat);
# Line 2910  int MPICheckWBTS(struct Instance *tmpins Line 2910  int MPICheckWBTS(struct Instance *tmpins
2910    struct gl_list_t *instances;    struct gl_list_t *instances;
2911    unsigned long c,len;    unsigned long c,len;
2912    enum find_errors err;    enum find_errors err;
2913    struct Instance *head;    struct Instance *head = NULL;
2914    
2915    instances = FindInsts(tmpinst,GetStatVarList(statement),&err);    instances = FindInsts(tmpinst,GetStatVarList(statement),&err);
2916    if (instances==NULL) {    if (instances==NULL) {
# Line 3532  int DigestArguments( Line 3532  int DigestArguments(
3532      case pp_DONE:      case pp_DONE:
3533        msg = NULL;        msg = NULL;
3534        break;        break;
3535        default:
3536          msg = NULL;
3537      }      }
3538      if (msg != NULL) {      if (msg != NULL) {
3539        WriteUnexecutedMessage(ASCERR,statement,msg);        WriteUnexecutedMessage(ASCERR,statement,msg);
# Line 4576  int ExecuteAA(struct Instance *inst, str Line 4578  int ExecuteAA(struct Instance *inst, str
4578  {  {
4579    struct gl_list_t *instances;    struct gl_list_t *instances;
4580    enum find_errors err;    enum find_errors err;
4581    struct TypeDescription *mostrefined;    struct TypeDescription *mostrefined = NULL;
4582    unsigned long c,len;    unsigned long c,len;
4583    struct Instance *inst1,*inst2;    struct Instance *inst1,*inst2;
4584    instances = FindInsts(inst,GetStatVarList(statement),&err);    instances = FindInsts(inst,GetStatVarList(statement),&err);
# Line 4929  int ExecuteUnSelectedEQN(struct Instance Line 4931  int ExecuteUnSelectedEQN(struct Instance
4931      break;      break;
4932    default:    default:
4933      Asc_Panic(2, NULL, "Incorrect argument passed to ExecuteUnSelectedEQN\n");      Asc_Panic(2, NULL, "Incorrect argument passed to ExecuteUnSelectedEQN\n");
4934        name = NULL;
4935    }    }
4936    instances = FindInstances(inst,name,&ferr);    instances = FindInstances(inst,name,&ferr);
4937    /* see if the relation is there already */    /* see if the relation is there already */
# Line 5353  int ExecuteBlackBoxEXT(struct Instance * Line 5356  int ExecuteBlackBoxEXT(struct Instance *
5356    struct ExternalFunc *efunc;    struct ExternalFunc *efunc;
5357    CONST char *funcname;    CONST char *funcname;
5358    
5359    ERROR_REPORTER_DEBUG("ENTERED ExecuteBlackBoxExt\n");    CONSOLE_DEBUG("ENTERED ExecuteBlackBoxExt\n");
5360    
5361    /* make or find the array head */    /* make or find the array head */
5362    name = ExternalStatName(statement);    name = ExternalStatName(statement);
5363    aryinst = MakeExtRelationArray(inst,name,statement);    aryinst = MakeExtRelationArray(inst,name,statement);
5364    if (aryinst==NULL) {    if (aryinst==NULL) {
5365      WriteStatementLocation(ASCERR,statement);      WriteStatementLocation(ASCERR,statement);
5366      FPRINTF(ASCERR,"Unable to create external expression structure.\n");      CONSOLE_DEBUG("Unable to create external expression structure.\n");
5367      return 1;      return 1;
5368    }    }
5369    /* we now have an array head */    /* we now have an array head */
# Line 8631  void RealExecuteWHEN(struct Instance *in Line 8634  void RealExecuteWHEN(struct Instance *in
8634        WSEM(ASCERR,statement, "Expression name refers to more than one object");        WSEM(ASCERR,statement, "Expression name refers to more than one object");
8635        gl_destroy(instances);        gl_destroy(instances);
8636        Asc_Panic(2, NULL, "Expression name refers to more than one object");        Asc_Panic(2, NULL, "Expression name refers to more than one object");
8637          child = NULL;
8638      }      }
8639    }    }
8640    vlist = WhenStatVL(statement);    vlist = WhenStatVL(statement);
# Line 11196  void Pass4ProcessPendingInstances(void) Line 11200  void Pass4ProcessPendingInstances(void)
11200          blist = InstanceBitList(inst);          blist = InstanceBitList(inst);
11201        } else {        } else {
11202          blist = NULL;   /* this shouldn't be necessary, but is */          blist = NULL;   /* this shouldn't be necessary, but is */
11203            inst = NULL;
11204        }        }
11205        if ((blist!=NULL)&&!BitListEmpty(blist)){        if ((blist!=NULL)&&!BitListEmpty(blist)){
11206          /* only models get here */          /* only models get here */
# Line 11258  void Pass3ProcessPendingInstances(void) Line 11263  void Pass3ProcessPendingInstances(void)
11263          blist = InstanceBitList(inst);          blist = InstanceBitList(inst);
11264        } else {        } else {
11265          blist = NULL; /* this shouldn't be necessary, but is */          blist = NULL; /* this shouldn't be necessary, but is */
11266            inst = NULL;
11267        }        }
11268        if ((blist!=NULL)&&!BitListEmpty(blist)){        if ((blist!=NULL)&&!BitListEmpty(blist)){
11269          /* only models get here */          /* only models get here */
# Line 11418  void Pass2ProcessPendingInstances(void) Line 11424  void Pass2ProcessPendingInstances(void)
11424          blist = InstanceBitList(inst);          blist = InstanceBitList(inst);
11425        } else {        } else {
11426          blist = NULL; /* this shouldn't be necessary, but is */          blist = NULL; /* this shouldn't be necessary, but is */
11427            inst = NULL;
11428        }        }
11429        if ((blist!=NULL)&&!BitListEmpty(blist)){        if ((blist!=NULL)&&!BitListEmpty(blist)){
11430          /* only models get here */          /* only models get here */
# Line 11854  void Pass4SetWhenBits(struct Instance *i Line 11861  void Pass4SetWhenBits(struct Instance *i
11861      blist = InstanceBitList(inst);      blist = InstanceBitList(inst);
11862      if (blist!=NULL){      if (blist!=NULL){
11863        unsigned long c;        unsigned long c;
11864        struct gl_list_t *statements;        struct gl_list_t *statements = NULL;
11865        enum stat_t st;        enum stat_t st;
11866        int changed;        int changed;
11867    
# Line 11925  void Pass3SetLogRelBits(struct Instance Line 11932  void Pass3SetLogRelBits(struct Instance
11932      blist = InstanceBitList(inst);      blist = InstanceBitList(inst);
11933      if (blist!=NULL){      if (blist!=NULL){
11934        unsigned long c;        unsigned long c;
11935        struct gl_list_t *statements;        struct gl_list_t *statements = NULL;
11936        enum stat_t st;        enum stat_t st;
11937        int changed;        int changed;
11938    
# Line 12019  void Pass2SetRelationBits(struct Instanc Line 12026  void Pass2SetRelationBits(struct Instanc
12026      blist = InstanceBitList(inst);      blist = InstanceBitList(inst);
12027      if (blist!=NULL){      if (blist!=NULL){
12028        unsigned long c;        unsigned long c;
12029        struct gl_list_t *statements;        struct gl_list_t *statements = NULL;
12030        enum stat_t st;        enum stat_t st;
12031        int changed;        int changed;
12032    
# Line 12593  void UpdateInstance(struct Instance *roo Line 12600  void UpdateInstance(struct Instance *roo
12600          if (instances) {          if (instances) {
12601            if (gl_length(instances)!=1) {            if (gl_length(instances)!=1) {
12602              FPRINTF(ASCERR,"More than 1 scope instance found !!\n");              FPRINTF(ASCERR,"More than 1 scope instance found !!\n");
12603                scope = NULL;
12604            }            }
12605            else{            else{
12606              scope = (struct Instance *)gl_fetch(instances,1L);              scope = (struct Instance *)gl_fetch(instances,1L);

Legend:
Removed from v.76  
changed lines
  Added in v.89

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22