}
void
-funccompile(Node *n, int isclosure)
+funccompile(Node *n)
{
stksize = BADWIDTH;
maxarg = 0;
// 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);
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);
// 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);