Commit 8ffc4500 authored by Dmitry Vyukov's avatar Dmitry Vyukov

cmd/gc: remove dead code

Change-Id: Ib46a42fc873066b1cc00368fe43648f08dce48bd
Reviewed-on: https://go-review.googlesource.com/4200Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent a9dddb53
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment