diff options
author | Russ Cox <rsc@golang.org> | 2009-01-30 14:39:42 -0800 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-01-30 14:39:42 -0800 |
commit | 5fa55fc42dced76f1120057967c233c3dc5d864d (patch) | |
tree | aeb474420ddb343420b8914d84eabfdb9b76acff /src/cmd/gc/export.c | |
parent | befc40a4e68bd0af08b6e8020598c85a9c235665 (diff) | |
download | golang-5fa55fc42dced76f1120057967c233c3dc5d864d.tar.gz |
update compiler to new func rules
R=ken
OCL=23958
CL=23961
Diffstat (limited to 'src/cmd/gc/export.c')
-rw-r--r-- | src/cmd/gc/export.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/cmd/gc/export.c b/src/cmd/gc/export.c index 873029264..ee1ce40da 100644 --- a/src/cmd/gc/export.c +++ b/src/cmd/gc/export.c @@ -153,11 +153,11 @@ dumpexportvar(Sym *s) dumpprereq(t); Bprint(bout, "\t"); - if(t->etype == TFUNC) - Bprint(bout, "func "); + if(t->etype == TFUNC && n->class == PFUNC) + Bprint(bout, "func %lS %#hhT", s, t); else - Bprint(bout, "var "); - Bprint(bout, "%lS %#T\n", s, t); + Bprint(bout, "var %lS %#T", s, t); + Bprint(bout, "\n"); } void @@ -199,7 +199,7 @@ dumpsym(Sym *s) dumpexporttype(s); for(f=s->otype->method; f!=T; f=f->down) - Bprint(bout, "\tfunc (%#T) %hS %#hT\n", + Bprint(bout, "\tfunc (%#T) %hS %#hhT\n", f->type->type->type, f->sym, f->type); break; case LNAME: @@ -368,7 +368,7 @@ importconst(Node *ss, Type *t, Val *v) } void -importvar(Node *ss, Type *t) +importvar(Node *ss, Type *t, int ctxt) { Sym *s; @@ -383,7 +383,7 @@ importvar(Node *ss, Type *t) s, s->oname->type, t); } checkwidth(t); - addvar(newname(s), t, PEXTERN); + addvar(newname(s), t, ctxt); if(debug['e']) print("import var %S %lT\n", s, t); |