/[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 11 by aw0a, Sat Nov 13 16:45:56 2004 UTC revision 62 by johnpye, Wed Nov 30 05:53:20 2005 UTC
# Line 133  Line 133 
133    
134  static int g_iteration = 0; /* the current iteration. */  static int g_iteration = 0; /* the current iteration. */
135    
136    /* moved from tcltk98/generic/interface/SimsProc.c */
137    struct Instance *g_cursim;
138    
139  /*************************************************************************\  /*************************************************************************\
140  variable to check agreement in the number of boolean, integer or symbol  variable to check agreement in the number of boolean, integer or symbol
# Line 175  long int g_compiler_counter = 1; Line 177  long int g_compiler_counter = 1;
177   * which changes the instance tree is called.   * which changes the instance tree is called.
178   */   */
179    
180  #define DEBUG_RELS 1  #define DEBUG_RELS
181  /* undef DEBUG_RELS if you want less spew in pass 2 */  /* undef DEBUG_RELS if you want less spew in pass 2 */
182    
183  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
# Line 4744  int ExecuteREL(struct Instance *inst, st Line 4746  int ExecuteREL(struct Instance *inst, st
4746    if (GetInstanceRelation(child,&reltype)==NULL) {    if (GetInstanceRelation(child,&reltype)==NULL) {
4747      if ( (g_instantiate_relns & TOKRELS) ==0) {      if ( (g_instantiate_relns & TOKRELS) ==0) {
4748  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
4749          WSEM(ASCERR,statement, "TOKRELS 0 found in compiling relation.");          WSNM(ASCERR,statement, "TOKRELS 0 found in compiling relation.");
4750  #endif  #endif
4751        return 1;        return 1;
4752      }      }
# Line 4756  int ExecuteREL(struct Instance *inst, st Line 4758  int ExecuteREL(struct Instance *inst, st
4758      if (reln != NULL){      if (reln != NULL){
4759        SetInstanceRelation(child,reln,e_token);        SetInstanceRelation(child,reln,e_token);
4760  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
4761        WSEM(ASCERR,statement, "   Created relation.");        WSNM(ASCERR,statement, "Created relation.");
4762  #endif  #endif
4763        return 1;        return 1;
4764      } else {      } else {
# Line 4811  int ExecuteREL(struct Instance *inst, st Line 4813  int ExecuteREL(struct Instance *inst, st
4813        }        }
4814      }      }
4815  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
4816      WSEM(ASCERR,statement, "   Failed relation -- unexpected scenario.");      WSNM(ASCERR,statement, "   Failed relation -- unexpected scenario.");
4817  #endif  #endif
4818    } else{    } else{
4819      /*  Do nothing, somebody already completed the relation.  */      /*  Do nothing, somebody already completed the relation.  */
4820  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
4821          WSEM(ASCERR,statement, "Already compiled in compiling relation?!.");          WSNM(ASCERR,statement, "Already compiled in compiling relation?!.");
4822  #endif  #endif
4823      return 1;      return 1;
4824    }    }
4825  #ifdef DEBUG_RELS  #ifdef DEBUG_RELS
4826    WSEM(ASCERR,statement, "End of ExecuteREL. huh?");    WSNM(ASCERR,statement, "End of ExecuteREL. huh?");
4827  #endif  #endif
4828  }  }
4829    
# Line 5351  int ExecuteBlackBoxEXT(struct Instance * Line 5353  int ExecuteBlackBoxEXT(struct Instance *
5353    struct ExternalFunc *efunc;    struct ExternalFunc *efunc;
5354    CONST char *funcname;    CONST char *funcname;
5355    
5356      ERROR_REPORTER_DEBUG("ENTERED ExecuteBlackBoxExt\n");
5357    
5358    /* make or find the array head */    /* make or find the array head */
5359    name = ExternalStatName(statement);    name = ExternalStatName(statement);
5360    aryinst = MakeExtRelationArray(inst,name,statement);    aryinst = MakeExtRelationArray(inst,name,statement);
# Line 5403  int ExecuteBlackBoxEXT(struct Instance * Line 5407  int ExecuteBlackBoxEXT(struct Instance *
5407       * loaded at this stage or report an error.       * loaded at this stage or report an error.
5408       */       */
5409      funcname = ExternalStatFuncName(statement);      funcname = ExternalStatFuncName(statement);
5410        FPRINTF(ASCERR,">>>>>> ExecuteBlackBoxEXT %s\n",funcname);
5411    
5412      efunc = LookupExtFunc(funcname);      efunc = LookupExtFunc(funcname);
5413      if (!efunc) {      if (!efunc) {
5414        FPRINTF(ASCERR,"External function %s was not loaded\n",funcname);        FPRINTF(ASCERR,"External function %s was not loaded\n",funcname);
# Line 5911  int AssignStructuralValue(struct Instanc Line 5917  int AssignStructuralValue(struct Instanc
5917      }      }
5918      return 0;      return 0;
5919    default:    default:
5920      WSEM(ASCERR,statement, "Error.  Unknown value type");      WSEM(ASCERR,statement, "Error: Unknown value type");
5921      return 0;      return 0;
5922    }    }
5923  }  }

Legend:
Removed from v.11  
changed lines
  Added in v.62

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