]> Cypherpunks repositories - gostls13.git/commitdiff
more line numbers
authorKen Thompson <ken@golang.org>
Sat, 28 Jun 2008 20:58:00 +0000 (13:58 -0700)
committerKen Thompson <ken@golang.org>
Sat, 28 Jun 2008 20:58:00 +0000 (13:58 -0700)
SVN=125261

src/cmd/6g/gen.c
src/cmd/6g/gsubr.c

index f4b8652f6a17b8af45fba25287460ad6f9fca25b..9c1d3df9b9de3ba88311bc87ebc2984535684cb7 100644 (file)
@@ -685,6 +685,7 @@ cgen_callret(Node *n, Node *res)
        nod.op = OINDREG;
        nod.val.vval = D_SP;
        nod.addable = 1;
+       nod.lineno = lineno;
 
        nod.xoffset = fp->width;
        nod.type = fp->type;
@@ -714,6 +715,7 @@ cgen_aret(Node *n, Node *res)
        nod1.op = OINDREG;
        nod1.val.vval = D_SP;
        nod1.addable = 1;
+       nod1.lineno = lineno;
 
        nod1.xoffset = fp->width;
        nod1.type = fp->type;
index 5ede57bd9229c132682657868d14b78d5c6dc90b..62774461554921cf37388e7b1c8bf1e97484e310 100644 (file)
@@ -55,6 +55,8 @@ prog(int as)
        p->as = as;
        p->lineno = lineno;
        p->link = pc;
+if(lineno == 0)
+warn("line 0 %P\n", p);
        return p;
 }
 
@@ -214,6 +216,7 @@ nodreg(Node *n, Type *t, int r)
        memset(n, 0, sizeof(*n));
        n->op = OREGISTER;
        n->addable = 1;
+       n->lineno = lineno;
        ullmancalc(n);
        n->val.vval = r;
        n->type = t;
@@ -239,6 +242,7 @@ nodarg(Type *t, int fp)
        n->sym = t->sym;
        n->xoffset = t->width;
        n->addable = 1;
+       n->lineno = lineno;
 
        switch(fp) {
        case 0:         // output arg
@@ -266,6 +270,7 @@ nodconst(Node *n, Type *t, vlong v)
        memset(n, 0, sizeof(*n));
        n->op = OLITERAL;
        n->addable = 1;
+       n->lineno = lineno;
        ullmancalc(n);
        n->val.vval = v;
        n->val.ctype = CTINT;
@@ -1672,6 +1677,7 @@ tempname(Node *n, Type *t)
        n->etype = t->etype;
        n->class = PAUTO;
        n->addable = 1;
+       n->lineno = lineno;
        n->ullman = 0;
 
        dowidth(t);