mirror of
https://github.com/golang/go
synced 2024-11-12 05:30:21 -07:00
keep line number history even when
throwing away dead code at end of file. also fix an uninitialized memory error found by valgrind. R=r DELTA=7 (5 added, 2 deleted, 0 changed) OCL=23991 CL=23994
This commit is contained in:
parent
9e735985d4
commit
47e27758db
@ -757,6 +757,7 @@ addhist(int32 line, int type)
|
||||
u->link = curhist;
|
||||
curhist = u;
|
||||
|
||||
s->name[0] = 0;
|
||||
j = 1;
|
||||
for(i=0; i<histfrogp; i++) {
|
||||
k = histfrog[i]->value;
|
||||
@ -764,6 +765,8 @@ addhist(int32 line, int type)
|
||||
s->name[j+1] = k;
|
||||
j += 2;
|
||||
}
|
||||
s->name[j] = 0;
|
||||
s->name[j+1] = 0;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -240,8 +240,6 @@ asmsym(void)
|
||||
|
||||
for(p=textp; p!=P; p=p->pcond) {
|
||||
s = p->from.sym;
|
||||
if(s->type != STEXT)
|
||||
continue;
|
||||
|
||||
/* filenames first */
|
||||
for(a=p->to.autom; a; a=a->link)
|
||||
@ -251,6 +249,8 @@ asmsym(void)
|
||||
if(a->type == D_FILE1)
|
||||
putsymb(a->asym->name, 'Z', a->aoffset, 0, nil);
|
||||
|
||||
if(s->type != STEXT)
|
||||
continue;
|
||||
putsymb(s->name, 'T', s->value, s->version, gotypefor(s->name));
|
||||
|
||||
/* frame, auto and param after */
|
||||
|
Loading…
Reference in New Issue
Block a user