static void dumpglobls(void) { Node *n; NodeList *l; // add globals for(l=externdcl; l; l=l->next) { n = l->n; if(n->op != ONAME) continue; if(n->type == T) fatal("external %N nil type\n", n); if(n->class == PFUNC) continue; if(n->sym->pkg != localpkg) continue; dowidth(n->type); ggloblnod(n); } for(l=funcsyms; l; l=l->next) { n = l->n; dsymptr(n->sym, 0, n->sym->def->shortname->sym, 0); ggloblsym(n->sym, widthptr, 1, 1); } // Do not reprocess funcsyms on next dumpglobls call. funcsyms = nil; }
static void dumpglobls(void) { Node *n; NodeList *l; // add globals for(l=externdcl; l; l=l->next) { n = l->n; if(n->op != ONAME) continue; if(n->type == T) fatal("external %N nil type\n", n); if(n->class == PFUNC) continue; if(n->sym->pkg != localpkg) continue; dowidth(n->type); ggloblnod(n, n->type->width); } }
void dumpglobls(void) { Node *n; NodeList *l; // add globals for(l=externdcl; l; l=l->next) { n = l->n; if(n->op != ONAME) continue; if(n->type == T) fatal("external %#N nil type\n", n); if(n->class == PFUNC) continue; if(n->sym->pkg != localpkg) continue; dowidth(n->type); // TODO(rsc): why is this not s/n->sym->def/n/ ? ggloblnod(n->sym->def, n->type->width); } }