mirror of
https://github.com/golang/go
synced 2024-11-18 12:04:57 -07:00
cmd/gc: remove dead code
Change-Id: Ib46a42fc873066b1cc00368fe43648f08dce48bd Reviewed-on: https://go-review.googlesource.com/4200 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
a9dddb53f7
commit
8ffc450049
@ -1435,7 +1435,7 @@ addmethod(Sym *sf, Type *t, int local, int nointerface)
|
||||
}
|
||||
|
||||
void
|
||||
funccompile(Node *n, int isclosure)
|
||||
funccompile(Node *n)
|
||||
{
|
||||
stksize = BADWIDTH;
|
||||
maxarg = 0;
|
||||
@ -1449,20 +1449,6 @@ funccompile(Node *n, int isclosure)
|
||||
// assign parameter offsets
|
||||
checkwidth(n->type);
|
||||
|
||||
// record offset to actual frame pointer.
|
||||
// for closure, have to skip over leading pointers and PC slot.
|
||||
// TODO(rsc): this is the old jit closure handling code.
|
||||
// with the new closures, isclosure is always 0; delete this block.
|
||||
nodfp->xoffset = 0;
|
||||
if(isclosure) {
|
||||
NodeList *l;
|
||||
for(l=n->nname->ntype->list; l; l=l->next) {
|
||||
nodfp->xoffset += widthptr;
|
||||
if(l->n->left == N) // found slot for PC
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(curfn)
|
||||
fatal("funccompile %S inside %S", n->nname->sym, curfn->nname->sym);
|
||||
|
||||
|
@ -1128,7 +1128,7 @@ void dumpdcl(char *st);
|
||||
Node* embedded(Sym *s, Pkg *pkg);
|
||||
Node* fakethis(void);
|
||||
void funcbody(Node *n);
|
||||
void funccompile(Node *n, int isclosure);
|
||||
void funccompile(Node *n);
|
||||
void funchdr(Node *n);
|
||||
Type* functype(Node *this, NodeList *in, NodeList *out);
|
||||
void ifacedcl(Node *n);
|
||||
|
@ -191,5 +191,5 @@ fninit(NodeList *n)
|
||||
typecheck(&fn, Etop);
|
||||
typechecklist(r, Etop);
|
||||
curfn = nil;
|
||||
funccompile(fn, 0);
|
||||
funccompile(fn);
|
||||
}
|
||||
|
@ -459,7 +459,7 @@ gcmain(int argc, char *argv[])
|
||||
// Phase 7: Compile top level functions.
|
||||
for(l=xtop; l; l=l->next)
|
||||
if(l->n->op == ODCLFUNC)
|
||||
funccompile(l->n, 0);
|
||||
funccompile(l->n);
|
||||
|
||||
if(nsavederrors+nerrors == 0)
|
||||
fninit(xtop);
|
||||
|
@ -2628,7 +2628,7 @@ genwrapper(Type *rcvr, Type *method, Sym *newnam, int iface)
|
||||
inl_nonlocal = 0;
|
||||
|
||||
curfn = nil;
|
||||
funccompile(fn, 0);
|
||||
funccompile(fn);
|
||||
}
|
||||
|
||||
static Node*
|
||||
@ -2876,7 +2876,7 @@ genhash(Sym *sym, Type *t)
|
||||
// an unexported field of type unsafe.Pointer.
|
||||
old_safemode = safemode;
|
||||
safemode = 0;
|
||||
funccompile(fn, 0);
|
||||
funccompile(fn);
|
||||
safemode = old_safemode;
|
||||
}
|
||||
|
||||
@ -3096,7 +3096,7 @@ geneq(Sym *sym, Type *t)
|
||||
// an unexported field of type unsafe.Pointer.
|
||||
old_safemode = safemode;
|
||||
safemode = 0;
|
||||
funccompile(fn, 0);
|
||||
funccompile(fn);
|
||||
safemode = old_safemode;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user