//
// Print routines for debugging and development
//
void
printNode(BaseAST* ast) {
  Symbol* sym = toSymbol(ast);
  WideInfo* wi = wideInfoMap.get(sym);
  printf("%s[%d]\n", sym->cname, sym->id);
  printf("%s\n", (wi->mustBeWide) ? "WIDE" : "NARROW");
  printf("IN: ");
  forv_Vec(Symbol, inSym, wi->inVec)
    printf("%d ", inSym->id);
  printf("\n");
  printf("OUT: ");
  forv_Vec(Symbol, outSym, wi->outVec)
    printf("%d ", outSym->id);
  printf("\n");
}
Пример #2
0
 forv_Vec(CallExpr, call, gCallExprs) {
   if (FnSymbol* fn = call->isResolved()) {
     fn->calledBy->add(call);
   } else if (call->isPrimitive(PRIM_FTABLE_CALL)) {
     // sjd: do we have to do anything special here?
     //      should this call be added to some function's calledBy list?
   } else if (call->isPrimitive(PRIM_VMT_CALL)) {
     FnSymbol* fn = toFnSymbol(toSymExpr(call->get(1))->var);
     Vec<FnSymbol*>* children = virtualChildrenMap.get(fn);
     fn->calledBy->add(call);
     forv_Vec(FnSymbol, child, *children)
       child->calledBy->add(call);
   }
 }